1 /****************************************************************************
3 * Copyright (C) 2005 - 2011 by Vivante Corp.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the license, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 *****************************************************************************/
25 ** Include file the defines the front- and back-end compilers, as well as the
29 #ifndef __gc_hal_compiler_h_
30 #define __gc_hal_compiler_h_
33 #include "gc_hal_types.h"
34 #include "gc_hal_engine.h"
40 /******************************* IR VERSION ******************/
41 #define gcdSL_IR_VERSION gcmCC('\0','\0','\0','\1')
43 /******************************************************************************\
44 |******************************* SHADER LANGUAGE ******************************|
45 \******************************************************************************/
47 /* Possible shader language opcodes. */
48 typedef enum _gcSL_OPCODE
62 gcSL_TEXLD
, /* 0x0C */
72 gcSL_FLOOR
, /* 0x16 */
74 gcSL_CROSS
, /* 0x18 */
75 gcSL_TEXLDP
, /* 0x19 */
76 gcSL_TEXBIAS
, /* 0x1A */
77 gcSL_TEXGRAD
, /* 0x1B */
78 gcSL_TEXLOD
, /* 0x1C */
92 gcSL_FWIDTH
, /* 0x2A */
95 gcSL_AND_BITWISE
, /* 0x2D */
96 gcSL_OR_BITWISE
, /* 0x2E */
97 gcSL_XOR_BITWISE
, /* 0x2F */
98 gcSL_NOT_BITWISE
, /* 0x30 */
99 gcSL_LSHIFT
, /* 0x31 */
100 gcSL_RSHIFT
, /* 0x32 */
101 gcSL_ROTATE
, /* 0x33 */
102 gcSL_BITSEL
, /* 0x34 */
103 gcSL_LEADZERO
, /* 0x35 */
104 gcSL_LOAD
, /* 0x36 */
105 gcSL_STORE
, /* 0x37 */
106 gcSL_BARRIER
, /* 0x38 */
107 gcSL_SIN_CL
, /* 0x39 */
108 gcSL_COS_CL
, /* 0x3A */
109 gcSL_TAN_CL
, /* 0x3B */
110 gcSL_ACOS_CL
, /* 0x3C */
111 gcSL_ASIN_CL
, /* 0x3D */
112 gcSL_ATAN_CL
, /* 0x3E */
113 gcSL_SINH_CL
, /* 0x3F */
114 gcSL_COSH_CL
, /* 0x40 */
115 gcSL_TANH_CL
, /* 0x41 */
116 gcSL_ASINH_CL
, /* 0x42 */
117 gcSL_ACOSH_CL
, /* 0x43 */
118 gcSL_ATANH_CL
, /* 0x44 */
119 gcSL_SINPI_CL
, /* 0x45 */
120 gcSL_COSPI_CL
, /* 0x46 */
121 gcSL_TANPI_CL
, /* 0x47 */
122 gcSL_ASINPI_CL
, /* 0x48 */
123 gcSL_ACOSPI_CL
, /* 0x49 */
124 gcSL_ATANPI_CL
, /* 0x4A */
125 gcSL_ATAN2_CL
, /* 0x4B */
126 gcSL_ATAN2PI_CL
, /* 0x4C */
127 gcSL_POW_CL
, /* 0x4D */
128 gcSL_RSQ_CL
, /* 0x4E */
129 gcSL_LOG_CL
, /* 0x4F */
130 gcSL_EXP_CL
, /* 0x50 */
131 gcSL_SQRT_CL
, /* 0x51 */
132 gcSL_CBRT_CL
, /* 0x52 */
133 gcSL_ADDLO
, /* 0x53 */ /* Float only. */
134 gcSL_MULLO
, /* 0x54 */ /* Float only. */
135 gcSL_CONV
, /* 0x55 */
136 gcSL_GETEXP
, /* 0x56 */
137 gcSL_GETMANT
, /* 0x57 */
138 gcSL_MULHI
, /* 0x58 */ /* Integer only. */
142 gcSL_ADDSAT
, /* 0x5C */ /* Integer only. */
143 gcSL_SUBSAT
, /* 0x5D */ /* Integer only. */
144 gcSL_MULSAT
, /* 0x5E */ /* Integer only. */
148 typedef enum _gcSL_FORMAT
150 gcSL_FLOAT
= 0, /* 0 */
151 gcSL_INTEGER
= 1, /* 1 */
152 gcSL_INT32
= 1, /* 1 */
153 gcSL_BOOLEAN
= 2, /* 2 */
154 gcSL_UINT32
= 3, /* 3 */
159 gcSL_INT64
, /* 8 */ /* Reserved for future enhancement. */
160 gcSL_UINT64
, /* 9 */ /* Reserved for future enhancement. */
161 gcSL_INT128
, /* 10 */ /* Reserved for future enhancement. */
162 gcSL_UINT128
, /* 11 */ /* Reserved for future enhancement. */
163 gcSL_FLOAT16
, /* 12 */
164 gcSL_FLOAT64
, /* 13 */ /* Reserved for future enhancement. */
165 gcSL_FLOAT128
, /* 14 */ /* Reserved for future enhancement. */
169 /* Destination write enable bits. */
170 typedef enum _gcSL_ENABLE
177 gcSL_ENABLE_XY
= gcSL_ENABLE_X
| gcSL_ENABLE_Y
,
178 gcSL_ENABLE_XYZ
= gcSL_ENABLE_X
| gcSL_ENABLE_Y
| gcSL_ENABLE_Z
,
179 gcSL_ENABLE_XYZW
= gcSL_ENABLE_X
| gcSL_ENABLE_Y
| gcSL_ENABLE_Z
| gcSL_ENABLE_W
,
180 gcSL_ENABLE_XYW
= gcSL_ENABLE_X
| gcSL_ENABLE_Y
| gcSL_ENABLE_W
,
181 gcSL_ENABLE_XZ
= gcSL_ENABLE_X
| gcSL_ENABLE_Z
,
182 gcSL_ENABLE_XZW
= gcSL_ENABLE_X
| gcSL_ENABLE_Z
| gcSL_ENABLE_W
,
183 gcSL_ENABLE_XW
= gcSL_ENABLE_X
| gcSL_ENABLE_W
,
184 gcSL_ENABLE_YZ
= gcSL_ENABLE_Y
| gcSL_ENABLE_Z
,
185 gcSL_ENABLE_YZW
= gcSL_ENABLE_Y
| gcSL_ENABLE_Z
| gcSL_ENABLE_W
,
186 gcSL_ENABLE_YW
= gcSL_ENABLE_Y
| gcSL_ENABLE_W
,
187 gcSL_ENABLE_ZW
= gcSL_ENABLE_Z
| gcSL_ENABLE_W
,
191 /* Possible indices. */
192 typedef enum _gcSL_INDEXED
194 gcSL_NOT_INDEXED
, /* 0 */
195 gcSL_INDEXED_X
, /* 1 */
196 gcSL_INDEXED_Y
, /* 2 */
197 gcSL_INDEXED_Z
, /* 3 */
198 gcSL_INDEXED_W
, /* 4 */
202 /* Opcode conditions. */
203 typedef enum _gcSL_CONDITION
205 gcSL_ALWAYS
, /* 0x0 */
206 gcSL_NOT_EQUAL
, /* 0x1 */
207 gcSL_LESS_OR_EQUAL
, /* 0x2 */
209 gcSL_EQUAL
, /* 0x4 */
210 gcSL_GREATER
, /* 0x5 */
211 gcSL_GREATER_OR_EQUAL
, /* 0x6 */
215 gcSL_NOT_ZERO
, /* 0xA */
219 /* Possible source operand types. */
220 typedef enum _gcSL_TYPE
224 gcSL_ATTRIBUTE
, /* 0x2 */
225 gcSL_UNIFORM
, /* 0x3 */
226 gcSL_SAMPLER
, /* 0x4 */
227 gcSL_CONSTANT
, /* 0x5 */
228 gcSL_OUTPUT
, /* 0x6 */
229 gcSL_PHYSICAL
, /* 0x7 */
233 /* Swizzle generator macro. */
234 #define gcmSWIZZLE(Component1, Component2, Component3, Component4) \
236 (gcSL_SWIZZLE_ ## Component1 << 0) | \
237 (gcSL_SWIZZLE_ ## Component2 << 2) | \
238 (gcSL_SWIZZLE_ ## Component3 << 4) | \
239 (gcSL_SWIZZLE_ ## Component4 << 6) \
242 /* Possible swizzle values. */
243 typedef enum _gcSL_SWIZZLE
245 gcSL_SWIZZLE_X
, /* 0x0 */
246 gcSL_SWIZZLE_Y
, /* 0x1 */
247 gcSL_SWIZZLE_Z
, /* 0x2 */
248 gcSL_SWIZZLE_W
, /* 0x3 */
250 gcSL_SWIZZLE_XXXX
= gcmSWIZZLE(X
, X
, X
, X
),
251 gcSL_SWIZZLE_YYYY
= gcmSWIZZLE(Y
, Y
, Y
, Y
),
252 gcSL_SWIZZLE_ZZZZ
= gcmSWIZZLE(Z
, Z
, Z
, Z
),
253 gcSL_SWIZZLE_WWWW
= gcmSWIZZLE(W
, W
, W
, W
),
254 gcSL_SWIZZLE_XYYY
= gcmSWIZZLE(X
, Y
, Y
, Y
),
255 gcSL_SWIZZLE_XZZZ
= gcmSWIZZLE(X
, Z
, Z
, Z
),
256 gcSL_SWIZZLE_XWWW
= gcmSWIZZLE(X
, W
, W
, W
),
257 gcSL_SWIZZLE_YZZZ
= gcmSWIZZLE(Y
, Z
, Z
, Z
),
258 gcSL_SWIZZLE_YWWW
= gcmSWIZZLE(Y
, W
, W
, W
),
259 gcSL_SWIZZLE_ZWWW
= gcmSWIZZLE(Z
, W
, W
, W
),
260 gcSL_SWIZZLE_XYZZ
= gcmSWIZZLE(X
, Y
, Z
, Z
),
261 gcSL_SWIZZLE_XYWW
= gcmSWIZZLE(X
, Y
, W
, W
),
262 gcSL_SWIZZLE_XZWW
= gcmSWIZZLE(X
, Z
, W
, W
),
263 gcSL_SWIZZLE_YZWW
= gcmSWIZZLE(Y
, Z
, W
, W
),
264 gcSL_SWIZZLE_XXYZ
= gcmSWIZZLE(X
, X
, Y
, Z
),
265 gcSL_SWIZZLE_XYZW
= gcmSWIZZLE(X
, Y
, Z
, W
),
266 gcSL_SWIZZLE_XYXY
= gcmSWIZZLE(X
, Y
, X
, Y
),
268 gcSL_SWIZZLE_INVALID
= 0x7FFFFFFF
273 /******************************************************************************\
274 |*********************************** SHADERS **********************************|
275 \******************************************************************************/
278 #define gcSHADER_TYPE_UNKNOWN 0
279 #define gcSHADER_TYPE_VERTEX 1
280 #define gcSHADER_TYPE_FRAGMENT 2
281 #define gcSHADER_TYPE_CL 3
282 #define gcSHADER_TYPE_PRECOMPILED 4
285 /* gcSHADER objects. */
286 typedef struct _gcSHADER
* gcSHADER
;
287 typedef struct _gcATTRIBUTE
* gcATTRIBUTE
;
288 typedef struct _gcUNIFORM
* gcUNIFORM
;
289 typedef struct _gcOUTPUT
* gcOUTPUT
;
290 typedef struct _gcsFUNCTION
* gcFUNCTION
;
291 typedef struct _gcsKERNEL_FUNCTION
* gcKERNEL_FUNCTION
;
292 typedef struct _gcsHINT
* gcsHINT_PTR
;
293 typedef struct _gcSHADER_PROFILER
* gcSHADER_PROFILER
;
294 typedef struct _gcVARIABLE
* gcVARIABLE
;
298 /* Numbr of data transfers for Vertex Shader output. */
299 gctUINT32 vsOutputCount
;
301 /* Flag whether the VS has point size or not. */
302 gctBOOL vsHasPointSize
;
305 gctUINT32 elementCount
;
307 /* Component count. */
308 gctUINT32 componentCount
;
310 /* Number of data transfers for Fragment Shader input. */
311 gctUINT32 fsInputCount
;
313 /* Maximum number of temporary registers used in FS. */
316 /* Maximum number of temporary registers used in VS. */
319 /* Balance minimum. */
320 gctUINT32 balanceMin
;
322 /* Balance maximum. */
323 gctUINT32 balanceMax
;
325 /* Flag whether the PS outputs the depth value or not. */
326 gctBOOL psHasFragDepthOut
;
328 /* Flag whether the ThreadWalker is in PS. */
329 gctBOOL threadWalkerInPS
;
333 /* gcSHADER_TYPE enumeration. */
334 typedef enum _gcSHADER_TYPE
336 gcSHADER_FLOAT_X1
, /* 0x00 */
337 gcSHADER_FLOAT_X2
, /* 0x01 */
338 gcSHADER_FLOAT_X3
, /* 0x02 */
339 gcSHADER_FLOAT_X4
, /* 0x03 */
340 gcSHADER_FLOAT_2X2
, /* 0x04 */
341 gcSHADER_FLOAT_3X3
, /* 0x05 */
342 gcSHADER_FLOAT_4X4
, /* 0x06 */
343 gcSHADER_BOOLEAN_X1
, /* 0x07 */
344 gcSHADER_BOOLEAN_X2
, /* 0x08 */
345 gcSHADER_BOOLEAN_X3
, /* 0x09 */
346 gcSHADER_BOOLEAN_X4
, /* 0x0A */
347 gcSHADER_INTEGER_X1
, /* 0x0B */
348 gcSHADER_INTEGER_X2
, /* 0x0C */
349 gcSHADER_INTEGER_X3
, /* 0x0D */
350 gcSHADER_INTEGER_X4
, /* 0x0E */
351 gcSHADER_SAMPLER_1D
, /* 0x0F */
352 gcSHADER_SAMPLER_2D
, /* 0x10 */
353 gcSHADER_SAMPLER_3D
, /* 0x11 */
354 gcSHADER_SAMPLER_CUBIC
, /* 0x12 */
355 gcSHADER_FIXED_X1
, /* 0x13 */
356 gcSHADER_FIXED_X2
, /* 0x14 */
357 gcSHADER_FIXED_X3
, /* 0x15 */
358 gcSHADER_FIXED_X4
, /* 0x16 */
359 gcSHADER_IMAGE_2D
, /* 0x17 */ /* For OCL. */
360 gcSHADER_IMAGE_3D
, /* 0x18 */ /* For OCL. */
361 gcSHADER_SAMPLER
, /* 0x19 */ /* For OCL. */
362 gcSHADER_FLOAT_2X3
, /* 0x1A */
363 gcSHADER_FLOAT_2X4
, /* 0x1B */
364 gcSHADER_FLOAT_3X2
, /* 0x1C */
365 gcSHADER_FLOAT_3X4
, /* 0x1D */
366 gcSHADER_FLOAT_4X2
, /* 0x1E */
367 gcSHADER_FLOAT_4X3
, /* 0x1F */
368 gcSHADER_ISAMPLER_2D
, /* 0x20 */
369 gcSHADER_ISAMPLER_3D
, /* 0x21 */
370 gcSHADER_ISAMPLER_CUBIC
, /* 0x22 */
371 gcSHADER_USAMPLER_2D
, /* 0x23 */
372 gcSHADER_USAMPLER_3D
, /* 0x24 */
373 gcSHADER_USAMPLER_CUBIC
, /* 0x25 */
374 gcSHADER_SAMPLER_EXTERNAL_OES
, /* 0x26 */
380 typedef enum _gceSHADER_FLAGS
382 gcvSHADER_DEAD_CODE
= 0x01,
383 gcvSHADER_RESOURCE_USAGE
= 0x02,
384 gcvSHADER_OPTIMIZER
= 0x04,
385 gcvSHADER_USE_GL_Z
= 0x08,
386 gcvSHADER_USE_GL_POSITION
= 0x10,
387 gcvSHADER_USE_GL_FACE
= 0x20,
388 gcvSHADER_USE_GL_POINT_COORD
= 0x40,
392 /* Function argument qualifier */
393 typedef enum _gceINPUT_OUTPUT
401 /* Kernel function property flags. */
402 typedef enum _gcePROPERTY_FLAGS
404 gcvPROPERTY_REQD_WORK_GRP_SIZE
= 0x01
406 gceKERNEL_FUNCTION_PROPERTY_FLAGS
;
409 typedef enum _gceUNIFORM_FLAGS
411 gcvUNIFORM_KERNEL_ARG
= 0x01,
412 gcvUNIFORM_KERNEL_ARG_LOCAL
= 0x02,
413 gcvUNIFORM_KERNEL_ARG_SAMPLER
= 0x04,
414 gcvUNIFORM_LOCAL_ADDRESS_SPACE
= 0x08,
415 gcvUNIFORM_PRIVATE_ADDRESS_SPACE
= 0x10,
416 gcvUNIFORM_CONSTANT_ADDRESS_SPACE
= 0x20,
417 gcvUNIFORM_GLOBAL_SIZE
= 0x40,
418 gcvUNIFORM_LOCAL_SIZE
= 0x80,
419 gcvUNIFORM_NUM_GROUPS
= 0x100,
420 gcvUNIFORM_GLOBAL_OFFSET
= 0x200,
421 gcvUNIFORM_WORK_DIM
= 0x400,
422 gcvUNIFORM_KERNEL_ARG_CONSTANT
= 0x800,
426 #define gcdUNIFORM_KERNEL_ARG_MASK (gcvUNIFORM_KERNEL_ARG | \
427 gcvUNIFORM_KERNEL_ARG_LOCAL | \
428 gcvUNIFORM_KERNEL_ARG_SAMPLER | \
429 gcvUNIFORM_KERNEL_ARG_CONSTANT)
431 /*******************************************************************************
432 ** gcSHADER_SetCompilerVersion
434 ** Set the compiler version of a gcSHADER object.
439 ** Pointer to gcSHADER object
442 ** Pointer to a two word version
445 gcSHADER_SetCompilerVersion(
447 IN gctUINT32
*Version
450 /*******************************************************************************
451 ** gcSHADER_GetCompilerVersion
453 ** Get the compiler version of a gcSHADER object.
458 ** Pointer to a gcSHADER object.
462 ** gctUINT32_PTR *CompilerVersion.
463 ** Pointer to holder of returned compilerVersion pointer
466 gcSHADER_GetCompilerVersion(
468 OUT gctUINT32_PTR
*CompilerVersion
471 /*******************************************************************************
474 ** Get the gcSHADER object's type.
479 ** Pointer to a gcSHADER object.
484 ** Pointer to return shader type.
491 /*******************************************************************************
492 ** gcSHADER_Construct
493 ********************************************************************************
495 ** Construct a new gcSHADER object.
500 ** Pointer to an gcoHAL object.
503 ** Type of gcSHADER object to cerate. 'ShaderType' can be one of the
506 ** gcSHADER_TYPE_VERTEX Vertex shader.
507 ** gcSHADER_TYPE_FRAGMENT Fragment shader.
512 ** Pointer to a variable receiving the gcSHADER object pointer.
517 IN gctINT ShaderType
,
518 OUT gcSHADER
* Shader
521 /*******************************************************************************
523 ********************************************************************************
525 ** Destroy a gcSHADER object.
530 ** Pointer to a gcSHADER object.
541 /*******************************************************************************
543 ********************************************************************************
545 ** Copy a gcSHADER object.
550 ** Pointer to a gcSHADER object.
553 ** Pointer to a gcSHADER object that will be copied.
565 /*******************************************************************************
566 ** gcSHADER_LoadHeader
568 ** Load a gcSHADER object from a binary buffer. The binary buffer is layed out
570 ** // Six word header
571 ** // Signature, must be 'S','H','D','R'.
572 ** gctINT8 signature[4];
573 ** gctUINT32 binFileVersion;
574 ** gctUINT32 compilerVersion[2];
575 ** gctUINT32 gcSLVersion;
576 ** gctUINT32 binarySize;
581 ** Pointer to a gcSHADER object.
582 ** Shader type will be returned if type in shader object is not gcSHADER_TYPE_PRECOMPILED
585 ** Pointer to a binary buffer containing the shader data to load.
587 ** gctSIZE_T BufferSize
588 ** Number of bytes inside the binary buffer pointed to by 'Buffer'.
597 IN gctPOINTER Buffer
,
598 IN gctSIZE_T BufferSize
601 /*******************************************************************************
602 ** gcSHADER_LoadKernel
604 ** Load a kernel function given by name into gcSHADER object
609 ** Pointer to a gcSHADER object.
611 ** gctSTRING KernelName
612 ** Pointer to a kernel function name
621 IN gctSTRING KernelName
624 /*******************************************************************************
626 ********************************************************************************
628 ** Load a gcSHADER object from a binary buffer.
633 ** Pointer to a gcSHADER object.
636 ** Pointer to a binary buffer containg the shader data to load.
638 ** gctSIZE_T BufferSize
639 ** Number of bytes inside the binary buffer pointed to by 'Buffer'.
648 IN gctPOINTER Buffer
,
649 IN gctSIZE_T BufferSize
652 /*******************************************************************************
654 ********************************************************************************
656 ** Save a gcSHADER object to a binary buffer.
661 ** Pointer to a gcSHADER object.
664 ** Pointer to a binary buffer to be used as storage for the gcSHADER
665 ** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
666 ** but the number of bytes required to hold the binary output for the
667 ** gcSHADER object will be returned.
669 ** gctSIZE_T * BufferSize
670 ** Pointer to a variable holding the number of bytes allocated in
671 ** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
675 ** gctSIZE_T * BufferSize
676 ** Pointer to a variable receiving the number of bytes required to hold
677 ** the binary form of the gcSHADER object.
682 IN gctPOINTER Buffer
,
683 IN OUT gctSIZE_T
* BufferSize
686 /*******************************************************************************
688 ********************************************************************************
690 ** Load a gcSHADER object from a binary buffer.
695 ** Pointer to a gcSHADER object.
698 ** Pointer to a binary buffer containg the shader data to load.
700 ** gctSIZE_T BufferSize
701 ** Number of bytes inside the binary buffer pointed to by 'Buffer'.
710 IN gctPOINTER Buffer
,
711 IN gctSIZE_T BufferSize
714 /*******************************************************************************
716 ********************************************************************************
718 ** Save a gcSHADER object to a binary buffer.
723 ** Pointer to a gcSHADER object.
726 ** Pointer to a binary buffer to be used as storage for the gcSHADER
727 ** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
728 ** but the number of bytes required to hold the binary output for the
729 ** gcSHADER object will be returned.
731 ** gctSIZE_T * BufferSize
732 ** Pointer to a variable holding the number of bytes allocated in
733 ** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
737 ** gctSIZE_T * BufferSize
738 ** Pointer to a variable receiving the number of bytes required to hold
739 ** the binary form of the gcSHADER object.
744 IN gctPOINTER Buffer
,
745 IN OUT gctSIZE_T
* BufferSize
748 /*******************************************************************************
749 ** gcSHADER_ReallocateAttributes
751 ** Reallocate an array of pointers to gcATTRIBUTE objects.
756 ** Pointer to a gcSHADER object.
759 ** Array count to reallocate. 'Count' must be at least 1.
762 gcSHADER_ReallocateAttributes(
767 /*******************************************************************************
768 ** gcSHADER_AddAttribute
769 ********************************************************************************
771 ** Add an attribute to a gcSHADER object.
776 ** Pointer to a gcSHADER object.
778 ** gctCONST_STRING Name
779 ** Name of the attribute to add.
781 ** gcSHADER_TYPE Type
782 ** Type of the attribute to add.
785 ** Array length of the attribute to add. 'Length' must be at least 1.
788 ** gcvTRUE if the attribute is used as a texture coordinate, gcvFALSE if not.
792 ** gcATTRIBUTE * Attribute
793 ** Pointer to a variable receiving the gcATTRIBUTE object pointer.
796 gcSHADER_AddAttribute(
798 IN gctCONST_STRING Name
,
799 IN gcSHADER_TYPE Type
,
801 IN gctBOOL IsTexture
,
802 OUT gcATTRIBUTE
* Attribute
805 /*******************************************************************************
806 ** gcSHADER_GetAttributeCount
807 ********************************************************************************
809 ** Get the number of attributes for this shader.
814 ** Pointer to a gcSHADER object.
819 ** Pointer to a variable receiving the number of attributes.
822 gcSHADER_GetAttributeCount(
824 OUT gctSIZE_T
* Count
827 /*******************************************************************************
828 ** gcSHADER_GetAttribute
829 ********************************************************************************
831 ** Get the gcATTRIBUTE object poniter for an indexed attribute for this shader.
836 ** Pointer to a gcSHADER object.
839 ** Index of the attribute to retrieve.
843 ** gcATTRIBUTE * Attribute
844 ** Pointer to a variable receiving the gcATTRIBUTE object pointer.
847 gcSHADER_GetAttribute(
850 OUT gcATTRIBUTE
* Attribute
853 /*******************************************************************************
854 ** gcSHADER_ReallocateUniforms
856 ** Reallocate an array of pointers to gcUNIFORM objects.
861 ** Pointer to a gcSHADER object.
864 ** Array count to reallocate. 'Count' must be at least 1.
867 gcSHADER_ReallocateUniforms(
872 /*******************************************************************************
873 ** gcSHADER_AddUniform
874 ********************************************************************************
876 ** Add an uniform to a gcSHADER object.
881 ** Pointer to a gcSHADER object.
883 ** gctCONST_STRING Name
884 ** Name of the uniform to add.
886 ** gcSHADER_TYPE Type
887 ** Type of the uniform to add.
890 ** Array length of the uniform to add. 'Length' must be at least 1.
894 ** gcUNIFORM * Uniform
895 ** Pointer to a variable receiving the gcUNIFORM object pointer.
900 IN gctCONST_STRING Name
,
901 IN gcSHADER_TYPE Type
,
903 OUT gcUNIFORM
* Uniform
906 /*******************************************************************************
907 ** gcSHADER_GetUniformCount
908 ********************************************************************************
910 ** Get the number of uniforms for this shader.
915 ** Pointer to a gcSHADER object.
920 ** Pointer to a variable receiving the number of uniforms.
923 gcSHADER_GetUniformCount(
925 OUT gctSIZE_T
* Count
928 /*******************************************************************************
929 ** gcSHADER_GetUniform
930 ********************************************************************************
932 ** Get the gcUNIFORM object pointer for an indexed uniform for this shader.
937 ** Pointer to a gcSHADER object.
940 ** Index of the uniform to retrieve.
944 ** gcUNIFORM * Uniform
945 ** Pointer to a variable receiving the gcUNIFORM object pointer.
951 OUT gcUNIFORM
* Uniform
954 /*******************************************************************************
955 ** gcSHADER_GetKernelFucntion
957 ** Get the gcKERNEL_FUNCTION object pointer for an indexed kernel function for this shader.
962 ** Pointer to a gcSHADER object.
965 ** Index of kernel function to retreive the name for.
969 ** gcKERNEL_FUNCTION * KernelFunction
970 ** Pointer to a variable receiving the gcKERNEL_FUNCTION object pointer.
973 gcSHADER_GetKernelFunction(
976 OUT gcKERNEL_FUNCTION
* KernelFunction
980 gcSHADER_GetKernelFunctionByName(
982 IN gctSTRING KernelName
,
983 OUT gcKERNEL_FUNCTION
* KernelFunction
985 /*******************************************************************************
986 ** gcSHADER_GetKernelFunctionCount
988 ** Get the number of kernel functions for this shader.
993 ** Pointer to a gcSHADER object.
998 ** Pointer to a variable receiving the number of kernel functions.
1001 gcSHADER_GetKernelFunctionCount(
1003 OUT gctSIZE_T
* Count
1006 /*******************************************************************************
1007 ** gcSHADER_ReallocateOutputs
1009 ** Reallocate an array of pointers to gcOUTPUT objects.
1014 ** Pointer to a gcSHADER object.
1017 ** Array count to reallocate. 'Count' must be at least 1.
1020 gcSHADER_ReallocateOutputs(
1025 /*******************************************************************************
1026 ** gcSHADER_AddOutput
1027 ********************************************************************************
1029 ** Add an output to a gcSHADER object.
1034 ** Pointer to a gcSHADER object.
1036 ** gctCONST_STRING Name
1037 ** Name of the output to add.
1039 ** gcSHADER_TYPE Type
1040 ** Type of the output to add.
1043 ** Array length of the output to add. 'Length' must be at least 1.
1045 ** gctUINT16 TempRegister
1046 ** Temporary register index that holds the output value.
1055 IN gctCONST_STRING Name
,
1056 IN gcSHADER_TYPE Type
,
1057 IN gctSIZE_T Length
,
1058 IN gctUINT16 TempRegister
1062 gcSHADER_AddOutputIndexed(
1064 IN gctCONST_STRING Name
,
1066 IN gctUINT16 TempIndex
1069 /*******************************************************************************
1070 ** gcSHADER_GetOutputCount
1071 ********************************************************************************
1073 ** Get the number of outputs for this shader.
1078 ** Pointer to a gcSHADER object.
1082 ** gctSIZE_T * Count
1083 ** Pointer to a variable receiving the number of outputs.
1086 gcSHADER_GetOutputCount(
1088 OUT gctSIZE_T
* Count
1091 /*******************************************************************************
1092 ** gcSHADER_GetOutput
1093 ********************************************************************************
1095 ** Get the gcOUTPUT object pointer for an indexed output for this shader.
1100 ** Pointer to a gcSHADER object.
1103 ** Index of output to retrieve.
1107 ** gcOUTPUT * Output
1108 ** Pointer to a variable receiving the gcOUTPUT object pointer.
1114 OUT gcOUTPUT
* Output
1117 /*******************************************************************************
1118 ** gcSHADER_ReallocateVariables
1120 ** Reallocate an array of pointers to gcVARIABLE objects.
1125 ** Pointer to a gcSHADER object.
1128 ** Array count to reallocate. 'Count' must be at least 1.
1131 gcSHADER_ReallocateVariables(
1136 /*******************************************************************************
1137 ** gcSHADER_AddVariable
1138 ********************************************************************************
1140 ** Add a variable to a gcSHADER object.
1145 ** Pointer to a gcSHADER object.
1147 ** gctCONST_STRING Name
1148 ** Name of the variable to add.
1150 ** gcSHADER_TYPE Type
1151 ** Type of the variable to add.
1154 ** Array length of the variable to add. 'Length' must be at least 1.
1156 ** gctUINT16 TempRegister
1157 ** Temporary register index that holds the variable value.
1164 gcSHADER_AddVariable(
1166 IN gctCONST_STRING Name
,
1167 IN gcSHADER_TYPE Type
,
1168 IN gctSIZE_T Length
,
1169 IN gctUINT16 TempRegister
1172 /*******************************************************************************
1173 ** gcSHADER_GetVariableCount
1174 ********************************************************************************
1176 ** Get the number of variables for this shader.
1181 ** Pointer to a gcSHADER object.
1185 ** gctSIZE_T * Count
1186 ** Pointer to a variable receiving the number of variables.
1189 gcSHADER_GetVariableCount(
1191 OUT gctSIZE_T
* Count
1194 /*******************************************************************************
1195 ** gcSHADER_GetVariable
1196 ********************************************************************************
1198 ** Get the gcVARIABLE object pointer for an indexed variable for this shader.
1203 ** Pointer to a gcSHADER object.
1206 ** Index of variable to retrieve.
1210 ** gcVARIABLE * Variable
1211 ** Pointer to a variable receiving the gcVARIABLE object pointer.
1214 gcSHADER_GetVariable(
1217 OUT gcVARIABLE
* Variable
1220 /*******************************************************************************
1221 ** gcSHADER_AddOpcode
1222 ********************************************************************************
1224 ** Add an opcode to a gcSHADER object.
1229 ** Pointer to a gcSHADER object.
1231 ** gcSL_OPCODE Opcode
1234 ** gctUINT16 TempRegister
1235 ** Temporary register index that acts as the target of the opcode.
1238 ** Write enable bits for the temporary register that acts as the target
1241 ** gcSL_FORMAT Format
1242 ** Format of the temporary register.
1251 IN gcSL_OPCODE Opcode
,
1252 IN gctUINT16 TempRegister
,
1254 IN gcSL_FORMAT Format
1258 gcSHADER_AddOpcode2(
1260 IN gcSL_OPCODE Opcode
,
1261 IN gcSL_CONDITION Condition
,
1262 IN gctUINT16 TempRegister
,
1264 IN gcSL_FORMAT Format
1267 /*******************************************************************************
1268 ** gcSHADER_AddOpcodeIndexed
1269 ********************************************************************************
1271 ** Add an opcode to a gcSHADER object that writes to an dynamically indexed
1277 ** Pointer to a gcSHADER object.
1279 ** gcSL_OPCODE Opcode
1282 ** gctUINT16 TempRegister
1283 ** Temporary register index that acts as the target of the opcode.
1286 ** Write enable bits for the temporary register that acts as the
1287 ** target of the opcode.
1289 ** gcSL_INDEXED Mode
1290 ** Location of the dynamic index inside the temporary register. Valid
1293 ** gcSL_INDEXED_X - Use x component of the temporary register.
1294 ** gcSL_INDEXED_Y - Use y component of the temporary register.
1295 ** gcSL_INDEXED_Z - Use z component of the temporary register.
1296 ** gcSL_INDEXED_W - Use w component of the temporary register.
1298 ** gctUINT16 IndexRegister
1299 ** Temporary register index that holds the dynamic index.
1301 ** gcSL_FORMAT Format
1302 ** Format of the temporary register.
1309 gcSHADER_AddOpcodeIndexed(
1311 IN gcSL_OPCODE Opcode
,
1312 IN gctUINT16 TempRegister
,
1314 IN gcSL_INDEXED Mode
,
1315 IN gctUINT16 IndexRegister
,
1316 IN gcSL_FORMAT Format
1319 /*******************************************************************************
1320 ** gcSHADER_AddOpcodeConditionIndexed
1322 ** Add an opcode to a gcSHADER object that writes to an dynamically indexed
1328 ** Pointer to a gcSHADER object.
1330 ** gcSL_OPCODE Opcode
1333 ** gcSL_CONDITION Condition
1334 ** Condition to check.
1336 ** gctUINT16 TempRegister
1337 ** Temporary register index that acts as the target of the opcode.
1340 ** Write enable bits for the temporary register that acts as the
1341 ** target of the opcode.
1343 ** gcSL_INDEXED Indexed
1344 ** Location of the dynamic index inside the temporary register. Valid
1347 ** gcSL_INDEXED_X - Use x component of the temporary register.
1348 ** gcSL_INDEXED_Y - Use y component of the temporary register.
1349 ** gcSL_INDEXED_Z - Use z component of the temporary register.
1350 ** gcSL_INDEXED_W - Use w component of the temporary register.
1352 ** gctUINT16 IndexRegister
1353 ** Temporary register index that holds the dynamic index.
1360 gcSHADER_AddOpcodeConditionIndexed(
1362 IN gcSL_OPCODE Opcode
,
1363 IN gcSL_CONDITION Condition
,
1364 IN gctUINT16 TempRegister
,
1366 IN gcSL_INDEXED Indexed
,
1367 IN gctUINT16 IndexRegister
,
1368 IN gcSL_FORMAT Format
1371 /*******************************************************************************
1372 ** gcSHADER_AddOpcodeConditional
1373 ********************************************************************************
1375 ** Add an conditional opcode to a gcSHADER object.
1380 ** Pointer to a gcSHADER object.
1382 ** gcSL_OPCODE Opcode
1385 ** gcSL_CONDITION Condition
1386 ** Condition that needs to evaluate to gcvTRUE in order for the opcode to
1390 ** Target label if 'Condition' evaluates to gcvTRUE.
1397 gcSHADER_AddOpcodeConditional(
1399 IN gcSL_OPCODE Opcode
,
1400 IN gcSL_CONDITION Condition
,
1404 /*******************************************************************************
1405 ** gcSHADER_AddOpcodeConditionalFormatted
1407 ** Add an conditional jump or call opcode to a gcSHADER object.
1412 ** Pointer to a gcSHADER object.
1414 ** gcSL_OPCODE Opcode
1417 ** gcSL_CONDITION Condition
1418 ** Condition that needs to evaluate to gcvTRUE in order for the opcode to
1421 ** gcSL_FORMAT Format
1422 ** Format of conditional operands
1425 ** Target label if 'Condition' evaluates to gcvTRUE.
1432 gcSHADER_AddOpcodeConditionalFormatted(
1434 IN gcSL_OPCODE Opcode
,
1435 IN gcSL_CONDITION Condition
,
1436 IN gcSL_FORMAT Format
,
1440 /*******************************************************************************
1441 ** gcSHADER_AddLabel
1442 ********************************************************************************
1444 ** Define a label at the current instruction of a gcSHADER object.
1449 ** Pointer to a gcSHADER object.
1464 /*******************************************************************************
1465 ** gcSHADER_AddSource
1466 ********************************************************************************
1468 ** Add a source operand to a gcSHADER object.
1473 ** Pointer to a gcSHADER object.
1476 ** Type of the source operand.
1478 ** gctUINT16 SourceIndex
1479 ** Index of the source operand.
1482 ** x, y, z, and w swizzle values packed into one 8-bit value.
1484 ** gcSL_FORMAT Format
1485 ** Format of the source operand.
1495 IN gctUINT16 SourceIndex
,
1496 IN gctUINT8 Swizzle
,
1497 IN gcSL_FORMAT Format
1500 /*******************************************************************************
1501 ** gcSHADER_AddSourceIndexed
1502 ********************************************************************************
1504 ** Add a dynamically indexed source operand to a gcSHADER object.
1509 ** Pointer to a gcSHADER object.
1512 ** Type of the source operand.
1514 ** gctUINT16 SourceIndex
1515 ** Index of the source operand.
1518 ** x, y, z, and w swizzle values packed into one 8-bit value.
1520 ** gcSL_INDEXED Mode
1521 ** Addressing mode for the index.
1523 ** gctUINT16 IndexRegister
1524 ** Temporary register index that holds the dynamic index.
1526 ** gcSL_FORMAT Format
1527 ** Format of the source operand.
1534 gcSHADER_AddSourceIndexed(
1537 IN gctUINT16 SourceIndex
,
1538 IN gctUINT8 Swizzle
,
1539 IN gcSL_INDEXED Mode
,
1540 IN gctUINT16 IndexRegister
,
1541 IN gcSL_FORMAT Format
1544 /*******************************************************************************
1545 ** gcSHADER_AddSourceAttribute
1546 ********************************************************************************
1548 ** Add an attribute as a source operand to a gcSHADER object.
1553 ** Pointer to a gcSHADER object.
1555 ** gcATTRIBUTE Attribute
1556 ** Pointer to a gcATTRIBUTE object.
1559 ** x, y, z, and w swizzle values packed into one 8-bit value.
1562 ** Static index into the attribute in case the attribute is a matrix
1570 gcSHADER_AddSourceAttribute(
1572 IN gcATTRIBUTE Attribute
,
1573 IN gctUINT8 Swizzle
,
1577 /*******************************************************************************
1578 ** gcSHADER_AddSourceAttributeIndexed
1579 ********************************************************************************
1581 ** Add an indexed attribute as a source operand to a gcSHADER object.
1586 ** Pointer to a gcSHADER object.
1588 ** gcATTRIBUTE Attribute
1589 ** Pointer to a gcATTRIBUTE object.
1592 ** x, y, z, and w swizzle values packed into one 8-bit value.
1595 ** Static index into the attribute in case the attribute is a matrix
1598 ** gcSL_INDEXED Mode
1599 ** Addressing mode of the dynamic index.
1601 ** gctUINT16 IndexRegister
1602 ** Temporary register index that holds the dynamic index.
1609 gcSHADER_AddSourceAttributeIndexed(
1611 IN gcATTRIBUTE Attribute
,
1612 IN gctUINT8 Swizzle
,
1614 IN gcSL_INDEXED Mode
,
1615 IN gctUINT16 IndexRegister
1618 /*******************************************************************************
1619 ** gcSHADER_AddSourceUniform
1620 ********************************************************************************
1622 ** Add a uniform as a source operand to a gcSHADER object.
1627 ** Pointer to a gcSHADER object.
1629 ** gcUNIFORM Uniform
1630 ** Pointer to a gcUNIFORM object.
1633 ** x, y, z, and w swizzle values packed into one 8-bit value.
1636 ** Static index into the uniform in case the uniform is a matrix or
1644 gcSHADER_AddSourceUniform(
1646 IN gcUNIFORM Uniform
,
1647 IN gctUINT8 Swizzle
,
1651 /*******************************************************************************
1652 ** gcSHADER_AddSourceUniformIndexed
1653 ********************************************************************************
1655 ** Add an indexed uniform as a source operand to a gcSHADER object.
1660 ** Pointer to a gcSHADER object.
1662 ** gcUNIFORM Uniform
1663 ** Pointer to a gcUNIFORM object.
1666 ** x, y, z, and w swizzle values packed into one 8-bit value.
1669 ** Static index into the uniform in case the uniform is a matrix or
1672 ** gcSL_INDEXED Mode
1673 ** Addressing mode of the dynamic index.
1675 ** gctUINT16 IndexRegister
1676 ** Temporary register index that holds the dynamic index.
1683 gcSHADER_AddSourceUniformIndexed(
1685 IN gcUNIFORM Uniform
,
1686 IN gctUINT8 Swizzle
,
1688 IN gcSL_INDEXED Mode
,
1689 IN gctUINT16 IndexRegister
1693 gcSHADER_AddSourceSamplerIndexed(
1695 IN gctUINT8 Swizzle
,
1696 IN gcSL_INDEXED Mode
,
1697 IN gctUINT16 IndexRegister
1701 gcSHADER_AddSourceAttributeFormatted(
1703 IN gcATTRIBUTE Attribute
,
1704 IN gctUINT8 Swizzle
,
1706 IN gcSL_FORMAT Format
1710 gcSHADER_AddSourceAttributeIndexedFormatted(
1712 IN gcATTRIBUTE Attribute
,
1713 IN gctUINT8 Swizzle
,
1715 IN gcSL_INDEXED Mode
,
1716 IN gctUINT16 IndexRegister
,
1717 IN gcSL_FORMAT Format
1721 gcSHADER_AddSourceUniformFormatted(
1723 IN gcUNIFORM Uniform
,
1724 IN gctUINT8 Swizzle
,
1726 IN gcSL_FORMAT Format
1730 gcSHADER_AddSourceUniformIndexedFormatted(
1732 IN gcUNIFORM Uniform
,
1733 IN gctUINT8 Swizzle
,
1735 IN gcSL_INDEXED Mode
,
1736 IN gctUINT16 IndexRegister
,
1737 IN gcSL_FORMAT Format
1741 gcSHADER_AddSourceSamplerIndexedFormatted(
1743 IN gctUINT8 Swizzle
,
1744 IN gcSL_INDEXED Mode
,
1745 IN gctUINT16 IndexRegister
,
1746 IN gcSL_FORMAT Format
1749 /*******************************************************************************
1750 ** gcSHADER_AddSourceConstant
1751 ********************************************************************************
1753 ** Add a constant floating point value as a source operand to a gcSHADER
1759 ** Pointer to a gcSHADER object.
1761 ** gctFLOAT Constant
1762 ** Floating point constant.
1769 gcSHADER_AddSourceConstant(
1771 IN gctFLOAT Constant
1774 /*******************************************************************************
1775 ** gcSHADER_AddSourceConstantFormatted
1776 ********************************************************************************
1778 ** Add a constant value as a source operand to a gcSHADER
1784 ** Pointer to a gcSHADER object.
1787 ** Pointer to constant.
1789 ** gcSL_FORMAT Format
1796 gcSHADER_AddSourceConstantFormatted(
1799 IN gcSL_FORMAT Format
1802 /*******************************************************************************
1804 ********************************************************************************
1806 ** Pack a dynamically created gcSHADER object by trimming the allocated arrays
1807 ** and resolving all the labeling.
1812 ** Pointer to a gcSHADER object.
1823 /*******************************************************************************
1824 ** gcSHADER_SetOptimizationOption
1825 ********************************************************************************
1827 ** Set optimization option of a gcSHADER object.
1832 ** Pointer to a gcSHADER object.
1834 ** gctUINT OptimizationOption
1835 ** Optimization option. Can be one of the following:
1837 ** 0 - No optimization.
1838 ** 1 - Full optimization.
1839 ** Other value - For optimizer testing.
1846 gcSHADER_SetOptimizationOption(
1848 IN gctUINT OptimizationOption
1851 /*******************************************************************************
1852 ** gcSHADER_ReallocateFunctions
1854 ** Reallocate an array of pointers to gcFUNCTION objects.
1859 ** Pointer to a gcSHADER object.
1862 ** Array count to reallocate. 'Count' must be at least 1.
1865 gcSHADER_ReallocateFunctions(
1871 gcSHADER_AddFunction(
1873 IN gctCONST_STRING Name
,
1874 OUT gcFUNCTION
* Function
1878 gcSHADER_ReallocateKernelFunctions(
1884 gcSHADER_AddKernelFunction(
1886 IN gctCONST_STRING Name
,
1887 OUT gcKERNEL_FUNCTION
* KernelFunction
1891 gcSHADER_BeginFunction(
1893 IN gcFUNCTION Function
1897 gcSHADER_EndFunction(
1899 IN gcFUNCTION Function
1903 gcSHADER_BeginKernelFunction(
1905 IN gcKERNEL_FUNCTION KernelFunction
1909 gcSHADER_EndKernelFunction(
1911 IN gcKERNEL_FUNCTION KernelFunction
,
1912 IN gctSIZE_T LocalMemorySize
1916 gcSHADER_SetMaxKernelFunctionArgs(
1918 IN gctUINT32 MaxKernelFunctionArgs
1921 /*******************************************************************************
1922 ** gcSHADER_SetConstantMemorySize
1924 ** Set the constant memory address space size of a gcSHADER object.
1929 ** Pointer to a gcSHADER object.
1931 ** gctSIZE_T ConstantMemorySize
1932 ** Constant memory size in bytes
1934 ** gctCHAR *ConstantMemoryBuffer
1935 ** Constant memory buffer
1938 gcSHADER_SetConstantMemorySize(
1940 IN gctSIZE_T ConstantMemorySize
,
1941 IN gctCHAR
* ConstantMemoryBuffer
1944 /*******************************************************************************
1945 ** gcSHADER_GetConstantMemorySize
1947 ** Set the constant memory address space size of a gcSHADER object.
1952 ** Pointer to a gcSHADER object.
1956 ** gctSIZE_T * ConstantMemorySize
1957 ** Pointer to a variable receiving constant memory size in bytes
1959 ** gctCHAR **ConstantMemoryBuffer.
1960 ** Pointer to a variable for returned shader constant memory buffer.
1963 gcSHADER_GetConstantMemorySize(
1965 OUT gctSIZE_T
* ConstantMemorySize
,
1966 OUT gctCHAR
** ConstantMemoryBuffer
1969 /*******************************************************************************
1970 ** gcSHADER_SetPrivateMemorySize
1972 ** Set the private memory address space size of a gcSHADER object.
1977 ** Pointer to a gcSHADER object.
1979 ** gctSIZE_T PrivateMemorySize
1980 ** Private memory size in bytes
1983 gcSHADER_SetPrivateMemorySize(
1985 IN gctSIZE_T PrivateMemorySize
1988 /*******************************************************************************
1989 ** gcSHADER_GetPrivateMemorySize
1991 ** Set the private memory address space size of a gcSHADER object.
1996 ** Pointer to a gcSHADER object.
2000 ** gctSIZE_T * PrivateMemorySize
2001 ** Pointer to a variable receiving private memory size in bytes
2004 gcSHADER_GetPrivateMemorySize(
2006 OUT gctSIZE_T
* PrivateMemorySize
2009 /*******************************************************************************
2010 ** gcSHADER_SetLocalMemorySize
2012 ** Set the local memory address space size of a gcSHADER object.
2017 ** Pointer to a gcSHADER object.
2019 ** gctSIZE_T LocalMemorySize
2020 ** Local memory size in bytes
2023 gcSHADER_SetLocalMemorySize(
2025 IN gctSIZE_T LocalMemorySize
2028 /*******************************************************************************
2029 ** gcSHADER_GetLocalMemorySize
2031 ** Set the local memory address space size of a gcSHADER object.
2036 ** Pointer to a gcSHADER object.
2040 ** gctSIZE_T * LocalMemorySize
2041 ** Pointer to a variable receiving lcoal memory size in bytes
2044 gcSHADER_GetLocalMemorySize(
2046 OUT gctSIZE_T
* LocalMemorySize
2049 /*******************************************************************************
2050 ** gcATTRIBUTE_GetType
2051 ********************************************************************************
2053 ** Get the type and array length of a gcATTRIBUTE object.
2057 ** gcATTRIBUTE Attribute
2058 ** Pointer to a gcATTRIBUTE object.
2062 ** gcSHADER_TYPE * Type
2063 ** Pointer to a variable receiving the type of the attribute. 'Type'
2064 ** can be gcvNULL, in which case no type will be returned.
2066 ** gctSIZE_T * ArrayLength
2067 ** Pointer to a variable receiving the length of the array if the
2068 ** attribute was declared as an array. If the attribute was not
2069 ** declared as an array, the array length will be 1. 'ArrayLength' can
2070 ** be gcvNULL, in which case no array length will be returned.
2073 gcATTRIBUTE_GetType(
2074 IN gcATTRIBUTE Attribute
,
2075 OUT gcSHADER_TYPE
* Type
,
2076 OUT gctSIZE_T
* ArrayLength
2079 /*******************************************************************************
2080 ** gcATTRIBUTE_GetName
2081 ********************************************************************************
2083 ** Get the name of a gcATTRIBUTE object.
2087 ** gcATTRIBUTE Attribute
2088 ** Pointer to a gcATTRIBUTE object.
2092 ** gctSIZE_T * Length
2093 ** Pointer to a variable receiving the length of the attribute name.
2094 ** 'Length' can be gcvNULL, in which case no length will be returned.
2096 ** gctCONST_STRING * Name
2097 ** Pointer to a variable receiving the pointer to the attribute name.
2098 ** 'Name' can be gcvNULL, in which case no name will be returned.
2101 gcATTRIBUTE_GetName(
2102 IN gcATTRIBUTE Attribute
,
2103 OUT gctSIZE_T
* Length
,
2104 OUT gctCONST_STRING
* Name
2107 /*******************************************************************************
2108 ** gcATTRIBUTE_IsEnabled
2109 ********************************************************************************
2111 ** Query the enabled state of a gcATTRIBUTE object.
2115 ** gcATTRIBUTE Attribute
2116 ** Pointer to a gcATTRIBUTE object.
2120 ** gctBOOL * Enabled
2121 ** Pointer to a variable receiving the enabled state of the attribute.
2124 gcATTRIBUTE_IsEnabled(
2125 IN gcATTRIBUTE Attribute
,
2126 OUT gctBOOL
* Enabled
2129 /*******************************************************************************
2130 ** gcUNIFORM_GetType
2131 ********************************************************************************
2133 ** Get the type and array length of a gcUNIFORM object.
2137 ** gcUNIFORM Uniform
2138 ** Pointer to a gcUNIFORM object.
2142 ** gcSHADER_TYPE * Type
2143 ** Pointer to a variable receiving the type of the uniform. 'Type' can
2144 ** be gcvNULL, in which case no type will be returned.
2146 ** gctSIZE_T * ArrayLength
2147 ** Pointer to a variable receiving the length of the array if the
2148 ** uniform was declared as an array. If the uniform was not declared
2149 ** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
2150 ** in which case no array length will be returned.
2154 IN gcUNIFORM Uniform
,
2155 OUT gcSHADER_TYPE
* Type
,
2156 OUT gctSIZE_T
* ArrayLength
2159 /*******************************************************************************
2160 ** gcUNIFORM_GetFlags
2161 ********************************************************************************
2163 ** Get the flags of a gcUNIFORM object.
2167 ** gcUNIFORM Uniform
2168 ** Pointer to a gcUNIFORM object.
2172 ** gceUNIFORM_FLAGS * Flags
2173 ** Pointer to a variable receiving the flags of the uniform.
2178 IN gcUNIFORM Uniform
,
2179 OUT gceUNIFORM_FLAGS
* Flags
2182 /*******************************************************************************
2183 ** gcUNIFORM_SetFlags
2184 ********************************************************************************
2186 ** Set the flags of a gcUNIFORM object.
2190 ** gcUNIFORM Uniform
2191 ** Pointer to a gcUNIFORM object.
2193 ** gceUNIFORM_FLAGS Flags
2194 ** Flags of the uniform to be set.
2202 IN gcUNIFORM Uniform
,
2203 IN gceUNIFORM_FLAGS Flags
2206 /*******************************************************************************
2207 ** gcUNIFORM_GetName
2208 ********************************************************************************
2210 ** Get the name of a gcUNIFORM object.
2214 ** gcUNIFORM Uniform
2215 ** Pointer to a gcUNIFORM object.
2219 ** gctSIZE_T * Length
2220 ** Pointer to a variable receiving the length of the uniform name.
2221 ** 'Length' can be gcvNULL, in which case no length will be returned.
2223 ** gctCONST_STRING * Name
2224 ** Pointer to a variable receiving the pointer to the uniform name.
2225 ** 'Name' can be gcvNULL, in which case no name will be returned.
2229 IN gcUNIFORM Uniform
,
2230 OUT gctSIZE_T
* Length
,
2231 OUT gctCONST_STRING
* Name
2234 /*******************************************************************************
2235 ** gcUNIFORM_GetSampler
2236 ********************************************************************************
2238 ** Get the physical sampler number for a sampler gcUNIFORM object.
2242 ** gcUNIFORM Uniform
2243 ** Pointer to a gcUNIFORM object.
2247 ** gctUINT32 * Sampler
2248 ** Pointer to a variable receiving the physical sampler.
2251 gcUNIFORM_GetSampler(
2252 IN gcUNIFORM Uniform
,
2253 OUT gctUINT32
* Sampler
2256 /*******************************************************************************
2257 ** gcUNIFORM_GetFormat
2259 ** Get the type and array length of a gcUNIFORM object.
2263 ** gcUNIFORM Uniform
2264 ** Pointer to a gcUNIFORM object.
2268 ** gcSL_FORMAT * Format
2269 ** Pointer to a variable receiving the format of element of the uniform.
2270 ** 'Type' can be gcvNULL, in which case no type will be returned.
2272 ** gctBOOL * IsPointer
2273 ** Pointer to a variable receiving the state wheter the uniform is a pointer.
2274 ** 'IsPointer' can be gcvNULL, in which case no array length will be returned.
2277 gcUNIFORM_GetFormat(
2278 IN gcUNIFORM Uniform
,
2279 OUT gcSL_FORMAT
* Format
,
2280 OUT gctBOOL
* IsPointer
2283 /*******************************************************************************
2284 ** gcUNIFORM_SetFormat
2286 ** Set the format and isPointer of a uniform.
2290 ** gcUNIFORM Uniform
2291 ** Pointer to a gcUNIFORM object.
2293 ** gcSL_FORMAT Format
2294 ** Format of element of the uniform shaderType.
2296 ** gctBOOL IsPointer
2297 ** Wheter the uniform is a pointer.
2304 gcUNIFORM_SetFormat(
2305 IN gcUNIFORM Uniform
,
2306 IN gcSL_FORMAT Format
,
2307 IN gctBOOL IsPointer
2310 /*******************************************************************************
2311 ** gcUNIFORM_SetValue
2312 ********************************************************************************
2314 ** Set the value of a uniform in integer.
2318 ** gcUNIFORM Uniform
2319 ** Pointer to a gcUNIFORM object.
2322 ** Number of entries to program if the uniform has been declared as an
2325 ** const gctINT * Value
2326 ** Pointer to a buffer holding the integer values for the uniform.
2334 IN gcUNIFORM Uniform
,
2336 IN
const gctINT
* Value
2339 /*******************************************************************************
2340 ** gcUNIFORM_SetValueX
2341 ********************************************************************************
2343 ** Set the value of a uniform in fixed point.
2347 ** gcUNIFORM Uniform
2348 ** Pointer to a gcUNIFORM object.
2351 ** Number of entries to program if the uniform has been declared as an
2354 ** const gctFIXED_POINT * Value
2355 ** Pointer to a buffer holding the fixed point values for the uniform.
2362 gcUNIFORM_SetValueX(
2363 IN gcUNIFORM Uniform
,
2365 IN gctFIXED_POINT
* Value
2368 /*******************************************************************************
2369 ** gcUNIFORM_SetValueF
2370 ********************************************************************************
2372 ** Set the value of a uniform in floating point.
2376 ** gcUNIFORM Uniform
2377 ** Pointer to a gcUNIFORM object.
2380 ** Number of entries to program if the uniform has been declared as an
2383 ** const gctFLOAT * Value
2384 ** Pointer to a buffer holding the floating point values for the
2392 gcUNIFORM_SetValueF(
2393 IN gcUNIFORM Uniform
,
2395 IN
const gctFLOAT
* Value
2398 /*******************************************************************************
2400 ********************************************************************************
2402 ** Get the type and array length of a gcOUTPUT object.
2407 ** Pointer to a gcOUTPUT object.
2411 ** gcSHADER_TYPE * Type
2412 ** Pointer to a variable receiving the type of the output. 'Type' can
2413 ** be gcvNULL, in which case no type will be returned.
2415 ** gctSIZE_T * ArrayLength
2416 ** Pointer to a variable receiving the length of the array if the
2417 ** output was declared as an array. If the output was not declared
2418 ** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
2419 ** in which case no array length will be returned.
2424 OUT gcSHADER_TYPE
* Type
,
2425 OUT gctSIZE_T
* ArrayLength
2428 /*******************************************************************************
2429 ** gcOUTPUT_GetIndex
2430 ********************************************************************************
2432 ** Get the index of a gcOUTPUT object.
2437 ** Pointer to a gcOUTPUT object.
2442 ** Pointer to a variable receiving the temporary register index of the
2443 ** output. 'Index' can be gcvNULL,. in which case no index will be
2452 /*******************************************************************************
2454 ********************************************************************************
2456 ** Get the name of a gcOUTPUT object.
2461 ** Pointer to a gcOUTPUT object.
2465 ** gctSIZE_T * Length
2466 ** Pointer to a variable receiving the length of the output name.
2467 ** 'Length' can be gcvNULL, in which case no length will be returned.
2469 ** gctCONST_STRING * Name
2470 ** Pointer to a variable receiving the pointer to the output name.
2471 ** 'Name' can be gcvNULL, in which case no name will be returned.
2476 OUT gctSIZE_T
* Length
,
2477 OUT gctCONST_STRING
* Name
2480 /*******************************************************************************
2481 *********************************************************** F U N C T I O N S **
2482 *******************************************************************************/
2484 /*******************************************************************************
2485 ** gcFUNCTION_ReallocateArguments
2487 ** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
2491 ** gcFUNCTION Function
2492 ** Pointer to a gcFUNCTION object.
2495 ** Array count to reallocate. 'Count' must be at least 1.
2498 gcFUNCTION_ReallocateArguments(
2499 IN gcFUNCTION Function
,
2504 gcFUNCTION_AddArgument(
2505 IN gcFUNCTION Function
,
2506 IN gctUINT16 TempIndex
,
2508 IN gctUINT8 Qualifier
2512 gcFUNCTION_GetArgument(
2513 IN gcFUNCTION Function
,
2515 OUT gctUINT16_PTR Temp
,
2516 OUT gctUINT8_PTR Enable
,
2517 OUT gctUINT8_PTR Swizzle
2521 gcFUNCTION_GetLabel(
2522 IN gcFUNCTION Function
,
2523 OUT gctUINT_PTR Label
2526 /*******************************************************************************
2527 ************************* K E R N E L P R O P E R T Y F U N C T I O N S **
2528 *******************************************************************************/
2529 /*******************************************************************************/
2531 gcKERNEL_FUNCTION_AddKernelFunctionProperties(
2532 IN gcKERNEL_FUNCTION KernelFunction
,
2533 IN gctINT propertyType
,
2534 IN gctSIZE_T propertySize
,
2539 gcKERNEL_FUNCTION_GetPropertyCount(
2540 IN gcKERNEL_FUNCTION KernelFunction
,
2541 OUT gctSIZE_T
* Count
2545 gcKERNEL_FUNCTION_GetProperty(
2546 IN gcKERNEL_FUNCTION KernelFunction
,
2548 OUT gctSIZE_T
* propertySize
,
2549 OUT gctINT
* propertyType
,
2550 OUT gctINT
* propertyValues
2554 /*******************************************************************************
2555 *******************************I M A G E S A M P L E R F U N C T I O N S **
2556 *******************************************************************************/
2557 /*******************************************************************************
2558 ** gcKERNEL_FUNCTION_ReallocateImageSamplers
2560 ** Reallocate an array of pointers to image sampler pair.
2564 ** gcKERNEL_FUNCTION KernelFunction
2565 ** Pointer to a gcKERNEL_FUNCTION object.
2568 ** Array count to reallocate. 'Count' must be at least 1.
2571 gcKERNEL_FUNCTION_ReallocateImageSamplers(
2572 IN gcKERNEL_FUNCTION KernelFunction
,
2577 gcKERNEL_FUNCTION_AddImageSampler(
2578 IN gcKERNEL_FUNCTION KernelFunction
,
2579 IN gctUINT8 ImageNum
,
2580 IN gctBOOL IsConstantSamplerType
,
2581 IN gctUINT32 SamplerType
2585 gcKERNEL_FUNCTION_GetImageSamplerCount(
2586 IN gcKERNEL_FUNCTION KernelFunction
,
2587 OUT gctSIZE_T
* Count
2591 gcKERNEL_FUNCTION_GetImageSampler(
2592 IN gcKERNEL_FUNCTION KernelFunction
,
2594 OUT gctUINT8
*ImageNum
,
2595 OUT gctBOOL
*IsConstantSamplerType
,
2596 OUT gctUINT32
*SamplerType
2599 /*******************************************************************************
2600 *********************************************K E R N E L F U N C T I O N S **
2601 *******************************************************************************/
2603 /*******************************************************************************
2604 ** gcKERNEL_FUNCTION_ReallocateArguments
2606 ** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
2610 ** gcKERNEL_FUNCTION Function
2611 ** Pointer to a gcKERNEL_FUNCTION object.
2614 ** Array count to reallocate. 'Count' must be at least 1.
2617 gcKERNEL_FUNCTION_ReallocateArguments(
2618 IN gcKERNEL_FUNCTION Function
,
2623 gcKERNEL_FUNCTION_AddArgument(
2624 IN gcKERNEL_FUNCTION Function
,
2625 IN gctUINT16 TempIndex
,
2627 IN gctUINT8 Qualifier
2631 gcKERNEL_FUNCTION_GetArgument(
2632 IN gcKERNEL_FUNCTION Function
,
2634 OUT gctUINT16_PTR Temp
,
2635 OUT gctUINT8_PTR Enable
,
2636 OUT gctUINT8_PTR Swizzle
2640 gcKERNEL_FUNCTION_GetLabel(
2641 IN gcKERNEL_FUNCTION Function
,
2642 OUT gctUINT_PTR Label
2646 gcKERNEL_FUNCTION_GetName(
2647 IN gcKERNEL_FUNCTION KernelFunction
,
2648 OUT gctSIZE_T
* Length
,
2649 OUT gctCONST_STRING
* Name
2653 gcKERNEL_FUNCTION_ReallocateUniformArguments(
2654 IN gcKERNEL_FUNCTION KernelFunction
,
2659 gcKERNEL_FUNCTION_AddUniformArgument(
2660 IN gcKERNEL_FUNCTION KernelFunction
,
2661 IN gctCONST_STRING Name
,
2662 IN gcSHADER_TYPE Type
,
2663 IN gctSIZE_T Length
,
2664 OUT gcUNIFORM
* UniformArgument
2668 gcKERNEL_FUNCTION_GetUniformArgumentCount(
2669 IN gcKERNEL_FUNCTION KernelFunction
,
2670 OUT gctSIZE_T
* Count
2674 gcKERNEL_FUNCTION_GetUniformArgument(
2675 IN gcKERNEL_FUNCTION KernelFunction
,
2677 OUT gcUNIFORM
* UniformArgument
2681 gcKERNEL_FUNCTION_SetCodeEnd(
2682 IN gcKERNEL_FUNCTION KernelFunction
2685 /*******************************************************************************
2687 ********************************************************************************
2689 ** Compile a shader.
2694 ** Pointer to an gcoHAL object.
2696 ** gctINT ShaderType
2697 ** Shader type to compile. Can be one of the following values:
2699 ** gcSHADER_TYPE_VERTEX
2700 ** Compile a vertex shader.
2702 ** gcSHADER_TYPE_FRAGMENT
2703 ** Compile a fragment shader.
2705 ** gctSIZE_T SourceSize
2706 ** Size of the source buffer in bytes.
2708 ** gctCONST_STRING Source
2709 ** Pointer to the buffer containing the shader source code.
2713 ** gcSHADER * Binary
2714 ** Pointer to a variable receiving the pointer to a gcSHADER object
2715 ** containg the compiled shader code.
2718 ** Pointer to a variable receiving a string pointer containging the
2724 IN gctINT ShaderType
,
2725 IN gctSIZE_T SourceSize
,
2726 IN gctCONST_STRING Source
,
2727 OUT gcSHADER
* Binary
,
2731 /*******************************************************************************
2733 ********************************************************************************
2735 ** Optimize a shader.
2740 ** Pointer to a gcSHADER object holding information about the compiled
2744 ** Pointer to an open FILE object.
2752 /*******************************************************************************
2754 ********************************************************************************
2756 ** Link two shaders and generate a harwdare specific state buffer by compiling
2757 ** the compiler generated code through the resource allocator and code
2762 ** gcSHADER VertexShader
2763 ** Pointer to a gcSHADER object holding information about the compiled
2766 ** gcSHADER FragmentShader
2767 ** Pointer to a gcSHADER object holding information about the compiled
2770 ** gceSHADER_FLAGS Flags
2771 ** Compiler flags. Can be any of the following:
2773 ** gcvSHADER_DEAD_CODE - Dead code elimination.
2774 ** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
2775 ** gcvSHADER_OPTIMIZER - Full optimization.
2776 ** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
2777 ** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
2778 ** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
2782 ** gctSIZE_T * StateBufferSize
2783 ** Pointer to a variable receicing the number of bytes in the buffer
2784 ** returned in 'StateBuffer'.
2786 ** gctPOINTER * StateBuffer
2787 ** Pointer to a variable receiving a buffer pointer that contains the
2788 ** states required to download the shaders into the hardware.
2790 ** gcsHINT_PTR * Hints
2791 ** Pointer to a variable receiving a gcsHINT structure pointer that
2792 ** contains information required when loading the shader states.
2796 IN gcSHADER VertexShader
,
2797 IN gcSHADER FragmentShader
,
2798 IN gceSHADER_FLAGS Flags
,
2799 OUT gctSIZE_T
* StateBufferSize
,
2800 OUT gctPOINTER
* StateBuffer
,
2801 OUT gcsHINT_PTR
* Hints
2804 /*******************************************************************************
2806 ********************************************************************************
2808 ** Load a pre-compiled and pre-linked shader program into the hardware.
2813 ** Pointer to a gcoHAL object.
2815 ** gctSIZE_T StateBufferSize
2816 ** The number of bytes in the 'StateBuffer'.
2818 ** gctPOINTER StateBuffer
2819 ** Pointer to the states that make up the shader program.
2821 ** gcsHINT_PTR Hints
2822 ** Pointer to a gcsHINT structure that contains information required
2823 ** when loading the shader states.
2828 IN gctSIZE_T StateBufferSize
,
2829 IN gctPOINTER StateBuffer
,
2830 IN gcsHINT_PTR Hints
2833 /*******************************************************************************
2835 ********************************************************************************
2837 ** Save pre-compiled shaders and pre-linked programs to a binary file.
2841 ** gcSHADER VertexShader
2842 ** Pointer to vertex shader object.
2844 ** gcSHADER FragmentShader
2845 ** Pointer to fragment shader object.
2847 ** gctSIZE_T ProgramBufferSize
2848 ** Number of bytes in 'ProgramBuffer'.
2850 ** gctPOINTER ProgramBuffer
2851 ** Pointer to buffer containing the program states.
2853 ** gcsHINT_PTR Hints
2854 ** Pointer to HINTS structure for program states.
2858 ** gctPOINTER * Binary
2859 ** Pointer to a variable receiving the binary data to be saved.
2861 ** gctSIZE_T * BinarySize
2862 ** Pointer to a variable receiving the number of bytes inside 'Binary'.
2866 IN gcSHADER VertexShader
,
2867 IN gcSHADER FragmentShader
,
2868 IN gctSIZE_T ProgramBufferSize
,
2869 IN gctPOINTER ProgramBuffer
,
2870 IN gcsHINT_PTR Hints
,
2871 OUT gctPOINTER
* Binary
,
2872 OUT gctSIZE_T
* BinarySize
2875 /*******************************************************************************
2877 ********************************************************************************
2879 ** Load pre-compiled shaders and pre-linked programs from a binary file.
2883 ** gctPOINTER Binary
2884 ** Pointer to the binary data loaded.
2886 ** gctSIZE_T BinarySize
2887 ** Number of bytes in 'Binary'.
2891 ** gcSHADER VertexShader
2892 ** Pointer to a vertex shader object.
2894 ** gcSHADER FragmentShader
2895 ** Pointer to a fragment shader object.
2897 ** gctSIZE_T * ProgramBufferSize
2898 ** Pointer to a variable receicing the number of bytes in the buffer
2899 ** returned in 'ProgramBuffer'.
2901 ** gctPOINTER * ProgramBuffer
2902 ** Pointer to a variable receiving a buffer pointer that contains the
2903 ** states required to download the shaders into the hardware.
2905 ** gcsHINT_PTR * Hints
2906 ** Pointer to a variable receiving a gcsHINT structure pointer that
2907 ** contains information required when loading the shader states.
2911 IN gctPOINTER Binary
,
2912 IN gctSIZE_T BinarySize
,
2913 OUT gcSHADER VertexShader
,
2914 OUT gcSHADER FragmentShader
,
2915 OUT gctSIZE_T
* ProgramBufferSize
,
2916 OUT gctPOINTER
* ProgramBuffer
,
2917 OUT gcsHINT_PTR
* Hints
2920 /*******************************************************************************
2922 ********************************************************************************
2924 ** Compile a OpenCL kernel shader.
2929 ** Pointer to an gcoHAL object.
2931 ** gctSIZE_T SourceSize
2932 ** Size of the source buffer in bytes.
2934 ** gctCONST_STRING Source
2935 ** Pointer to the buffer containing the shader source code.
2939 ** gcSHADER * Binary
2940 ** Pointer to a variable receiving the pointer to a gcSHADER object
2941 ** containg the compiled shader code.
2944 ** Pointer to a variable receiving a string pointer containging the
2950 IN gctSIZE_T SourceSize
,
2951 IN gctCONST_STRING Source
,
2952 IN gctCONST_STRING Options
,
2953 OUT gcSHADER
* Binary
,
2957 /*******************************************************************************
2959 ********************************************************************************
2961 ** Link OpenCL kernel and generate a harwdare specific state buffer by compiling
2962 ** the compiler generated code through the resource allocator and code
2968 ** Pointer to a gcSHADER object holding information about the compiled
2971 ** gceSHADER_FLAGS Flags
2972 ** Compiler flags. Can be any of the following:
2974 ** gcvSHADER_DEAD_CODE - Dead code elimination.
2975 ** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
2976 ** gcvSHADER_OPTIMIZER - Full optimization.
2977 ** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
2978 ** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
2979 ** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
2983 ** gctSIZE_T * StateBufferSize
2984 ** Pointer to a variable receiving the number of bytes in the buffer
2985 ** returned in 'StateBuffer'.
2987 ** gctPOINTER * StateBuffer
2988 ** Pointer to a variable receiving a buffer pointer that contains the
2989 ** states required to download the shaders into the hardware.
2991 ** gcsHINT_PTR * Hints
2992 ** Pointer to a variable receiving a gcsHINT structure pointer that
2993 ** contains information required when loading the shader states.
2998 IN gceSHADER_FLAGS Flags
,
2999 OUT gctSIZE_T
* StateBufferSize
,
3000 OUT gctPOINTER
* StateBuffer
,
3001 OUT gcsHINT_PTR
* Hints
3004 /*******************************************************************************
3006 ********************************************************************************
3008 ** Load a pre-compiled and pre-linked kernel program into the hardware.
3012 ** gctSIZE_T StateBufferSize
3013 ** The number of bytes in the 'StateBuffer'.
3015 ** gctPOINTER StateBuffer
3016 ** Pointer to the states that make up the shader program.
3018 ** gcsHINT_PTR Hints
3019 ** Pointer to a gcsHINT structure that contains information required
3020 ** when loading the shader states.
3024 IN gctSIZE_T StateBufferSize
,
3025 IN gctPOINTER StateBuffer
,
3026 IN gcsHINT_PTR Hints
3030 gcInvokeThreadWalker(
3031 IN gcsTHREAD_WALKER_INFO_PTR Info
3038 #endif /* VIVANTE_NO_3D */
3039 #endif /* __gc_hal_compiler_h_ */