aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/cell/spu/spu_main.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-09-11 17:59:52 -0600
committerBrian Paul <[email protected]>2008-09-11 17:59:52 -0600
commitaa66f08a21b791f338b519f0c2162cd8f7b3aeb0 (patch)
tree1e8c8e2e01f98759b9ab073d340daca837b65932 /src/gallium/drivers/cell/spu/spu_main.h
parentdbbbc333442c160b2801062e92c6c5931b64390a (diff)
cell: initial support for fragment shader code generation.
TGSI shaders are translated into SPE instructions which are then sent to the SPEs for execution. Only a few opcodes work, no swizzling yet, no support for constants/immediates, etc.
Diffstat (limited to 'src/gallium/drivers/cell/spu/spu_main.h')
-rw-r--r--src/gallium/drivers/cell/spu/spu_main.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/cell/spu/spu_main.h b/src/gallium/drivers/cell/spu/spu_main.h
index d40539da83b..2c7b6258402 100644
--- a/src/gallium/drivers/cell/spu/spu_main.h
+++ b/src/gallium/drivers/cell/spu/spu_main.h
@@ -75,6 +75,12 @@ typedef void (*spu_fragment_ops_func)(uint x, uint y,
vector float fragAlpha,
vector unsigned int mask);
+/** Function for running fragment program */
+typedef void (*spu_fragment_program_func)(vector float *inputs,
+ vector float *outputs,
+ vector float *constants);
+
+
struct spu_framebuffer
{
void *color_start; /**< addr of color surface in main memory */
@@ -142,9 +148,18 @@ struct spu_global
/** Current fragment ops function */
spu_fragment_ops_func fragment_ops;
+ /** Current fragment program machine code */
+ uint fragment_program_code[SPU_MAX_FRAGMENT_PROGRAM_INSTS];
+ /** Current fragment ops function */
+ spu_fragment_program_func fragment_program;
+
/** Current texture sampler function */
spu_sample_texture_func sample_texture[CELL_MAX_SAMPLERS];
+ /** Fragment program constants (XXX preliminary/used) */
+#define MAX_CONSTANTS 32
+ vector float constants[MAX_CONSTANTS];
+
} ALIGN16_ATTRIB;