blob: 4c8b5dbf766b7a7915420712bcbcdea42c369978 [file] [log] [blame]
Jason Sams326e0dd2009-05-22 14:03:28 -07001
Jason Sams186e5912011-04-26 14:50:00 -07002DeviceCreate {
3 direct
4 nocontext
5 ret RsDevice
6}
7
8DeviceDestroy {
9 direct
10 nocontext
11 param RsDevice dev
12}
13
14DeviceSetConfig {
15 direct
16 nocontext
17 param RsDevice dev
18 param RsDeviceParam p
19 param int32_t value
20}
21
22ContextCreate {
23 direct
24 nocontext
25 param RsDevice dev
26 param uint32_t version
27 ret RsContext
28}
29
30ContextCreateGL {
31 direct
32 nocontext
33 param RsDevice dev
34 param uint32_t version
35 param RsSurfaceConfig sc
36 param uint32_t dpi
37 ret RsContext
38}
39
40ContextDestroy {
41 direct
42}
43
44ContextGetMessage {
45 direct
46 param void *data
47 param size_t *receiveLen
Jason Sams1a4efa32011-05-17 15:01:29 -070048 param uint32_t *usrID
Jason Sams186e5912011-04-26 14:50:00 -070049 ret RsMessageToClientType
50}
51
52ContextPeekMessage {
53 direct
54 param size_t *receiveLen
Jason Sams1a4efa32011-05-17 15:01:29 -070055 param uint32_t *usrID
Jason Sams186e5912011-04-26 14:50:00 -070056 ret RsMessageToClientType
57}
58
59ContextInitToClient {
60 direct
61}
62
63ContextDeinitToClient {
64 direct
65}
66
Jason Samsc975cf42011-04-28 18:26:48 -070067TypeCreate {
Jason Sams186e5912011-04-26 14:50:00 -070068 direct
69 param RsElement e
70 param uint32_t dimX
71 param uint32_t dimY
72 param uint32_t dimZ
73 param bool mips
74 param bool faces
75 ret RsType
76}
77
Jason Samsc975cf42011-04-28 18:26:48 -070078AllocationCreateTyped {
Jason Sams186e5912011-04-26 14:50:00 -070079 direct
80 param RsType vtype
81 param RsAllocationMipmapControl mips
82 param uint32_t usages
83 ret RsAllocation
84}
85
Jason Samsc975cf42011-04-28 18:26:48 -070086AllocationCreateFromBitmap {
Jason Sams186e5912011-04-26 14:50:00 -070087 direct
88 param RsType vtype
89 param RsAllocationMipmapControl mips
90 param const void *data
91 param uint32_t usages
92 ret RsAllocation
93}
94
Jason Samsc975cf42011-04-28 18:26:48 -070095AllocationCubeCreateFromBitmap {
Jason Sams186e5912011-04-26 14:50:00 -070096 direct
97 param RsType vtype
98 param RsAllocationMipmapControl mips
99 param const void *data
100 param uint32_t usages
101 ret RsAllocation
102}
103
104
105
Jason Sams8c880902010-06-15 12:15:57 -0700106ContextFinish {
Jason Sams1a4efa32011-05-17 15:01:29 -0700107 sync
Jason Sams8c880902010-06-15 12:15:57 -0700108 }
Jason Sams326e0dd2009-05-22 14:03:28 -0700109
Jason Sams326e0dd2009-05-22 14:03:28 -0700110ContextBindRootScript {
111 param RsScript sampler
112 }
113
Jason Samsccc010b2010-05-13 18:30:11 -0700114ContextBindProgramStore {
115 param RsProgramStore pgm
Jason Sams326e0dd2009-05-22 14:03:28 -0700116 }
117
118ContextBindProgramFragment {
119 param RsProgramFragment pgm
120 }
121
122ContextBindProgramVertex {
123 param RsProgramVertex pgm
124 }
125
Jason Sams5fd09d82009-09-23 13:57:02 -0700126ContextBindProgramRaster {
127 param RsProgramRaster pgm
128 }
129
Alex Sakhartchoukd3e0ad42010-06-24 17:15:34 -0700130ContextBindFont {
131 param RsFont pgm
132 }
133
Jason Sams86f1b232009-09-24 17:38:20 -0700134ContextPause {
135 }
136
137ContextResume {
138 }
139
Jason Sams458f2dc2009-11-03 13:58:36 -0800140ContextSetSurface {
Jason Sams613cad12009-11-12 15:10:25 -0800141 param uint32_t width
142 param uint32_t height
Alex Sakhartchouk7257c7e2011-05-17 12:32:47 -0700143 param RsNativeWindow sur
Jason Sams458f2dc2009-11-03 13:58:36 -0800144 }
145
Jason Samsc21cf402009-11-17 17:26:46 -0800146ContextDump {
147 param int32_t bits
148}
149
Jason Sams613cad12009-11-12 15:10:25 -0800150ContextSetPriority {
Jason Sams15832442009-11-15 12:14:26 -0800151 param int32_t priority
Jason Sams613cad12009-11-12 15:10:25 -0800152 }
153
Jason Sams741aac92010-12-24 14:38:39 -0800154ContextDestroyWorker {
Jason Sams1dcefab2010-12-09 12:19:46 -0800155}
156
Jason Samsa0a1b6f2009-06-10 15:04:38 -0700157AssignName {
Alex Sakhartchouk70b83c12011-04-06 10:57:51 -0700158 param RsObjectBase obj
Jason Samsa0a1b6f2009-06-10 15:04:38 -0700159 param const char *name
160 }
Jason Sams326e0dd2009-05-22 14:03:28 -0700161
Jason Sams707aaf32009-08-18 14:14:24 -0700162ObjDestroy {
Jason Sams2353ae32010-10-14 17:48:46 -0700163 param RsAsyncVoidPtr objPtr
Jason Sams707aaf32009-08-18 14:14:24 -0700164 }
165
Jason Samsd01d9702009-12-23 14:35:29 -0800166ElementCreate {
167 param RsDataType mType
168 param RsDataKind mKind
169 param bool mNormalized
170 param uint32_t mVectorSize
171 ret RsElement
Jason Sams326e0dd2009-05-22 14:03:28 -0700172 }
173
Jason Samsd01d9702009-12-23 14:35:29 -0800174ElementCreate2 {
Jason Samsd01d9702009-12-23 14:35:29 -0800175 param const RsElement * elements
176 param const char ** names
Jason Sams46e45542010-09-02 17:35:23 -0700177 param const uint32_t * arraySize
Jason Sams326e0dd2009-05-22 14:03:28 -0700178 ret RsElement
179 }
180
Jason Sams837e3882010-12-10 16:03:15 -0800181AllocationCopyToBitmap {
182 param RsAllocation alloc
183 param void * data
Alex Sakhartchouk39f2ef62010-10-11 12:35:15 -0700184 }
185
Jason Sams326e0dd2009-05-22 14:03:28 -0700186
Jason Sams4b45b892010-12-29 14:31:29 -0800187Allocation1DData {
Jason Sams326e0dd2009-05-22 14:03:28 -0700188 param RsAllocation va
189 param uint32_t xoff
Jason Sams4b45b892010-12-29 14:31:29 -0800190 param uint32_t lod
Jason Sams326e0dd2009-05-22 14:03:28 -0700191 param uint32_t count
192 param const void *data
Jason Samsd34b7252009-08-04 16:58:20 -0700193 }
Jason Sams326e0dd2009-05-22 14:03:28 -0700194
Jason Sams4b45b892010-12-29 14:31:29 -0800195Allocation1DElementData {
Jason Sams5f0c84c2010-08-31 13:50:42 -0700196 param RsAllocation va
197 param uint32_t x
Jason Sams4b45b892010-12-29 14:31:29 -0800198 param uint32_t lod
Jason Sams5f0c84c2010-08-31 13:50:42 -0700199 param const void *data
200 param uint32_t comp_offset
Jason Sams5f0c84c2010-08-31 13:50:42 -0700201 }
202
Jason Sams4b45b892010-12-29 14:31:29 -0800203Allocation2DData {
Jason Sams326e0dd2009-05-22 14:03:28 -0700204 param RsAllocation va
205 param uint32_t xoff
206 param uint32_t yoff
Jason Sams4b45b892010-12-29 14:31:29 -0800207 param uint32_t lod
208 param RsAllocationCubemapFace face
Jason Sams326e0dd2009-05-22 14:03:28 -0700209 param uint32_t w
210 param uint32_t h
211 param const void *data
212 }
213
Jason Sams4b45b892010-12-29 14:31:29 -0800214Allocation2DElementData {
Jason Sams5f0c84c2010-08-31 13:50:42 -0700215 param RsAllocation va
216 param uint32_t x
217 param uint32_t y
Jason Sams4b45b892010-12-29 14:31:29 -0800218 param uint32_t lod
219 param RsAllocationCubemapFace face
Jason Sams5f0c84c2010-08-31 13:50:42 -0700220 param const void *data
221 param uint32_t element_offset
Jason Sams5f0c84c2010-08-31 13:50:42 -0700222 }
223
Jason Samsa2371512011-01-12 13:28:37 -0800224AllocationGenerateMipmaps {
225 param RsAllocation va
226}
227
Jason Samse579df42009-08-10 14:55:26 -0700228AllocationRead {
229 param RsAllocation va
230 param void * data
231 }
Jason Sams326e0dd2009-05-22 14:03:28 -0700232
Jason Sams366c9c82010-12-08 16:14:36 -0800233AllocationSyncAll {
234 param RsAllocation va
235 param RsAllocationUsageType src
236}
237
Jason Sams326e0dd2009-05-22 14:03:28 -0700238
Jason Sams96abf812010-10-05 13:32:49 -0700239AllocationResize1D {
240 param RsAllocation va
241 param uint32_t dimX
242 }
243
244AllocationResize2D {
245 param RsAllocation va
246 param uint32_t dimX
247 param uint32_t dimY
248 }
249
Jason Sams326e0dd2009-05-22 14:03:28 -0700250SamplerCreate {
Alex Sakhartchoukc2c02a82011-05-04 17:45:36 -0700251 param RsSamplerValue magFilter
252 param RsSamplerValue minFilter
253 param RsSamplerValue wrapS
254 param RsSamplerValue wrapT
255 param RsSamplerValue wrapR
256 param float mAniso
257 ret RsSampler
258}
Jason Sams326e0dd2009-05-22 14:03:28 -0700259
260ScriptBindAllocation {
261 param RsScript vtm
262 param RsAllocation va
263 param uint32_t slot
264 }
265
Jason Samsd34b7252009-08-04 16:58:20 -0700266ScriptSetTimeZone {
267 param RsScript s
Romain Guy98e10fd2009-07-30 18:45:01 -0700268 param const char * timeZone
Romain Guy98e10fd2009-07-30 18:45:01 -0700269 }
270
Jason Sams8c6bc692009-09-16 15:04:38 -0700271ScriptInvoke {
272 param RsScript s
273 param uint32_t slot
274 }
275
Jason Samsbe36bf32010-05-11 14:03:58 -0700276ScriptInvokeV {
277 param RsScript s
278 param uint32_t slot
279 param const void * data
Jason Samsbe36bf32010-05-11 14:03:58 -0700280 }
281
Alex Sakhartchoukc2c02a82011-05-04 17:45:36 -0700282ScriptForEach {
Jason Sams5fb1aeb2011-04-27 15:12:49 -0700283 param RsScript s
284 param uint32_t slot
285 param RsAllocation ain
286 param RsAllocation aout
287 param const void * usr
288}
289
Jason Samsbe36bf32010-05-11 14:03:58 -0700290ScriptSetVarI {
291 param RsScript s
292 param uint32_t slot
293 param int value
294 }
295
Jason Samsa5eb6e12010-11-16 17:37:02 -0800296ScriptSetVarObj {
297 param RsScript s
298 param uint32_t slot
299 param RsObjectBase value
300 }
301
Stephen Hines0977c942010-10-11 10:54:21 -0700302ScriptSetVarJ {
303 param RsScript s
304 param uint32_t slot
305 param int64_t value
306 }
307
Jason Samsbe36bf32010-05-11 14:03:58 -0700308ScriptSetVarF {
309 param RsScript s
310 param uint32_t slot
311 param float value
312 }
313
Stephen Hines6d0a0742010-09-20 17:20:30 -0700314ScriptSetVarD {
315 param RsScript s
316 param uint32_t slot
317 param double value
318 }
319
Jason Samsbe36bf32010-05-11 14:03:58 -0700320ScriptSetVarV {
321 param RsScript s
322 param uint32_t slot
323 param const void * data
Jason Samsbe36bf32010-05-11 14:03:58 -0700324 }
Jason Samsfa517192009-08-13 12:59:04 -0700325
326
Jason Sams326e0dd2009-05-22 14:03:28 -0700327ScriptCCreate {
Shih-wei Liao9503b662010-11-08 01:33:59 -0800328 param const char * resName
Shih-wei Liao15849d92010-12-10 01:03:59 -0800329 param const char * cacheDir
Jason Samsbad80742011-03-16 16:29:28 -0700330 param const char * text
Jason Sams326e0dd2009-05-22 14:03:28 -0700331 ret RsScript
332 }
333
334
Jason Sams721acc42011-04-06 11:23:54 -0700335ProgramStoreCreate {
336 param bool colorMaskR
337 param bool colorMaskG
338 param bool colorMaskB
339 param bool colorMaskA
340 param bool depthMask
341 param bool ditherEnable
Jason Sams326e0dd2009-05-22 14:03:28 -0700342 param RsBlendSrcFunc srcFunc
343 param RsBlendDstFunc destFunc
Jason Sams721acc42011-04-06 11:23:54 -0700344 param RsDepthFunc depthFunc
Jason Samsccc010b2010-05-13 18:30:11 -0700345 ret RsProgramStore
Jason Sams326e0dd2009-05-22 14:03:28 -0700346 }
347
Jason Sams5fd09d82009-09-23 13:57:02 -0700348ProgramRasterCreate {
Jason Sams5fd09d82009-09-23 13:57:02 -0700349 param bool pointSmooth
350 param bool lineSmooth
351 param bool pointSprite
Jason Sams721acc42011-04-06 11:23:54 -0700352 param float lineWidth
353 param RsCullMode cull
Jason Sams5fd09d82009-09-23 13:57:02 -0700354 ret RsProgramRaster
355}
356
Jason Sams4815c0d2009-12-15 12:58:36 -0800357ProgramBindConstants {
358 param RsProgram vp
359 param uint32_t slot
360 param RsAllocation constants
361 }
362
Jason Sams326e0dd2009-05-22 14:03:28 -0700363
Jason Sams7dad9c32009-12-17 16:55:08 -0800364ProgramBindTexture {
Jason Sams326e0dd2009-05-22 14:03:28 -0700365 param RsProgramFragment pf
366 param uint32_t slot
367 param RsAllocation a
368 }
369
Jason Sams7dad9c32009-12-17 16:55:08 -0800370ProgramBindSampler {
Jason Sams326e0dd2009-05-22 14:03:28 -0700371 param RsProgramFragment pf
372 param uint32_t slot
373 param RsSampler s
374 }
375
Jason Sams326e0dd2009-05-22 14:03:28 -0700376ProgramFragmentCreate {
Jason Samsf2e4fa22009-12-15 13:27:04 -0800377 param const char * shaderText
Jason Samsf2e4fa22009-12-15 13:27:04 -0800378 param const uint32_t * params
Jason Samsf2e4fa22009-12-15 13:27:04 -0800379 ret RsProgramFragment
380 }
381
Jason Sams326e0dd2009-05-22 14:03:28 -0700382ProgramVertexCreate {
Jason Sams4815c0d2009-12-15 12:58:36 -0800383 param const char * shaderText
Jason Sams4815c0d2009-12-15 12:58:36 -0800384 param const uint32_t * params
Jason Samsf2e4fa22009-12-15 13:27:04 -0800385 ret RsProgramVertex
Jason Samsb5909ce2009-07-21 12:20:54 -0700386 }
387
Alex Sakhartchoukd3e0ad42010-06-24 17:15:34 -0700388FontCreateFromFile {
389 param const char *name
Alex Sakhartchoukc17ace22010-12-17 11:41:08 -0800390 param float fontSize
Alex Sakhartchoukd3e0ad42010-06-24 17:15:34 -0700391 param uint32_t dpi
392 ret RsFont
393 }
394
Alex Sakhartchouk5224a272011-01-07 11:12:08 -0800395FontCreateFromMemory {
396 param const char *name
397 param float fontSize
398 param uint32_t dpi
Alex Sakhartchouk70b83c12011-04-06 10:57:51 -0700399 param const void *data
Alex Sakhartchouk5224a272011-01-07 11:12:08 -0800400 ret RsFont
401 }
402
Alex Sakhartchouk4e9a7a82010-07-01 16:14:06 -0700403MeshCreate {
Alex Sakhartchouk9003e562011-05-12 10:38:03 -0700404 param RsAllocation *vtx
405 param RsAllocation *idx
406 param uint32_t *primType
Alex Sakhartchouk4e9a7a82010-07-01 16:14:06 -0700407 ret RsMesh
Alex Sakhartchouk4e9a7a82010-07-01 16:14:06 -0700408 }