Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 1 | |
2 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 3 | ContextBindRootScript { |
4 | param RsScript sampler | ||||
5 | } | ||||
6 | |||||
7 | ContextBindProgramFragmentStore { | ||||
8 | param RsProgramFragmentStore pgm | ||||
9 | } | ||||
10 | |||||
11 | ContextBindProgramFragment { | ||||
12 | param RsProgramFragment pgm | ||||
13 | } | ||||
14 | |||||
15 | ContextBindProgramVertex { | ||||
16 | param RsProgramVertex pgm | ||||
17 | } | ||||
18 | |||||
Joe Onorato | 57b79ce | 2009-08-09 22:57:44 -0700 | [diff] [blame] | 19 | ContextSetDefineF { |
20 | param const char* name | ||||
21 | param float value | ||||
22 | } | ||||
23 | |||||
24 | ContextSetDefineI32 { | ||||
25 | param const char* name | ||||
26 | param int32_t value | ||||
27 | } | ||||
28 | |||||
Jason Sams | a0a1b6f | 2009-06-10 15:04:38 -0700 | [diff] [blame] | 29 | AssignName { |
30 | param void *obj | ||||
31 | param const char *name | ||||
Jason Sams | a4a54e4 | 2009-06-10 18:39:40 -0700 | [diff] [blame] | 32 | param size_t len |
Jason Sams | a0a1b6f | 2009-06-10 15:04:38 -0700 | [diff] [blame] | 33 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 34 | |
Jason Sams | 707aaf3 | 2009-08-18 14:14:24 -0700 | [diff] [blame] | 35 | ObjDestroy { |
36 | param void *obj | ||||
37 | } | ||||
38 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 39 | ElementBegin { |
40 | } | ||||
41 | |||||
42 | ElementAddPredefined { | ||||
43 | param RsElementPredefined predef | ||||
44 | } | ||||
45 | |||||
46 | ElementAdd { | ||||
47 | param RsDataKind dataKind | ||||
48 | param RsDataType dataType | ||||
49 | param bool isNormalized | ||||
50 | param size_t bits | ||||
Jason Sams | 8b2c065 | 2009-08-12 17:54:11 -0700 | [diff] [blame] | 51 | param const char * name |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 52 | } |
53 | |||||
54 | ElementCreate { | ||||
55 | ret RsElement | ||||
56 | } | ||||
57 | |||||
58 | ElementGetPredefined { | ||||
59 | param RsElementPredefined predef | ||||
60 | ret RsElement | ||||
61 | } | ||||
62 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 63 | TypeBegin { |
64 | param RsElement type | ||||
65 | } | ||||
66 | |||||
67 | TypeAdd { | ||||
68 | param RsDimension dim | ||||
69 | param size_t value | ||||
70 | } | ||||
71 | |||||
72 | TypeCreate { | ||||
73 | ret RsType | ||||
74 | } | ||||
75 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 76 | AllocationCreateTyped { |
77 | param RsType type | ||||
78 | ret RsAllocation | ||||
79 | } | ||||
80 | |||||
81 | AllocationCreatePredefSized { | ||||
82 | param RsElementPredefined predef | ||||
83 | param size_t count | ||||
84 | ret RsAllocation | ||||
85 | } | ||||
86 | |||||
87 | AllocationCreateSized { | ||||
88 | param RsElement e | ||||
89 | param size_t count | ||||
90 | ret RsAllocation | ||||
91 | } | ||||
92 | |||||
Jason Sams | 6678e9b | 2009-05-27 14:45:32 -0700 | [diff] [blame] | 93 | AllocationCreateFromFile { |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 94 | param const char *file |
95 | param bool genMips | ||||
96 | ret RsAllocation | ||||
97 | } | ||||
98 | |||||
Jason Sams | 6678e9b | 2009-05-27 14:45:32 -0700 | [diff] [blame] | 99 | AllocationCreateFromBitmap { |
100 | param uint32_t width | ||||
101 | param uint32_t height | ||||
102 | param RsElementPredefined dstFmt | ||||
103 | param RsElementPredefined srcFmt | ||||
104 | param bool genMips | ||||
105 | param const void * data | ||||
106 | ret RsAllocation | ||||
107 | } | ||||
108 | |||||
Jason Sams | c9d43db | 2009-07-28 12:02:16 -0700 | [diff] [blame] | 109 | AllocationCreateFromBitmapBoxed { |
110 | param uint32_t width | ||||
111 | param uint32_t height | ||||
112 | param RsElementPredefined dstFmt | ||||
113 | param RsElementPredefined srcFmt | ||||
114 | param bool genMips | ||||
115 | param const void * data | ||||
116 | ret RsAllocation | ||||
117 | } | ||||
118 | |||||
Jason Sams | 6678e9b | 2009-05-27 14:45:32 -0700 | [diff] [blame] | 119 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 120 | AllocationUploadToTexture { |
121 | param RsAllocation alloc | ||||
122 | param uint32_t baseMipLevel | ||||
123 | } | ||||
124 | |||||
125 | AllocationUploadToBufferObject { | ||||
126 | param RsAllocation alloc | ||||
127 | } | ||||
128 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 129 | |
130 | AllocationData { | ||||
131 | param RsAllocation va | ||||
132 | param const void * data | ||||
Jason Sams | d34b725 | 2009-08-04 16:58:20 -0700 | [diff] [blame] | 133 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 134 | |
135 | Allocation1DSubData { | ||||
136 | param RsAllocation va | ||||
137 | param uint32_t xoff | ||||
138 | param uint32_t count | ||||
139 | param const void *data | ||||
Jason Sams | d34b725 | 2009-08-04 16:58:20 -0700 | [diff] [blame] | 140 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 141 | |
142 | Allocation2DSubData { | ||||
143 | param RsAllocation va | ||||
144 | param uint32_t xoff | ||||
145 | param uint32_t yoff | ||||
146 | param uint32_t w | ||||
147 | param uint32_t h | ||||
148 | param const void *data | ||||
149 | } | ||||
150 | |||||
Jason Sams | e579df4 | 2009-08-10 14:55:26 -0700 | [diff] [blame] | 151 | AllocationRead { |
152 | param RsAllocation va | ||||
153 | param void * data | ||||
154 | } | ||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 155 | |
156 | Adapter1DCreate { | ||||
157 | ret RsAdapter1D | ||||
158 | } | ||||
159 | |||||
160 | Adapter1DBindAllocation { | ||||
161 | param RsAdapter1D adapt | ||||
162 | param RsAllocation alloc | ||||
163 | } | ||||
164 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 165 | Adapter1DSetConstraint { |
166 | param RsAdapter1D adapter | ||||
167 | param RsDimension dim | ||||
168 | param uint32_t value | ||||
169 | } | ||||
170 | |||||
171 | Adapter1DData { | ||||
172 | param RsAdapter1D adapter | ||||
173 | param const void * data | ||||
Jason Sams | d34b725 | 2009-08-04 16:58:20 -0700 | [diff] [blame] | 174 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 175 | |
176 | Adapter1DSubData { | ||||
177 | param RsAdapter1D adapter | ||||
178 | param uint32_t xoff | ||||
179 | param uint32_t count | ||||
180 | param const void *data | ||||
Jason Sams | d34b725 | 2009-08-04 16:58:20 -0700 | [diff] [blame] | 181 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 182 | |
183 | Adapter2DCreate { | ||||
184 | ret RsAdapter2D | ||||
185 | } | ||||
186 | |||||
187 | Adapter2DBindAllocation { | ||||
188 | param RsAdapter2D adapt | ||||
189 | param RsAllocation alloc | ||||
190 | } | ||||
191 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 192 | Adapter2DSetConstraint { |
193 | param RsAdapter2D adapter | ||||
194 | param RsDimension dim | ||||
195 | param uint32_t value | ||||
196 | } | ||||
197 | |||||
198 | Adapter2DData { | ||||
199 | param RsAdapter2D adapter | ||||
200 | param const void *data | ||||
Jason Sams | d34b725 | 2009-08-04 16:58:20 -0700 | [diff] [blame] | 201 | } |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 202 | |
203 | Adapter2DSubData { | ||||
204 | param RsAdapter2D adapter | ||||
205 | param uint32_t xoff | ||||
206 | param uint32_t yoff | ||||
207 | param uint32_t w | ||||
208 | param uint32_t h | ||||
209 | param const void *data | ||||
210 | } | ||||
211 | |||||
212 | SamplerBegin { | ||||
213 | } | ||||
214 | |||||
215 | SamplerSet { | ||||
216 | param RsSamplerParam p | ||||
217 | param RsSamplerValue value | ||||
218 | } | ||||
219 | |||||
220 | SamplerCreate { | ||||
221 | ret RsSampler | ||||
222 | } | ||||
223 | |||||
224 | |||||
225 | TriangleMeshBegin { | ||||
226 | param RsElement vertex | ||||
227 | param RsElement index | ||||
228 | } | ||||
229 | |||||
230 | TriangleMeshAddVertex { | ||||
231 | param const void *vtx | ||||
232 | } | ||||
233 | |||||
234 | TriangleMeshAddTriangle { | ||||
235 | param uint32_t idx1 | ||||
236 | param uint32_t idx2 | ||||
237 | param uint32_t idx3 | ||||
238 | } | ||||
239 | |||||
240 | TriangleMeshCreate { | ||||
241 | ret RsTriangleMesh | ||||
242 | } | ||||
243 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 244 | |
245 | TriangleMeshRender { | ||||
246 | param RsTriangleMesh vtm | ||||
247 | } | ||||
248 | |||||
249 | TriangleMeshRenderRange { | ||||
250 | param RsTriangleMesh vtm | ||||
251 | param uint32_t start | ||||
252 | param uint32_t count | ||||
253 | } | ||||
254 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 255 | |
256 | ScriptBindAllocation { | ||||
257 | param RsScript vtm | ||||
258 | param RsAllocation va | ||||
259 | param uint32_t slot | ||||
260 | } | ||||
261 | |||||
262 | |||||
263 | ScriptCBegin { | ||||
264 | } | ||||
265 | |||||
Jason Sams | d34b725 | 2009-08-04 16:58:20 -0700 | [diff] [blame] | 266 | ScriptSetClearColor { |
267 | param RsScript s | ||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 268 | param float r |
269 | param float g | ||||
270 | param float b | ||||
271 | param float a | ||||
272 | } | ||||
273 | |||||
Jason Sams | d34b725 | 2009-08-04 16:58:20 -0700 | [diff] [blame] | 274 | ScriptSetTimeZone { |
275 | param RsScript s | ||||
Romain Guy | 98e10fd | 2009-07-30 18:45:01 -0700 | [diff] [blame] | 276 | param const char * timeZone |
277 | param uint32_t length | ||||
278 | } | ||||
279 | |||||
Jason Sams | d34b725 | 2009-08-04 16:58:20 -0700 | [diff] [blame] | 280 | ScriptSetClearDepth { |
281 | param RsScript s | ||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 282 | param float depth |
283 | } | ||||
284 | |||||
Jason Sams | d34b725 | 2009-08-04 16:58:20 -0700 | [diff] [blame] | 285 | ScriptSetClearStencil { |
286 | param RsScript s | ||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 287 | param uint32_t stencil |
288 | } | ||||
289 | |||||
Jason Sams | fa51719 | 2009-08-13 12:59:04 -0700 | [diff] [blame] | 290 | ScriptSetType { |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 291 | param RsType type |
Jason Sams | fa51719 | 2009-08-13 12:59:04 -0700 | [diff] [blame] | 292 | param uint32_t slot |
Jason Sams | 90b36a8 | 2009-08-17 13:56:09 -0700 | [diff] [blame] | 293 | param bool isWritable |
Jason Sams | fa51719 | 2009-08-13 12:59:04 -0700 | [diff] [blame] | 294 | param const char * name |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 295 | } |
296 | |||||
Jason Sams | fa51719 | 2009-08-13 12:59:04 -0700 | [diff] [blame] | 297 | ScriptSetRoot { |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 298 | param bool isRoot |
299 | } | ||||
300 | |||||
Jason Sams | fa51719 | 2009-08-13 12:59:04 -0700 | [diff] [blame] | 301 | |
302 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 303 | ScriptCSetScript { |
Jack Palevich | 1ef8b80 | 2009-05-28 15:53:04 -0700 | [diff] [blame] | 304 | param void * codePtr |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 305 | } |
306 | |||||
Jason Sams | 1f52633 | 2009-06-05 17:35:09 -0700 | [diff] [blame] | 307 | ScriptCSetText { |
308 | param const char * text | ||||
309 | param uint32_t length | ||||
310 | } | ||||
311 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 312 | ScriptCCreate { |
313 | ret RsScript | ||||
314 | } | ||||
315 | |||||
Joe Onorato | 57b79ce | 2009-08-09 22:57:44 -0700 | [diff] [blame] | 316 | ScriptCSetDefineF { |
317 | param const char* name | ||||
318 | param float value | ||||
319 | } | ||||
320 | |||||
321 | ScriptCSetDefineI32 { | ||||
322 | param const char* name | ||||
323 | param int32_t value | ||||
324 | } | ||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 325 | |
326 | ProgramFragmentStoreBegin { | ||||
327 | param RsElement in | ||||
328 | param RsElement out | ||||
329 | } | ||||
330 | |||||
331 | ProgramFragmentStoreColorMask { | ||||
332 | param bool r | ||||
333 | param bool g | ||||
334 | param bool b | ||||
335 | param bool a | ||||
336 | } | ||||
337 | |||||
338 | ProgramFragmentStoreBlendFunc { | ||||
339 | param RsBlendSrcFunc srcFunc | ||||
340 | param RsBlendDstFunc destFunc | ||||
341 | } | ||||
342 | |||||
343 | ProgramFragmentStoreDepthMask { | ||||
344 | param bool enable | ||||
345 | } | ||||
346 | |||||
347 | ProgramFragmentStoreDither { | ||||
348 | param bool enable | ||||
349 | } | ||||
350 | |||||
351 | ProgramFragmentStoreDepthFunc { | ||||
352 | param RsDepthFunc func | ||||
353 | } | ||||
354 | |||||
355 | ProgramFragmentStoreCreate { | ||||
356 | ret RsProgramFragmentStore | ||||
357 | } | ||||
358 | |||||
359 | |||||
360 | |||||
361 | ProgramFragmentBegin { | ||||
362 | param RsElement in | ||||
363 | param RsElement out | ||||
364 | } | ||||
365 | |||||
366 | ProgramFragmentBindTexture { | ||||
367 | param RsProgramFragment pf | ||||
368 | param uint32_t slot | ||||
369 | param RsAllocation a | ||||
370 | } | ||||
371 | |||||
372 | ProgramFragmentBindSampler { | ||||
373 | param RsProgramFragment pf | ||||
374 | param uint32_t slot | ||||
375 | param RsSampler s | ||||
376 | } | ||||
377 | |||||
378 | ProgramFragmentSetType { | ||||
379 | param uint32_t slot | ||||
380 | param RsType t | ||||
381 | } | ||||
382 | |||||
383 | ProgramFragmentSetEnvMode { | ||||
384 | param uint32_t slot | ||||
385 | param RsTexEnvMode env | ||||
386 | } | ||||
387 | |||||
388 | ProgramFragmentSetTexEnable { | ||||
389 | param uint32_t slot | ||||
390 | param bool enable | ||||
391 | } | ||||
392 | |||||
393 | ProgramFragmentCreate { | ||||
394 | ret RsProgramFragment | ||||
395 | } | ||||
396 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 397 | |
398 | ProgramVertexBegin { | ||||
399 | param RsElement in | ||||
400 | param RsElement out | ||||
401 | } | ||||
402 | |||||
403 | ProgramVertexCreate { | ||||
404 | ret RsProgramVertex | ||||
405 | } | ||||
406 | |||||
407 | ProgramVertexBindAllocation { | ||||
408 | param RsProgramVertex vpgm | ||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 409 | param RsAllocation constants |
410 | } | ||||
411 | |||||
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 412 | ProgramVertexSetTextureMatrixEnable { |
413 | param bool enable | ||||
414 | } | ||||
415 | |||||
Jason Sams | b5909ce | 2009-07-21 12:20:54 -0700 | [diff] [blame] | 416 | ProgramVertexAddLight { |
417 | param RsLight light | ||||
418 | } | ||||
419 | |||||
Jason Sams | 62bc1db | 2009-06-22 15:49:21 -0700 | [diff] [blame] | 420 | LightBegin { |
421 | } | ||||
422 | |||||
423 | LightSetLocal { | ||||
424 | param bool isLocal | ||||
425 | } | ||||
426 | |||||
427 | LightSetMonochromatic { | ||||
428 | param bool isMono | ||||
429 | } | ||||
430 | |||||
431 | LightCreate { | ||||
432 | ret RsLight light | ||||
433 | } | ||||
434 | |||||
Jason Sams | 62bc1db | 2009-06-22 15:49:21 -0700 | [diff] [blame] | 435 | |
436 | LightSetPosition { | ||||
437 | param RsLight light | ||||
438 | param float x | ||||
439 | param float y | ||||
440 | param float z | ||||
441 | } | ||||
442 | |||||
443 | LightSetColor { | ||||
444 | param RsLight light | ||||
445 | param float r | ||||
446 | param float g | ||||
447 | param float b | ||||
448 | } | ||||
449 | |||||
Jason Sams | a5597fc | 2009-07-08 18:01:53 -0700 | [diff] [blame] | 450 | FileOpen { |
451 | ret RsFile | ||||
452 | param const char *name | ||||
453 | param size_t len | ||||
454 | } | ||||
455 | |||||
456 | |||||
Jason Sams | e5ffb87 | 2009-08-09 17:01:55 -0700 | [diff] [blame] | 457 | SimpleMeshCreate { |
458 | ret RsSimpleMesh | ||||
459 | param RsAllocation prim | ||||
460 | param RsAllocation index | ||||
461 | param RsAllocation *vtx | ||||
462 | param uint32_t vtxCount | ||||
463 | param uint32_t primType | ||||
464 | } | ||||
465 | |||||
Jason Sams | e5ffb87 | 2009-08-09 17:01:55 -0700 | [diff] [blame] | 466 | |
467 | SimpleMeshBindIndex { | ||||
468 | param RsSimpleMesh mesh | ||||
469 | param RsAllocation idx | ||||
470 | } | ||||
471 | |||||
472 | SimpleMeshBindPrimitive { | ||||
473 | param RsSimpleMesh mesh | ||||
474 | param RsAllocation prim | ||||
475 | } | ||||
476 | |||||
477 | SimpleMeshBindVertex { | ||||
478 | param RsSimpleMesh mesh | ||||
479 | param RsAllocation vtx | ||||
480 | param uint32_t slot | ||||
481 | } | ||||
482 |