blob: fd1e215c62e40e65e21f4aebe432c5b361a6d6ef [file] [log] [blame]
Jean-Luc Brouilletc5184e22015-03-13 13:51:24 -07001#
2# Copyright (C) 2015 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17header:
18summary: Allocation routines
19description:
Jean-Luc Brouilletbe216382015-03-22 12:44:27 -070020 TODO Adjust documentation.
21
Jean-Luc Brouilletc5184e22015-03-13 13:51:24 -070022 Functions that can be used to query the characteristics of an allocation,
23 to set and get elements of the allocation.
24end:
25
26function: rsAllocationCopy1DRange
27version: 14
28ret: void
29arg: rs_allocation dstAlloc, "Allocation to copy data into."
30arg: uint32_t dstOff, "The offset of the first element to be copied in the destination allocation."
31arg: uint32_t dstMip, "Mip level in the destination allocation."
32arg: uint32_t count, "The number of elements to be copied."
33arg: rs_allocation srcAlloc, "The source data allocation."
34arg: uint32_t srcOff, "The offset of the first element in data to be copied in the source allocation."
35arg: uint32_t srcMip, "Mip level in the source allocation."
36summary: Copy consecutive values between allocations
37description:
38 Copies part of an allocation into another allocation.
39
40 The two allocations must be different. Using this function to copy whithin
41 the same allocation yields undefined results.
42test: none
43end:
44
Jean-Luc Brouilletc5184e22015-03-13 13:51:24 -070045function: rsAllocationCopy2DRange
46version: 14
47ret: void
48arg: rs_allocation dstAlloc, "Allocation to copy data into."
49arg: uint32_t dstXoff, "X offset of the region to update in the destination allocation."
50arg: uint32_t dstYoff, "Y offset of the region to update in the destination allocation."
51arg: uint32_t dstMip, "Mip level in the destination allocation."
52arg: rs_allocation_cubemap_face dstFace, "Cubemap face of the destination allocation, ignored for allocations that aren't cubemaps."
53arg: uint32_t width, "Width of the incoming region to update."
54arg: uint32_t height, "Height of the incoming region to update."
55arg: rs_allocation srcAlloc, "The source data allocation."
56arg: uint32_t srcXoff, "X offset in data of the source allocation."
57arg: uint32_t srcYoff, "Y offset in data of the source allocation."
58arg: uint32_t srcMip, "Mip level in the source allocation."
59arg: rs_allocation_cubemap_face srcFace, "Cubemap face of the source allocation, ignored for allocations that aren't cubemaps."
60summary: Copy a rectangular region between allocations
61description:
62 Copy a rectangular region into the allocation from another allocation.
63
64 The two allocations must be different. Using this function to copy whithin
65 the same allocation yields undefined results.
66test: none
67end:
68
Jean-Luc Brouilletc5184e22015-03-13 13:51:24 -070069function: rsAllocationVLoadX_#2#1
70version: 22
71w: 2, 3, 4
72t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
73ret: #2#1
74arg: rs_allocation a
75arg: uint32_t x
76summary:
77description:
78 Get a single element from an allocation.
79test: none
80end:
81
82function: rsAllocationVLoadX_#2#1
83version: 22
84w: 2, 3, 4
85t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
86ret: #2#1
87arg: rs_allocation a
88arg: uint32_t x
89arg: uint32_t y
90test: none
91end:
92
93function: rsAllocationVLoadX_#2#1
94version: 22
95w: 2, 3, 4
96t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
97ret: #2#1
98arg: rs_allocation a
99arg: uint32_t x
100arg: uint32_t y
101arg: uint32_t z
102test: none
103end:
104
105function: rsAllocationVStoreX_#2#1
106version: 22
107w: 2, 3, 4
108t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
109ret: void
110arg: rs_allocation a
111arg: #2#1 val
112arg: uint32_t x
113summary:
114description:
115 Set a single element of an allocation.
116test: none
117end:
118
119function: rsAllocationVStoreX_#2#1
120version: 22
121w: 2, 3, 4
122t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
123ret: void
124arg: rs_allocation a
125arg: #2#1 val
126arg: uint32_t x
127arg: uint32_t y
128test: none
129end:
130
131function: rsAllocationVStoreX_#2#1
132version: 22
133w: 2, 3, 4
134t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
135ret: void
136arg: rs_allocation a
137arg: #2#1 val
138arg: uint32_t x
139arg: uint32_t y
140arg: uint32_t z
141test: none
142end:
143
Jean-Luc Brouilletc5184e22015-03-13 13:51:24 -0700144function: rsGetElementAt
145ret: const void*
146arg: rs_allocation a
147arg: uint32_t x
148summary: Get an element
149description:
150 Extract a single element from an allocation.
151test: none
152end:
153
154function: rsGetElementAt
155ret: const void*
156arg: rs_allocation a
157arg: uint32_t x
158arg: uint32_t y
159test: none
160end:
161
162function: rsGetElementAt
163ret: const void*
164arg: rs_allocation a
165arg: uint32_t x
166arg: uint32_t y
167arg: uint32_t z
168test: none
169end:
170
171function: rsGetElementAt_#2#1
172version: 9 17
173w: 1, 2, 3, 4
174t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
175ret: #2#1
176arg: rs_allocation a
177arg: uint32_t x
178inline:
179 return ((#2#1 *)rsGetElementAt(a, x))[0];
180test: none
181end:
182
183function: rsGetElementAt_#2#1
184version: 9 17
185w: 1, 2, 3, 4
186t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
187ret: #2#1
188arg: rs_allocation a
189arg: uint32_t x
190arg: uint32_t y
191inline:
192 return ((#2#1 *)rsGetElementAt(a, x, y))[0];
193test: none
194end:
195
196function: rsGetElementAt_#2#1
197version: 9 17
198w: 1, 2, 3, 4
199t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
200ret: #2#1
201arg: rs_allocation a
202arg: uint32_t x
203arg: uint32_t y
204arg: uint32_t z
205inline:
206 return ((#2#1 *)rsGetElementAt(a, x, y, z))[0];
207test: none
208end:
209
210function: rsGetElementAt_#2#1
211version: 18
212w: 1, 2, 3, 4
213t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
214ret: #2#1
215arg: rs_allocation a
216arg: uint32_t x
217test: none
218end:
219
220function: rsGetElementAt_#2#1
221version: 18
222w: 1, 2, 3, 4
223t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
224ret: #2#1
225arg: rs_allocation a
226arg: uint32_t x
227arg: uint32_t y
228test: none
229end:
230
231function: rsGetElementAt_#2#1
232version: 18
233w: 1, 2, 3, 4
234t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
235ret: #2#1
236arg: rs_allocation a
237arg: uint32_t x
238arg: uint32_t y
239arg: uint32_t z
240test: none
241end:
242
243function: rsGetElementAtYuv_uchar_U
244version: 18
245ret: uchar
246arg: rs_allocation a
247arg: uint32_t x
248arg: uint32_t y
249summary:
250description:
251 Extract a single element from an allocation.
252
253 Coordinates are in the dimensions of the Y plane
254test: none
255end:
256
257function: rsGetElementAtYuv_uchar_V
258version: 18
259ret: uchar
260arg: rs_allocation a
261arg: uint32_t x
262arg: uint32_t y
263summary:
264description:
265 Extract a single element from an allocation.
266
267 Coordinates are in the dimensions of the Y plane
268test: none
269end:
270
271function: rsGetElementAtYuv_uchar_Y
272version: 18
273ret: uchar
274arg: rs_allocation a
275arg: uint32_t x
276arg: uint32_t y
277summary:
278description:
279 Extract a single element from an allocation.
280test: none
281end:
282
283function: rsSample
284version: 16
285ret: float4
286arg: rs_allocation a, "allocation to sample from"
287arg: rs_sampler s, "sampler state"
288arg: float location, "location to sample from"
289summary:
290description:
291 Fetch allocation in a way described by the sampler
292
293 If your allocation is 1D, use the variant with float for location.
294 For 2D, use the float2 variant.
295test: none
296end:
297
298function: rsSample
299version: 16
300ret: float4
301arg: rs_allocation a
302arg: rs_sampler s
303arg: float location
304arg: float lod, "mip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used"
305test: none
306end:
307
308function: rsSample
309version: 16
310ret: float4
311arg: rs_allocation a
312arg: rs_sampler s
313arg: float2 location
314test: none
315end:
316
317function: rsSample
318version: 16
319ret: float4
320arg: rs_allocation a
321arg: rs_sampler s
322arg: float2 location
323arg: float lod
324test: none
325end:
326
327function: rsSetElementAt
328version: 18
329ret: void
330arg: rs_allocation a
331arg: void* ptr
332arg: uint32_t x
333summary: Set an element
334description:
335 Set single element of an allocation.
336test: none
337end:
338
339function: rsSetElementAt
340version: 18
341ret: void
342arg: rs_allocation a
343arg: void* ptr
344arg: uint32_t x
345arg: uint32_t y
346test: none
347end:
348
349function: rsSetElementAt_#2#1
350version: 18
351w: 1, 2, 3, 4
352t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
353ret: void
354arg: rs_allocation a
355arg: #2#1 val
356arg: uint32_t x
357test: none
358end:
359
360function: rsSetElementAt_#2#1
361version: 18
362w: 1, 2, 3, 4
363t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
364ret: void
365arg: rs_allocation a
366arg: #2#1 val
367arg: uint32_t x
368arg: uint32_t y
369test: none
370end:
371
372function: rsSetElementAt_#2#1
373version: 18
374w: 1, 2, 3, 4
375t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
376ret: void
377arg: rs_allocation a
378arg: #2#1 val
379arg: uint32_t x
380arg: uint32_t y
381arg: uint32_t z
382test: none
383end: