summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/common.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-09-11 17:59:52 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-09-11 17:59:52 -0600
commitaa66f08a21b791f338b519f0c2162cd8f7b3aeb0 (patch)
tree1e8c8e2e01f98759b9ab073d340daca837b65932 /src/gallium/drivers/cell/common.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/common.h')
-rw-r--r--src/gallium/drivers/cell/common.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/cell/common.h b/src/gallium/drivers/cell/common.h
index e989d8c2e5..cb0631baf5 100644
--- a/src/gallium/drivers/cell/common.h
+++ b/src/gallium/drivers/cell/common.h
@@ -92,6 +92,7 @@
#define CELL_CMD_STATE_UNIFORMS 16
#define CELL_CMD_STATE_VS_ARRAY_INFO 17
#define CELL_CMD_STATE_BIND_VS 18
+#define CELL_CMD_STATE_FRAGMENT_PROGRAM 19
#define CELL_CMD_STATE_ATTRIB_FETCH 20
#define CELL_CMD_VS_EXECUTE 22
#define CELL_CMD_FLUSH_BUFFER_RANGE 23
@@ -125,6 +126,20 @@ struct cell_command_fragment_ops
};
+/** Max instructions for fragment programs */
+#define SPU_MAX_FRAGMENT_PROGRAM_INSTS 128
+
+/**
+ * Command to send a fragment progra to SPUs.
+ */
+struct cell_command_fragment_program
+{
+ uint64_t opcode; /**< CELL_CMD_STATE_FRAGMENT_PROGRAM */
+ uint num_inst; /**< Number of instructions */
+ unsigned code[SPU_MAX_FRAGMENT_PROGRAM_INSTS];
+};
+
+
/**
* Tell SPUs about the framebuffer size, location
*/