summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_code.h43
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler.h13
2 files changed, 31 insertions, 25 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_code.h b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
index 9fd37dc8d2..3353617bef 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_code.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
@@ -23,6 +23,8 @@
#ifndef RADEON_CODE_H
#define RADEON_CODE_H
+#include <stdint.h>
+
#define R300_PFS_MAX_ALU_INST 64
#define R300_PFS_MAX_TEX_INST 32
#define R300_PFS_MAX_TEX_INDIRECT 4
@@ -99,7 +101,7 @@ struct r300_fragment_program_external_state {
* 2 - GL_ALPHA
* depending on the depth texture mode.
*/
- GLuint depth_texture_mode : 2;
+ unsigned depth_texture_mode : 2;
/**
* If the sampler is used as a shadow sampler,
@@ -108,7 +110,7 @@ struct r300_fragment_program_external_state {
*
* Otherwise, this field is 0.
*/
- GLuint texture_compare_func : 3;
+ unsigned texture_compare_func : 3;
} unit[16];
};
@@ -128,16 +130,16 @@ struct r300_fragment_program_node {
struct r300_fragment_program_code {
struct {
int length; /**< total # of texture instructions used */
- GLuint inst[R300_PFS_MAX_TEX_INST];
+ uint32_t inst[R300_PFS_MAX_TEX_INST];
} tex;
struct {
int length; /**< total # of ALU instructions used */
struct {
- GLuint inst0;
- GLuint inst1;
- GLuint inst2;
- GLuint inst3;
+ uint32_t inst0;
+ uint32_t inst1;
+ uint32_t inst2;
+ uint32_t inst3;
} inst[R300_PFS_MAX_ALU_INST];
} alu;
@@ -151,12 +153,12 @@ struct r300_fragment_program_code {
struct r500_fragment_program_code {
struct {
- GLuint inst0;
- GLuint inst1;
- GLuint inst2;
- GLuint inst3;
- GLuint inst4;
- GLuint inst5;
+ uint32_t inst0;
+ uint32_t inst1;
+ uint32_t inst2;
+ uint32_t inst3;
+ uint32_t inst4;
+ uint32_t inst5;
} inst[R500_PFS_MAX_INST];
int inst_offset;
@@ -171,7 +173,7 @@ struct rX00_fragment_program_code {
struct r500_fragment_program_code r500;
} code;
- GLboolean writes_depth;
+ unsigned writes_depth:1;
struct rc_constant_list constants;
};
@@ -180,22 +182,25 @@ struct rX00_fragment_program_code {
#define VSF_MAX_FRAGMENT_LENGTH (255*4)
#define VSF_MAX_FRAGMENT_TEMPS (14)
+#define VSF_MAX_INPUTS 32
+#define VSF_MAX_OUTPUTS 32
+
struct r300_vertex_program_code {
int length;
union {
- GLuint d[VSF_MAX_FRAGMENT_LENGTH];
+ uint32_t d[VSF_MAX_FRAGMENT_LENGTH];
float f[VSF_MAX_FRAGMENT_LENGTH];
} body;
int pos_end;
int num_temporaries; /* Number of temp vars used by program */
- int inputs[VERT_ATTRIB_MAX];
- int outputs[VERT_RESULT_MAX];
+ int inputs[VSF_MAX_INPUTS];
+ int outputs[VSF_MAX_OUTPUTS];
struct rc_constant_list constants;
- GLbitfield InputsRead;
- GLbitfield OutputsWritten;
+ uint32_t InputsRead;
+ uint32_t OutputsWritten;
};
#endif /* RADEON_CODE_H */ \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
index b22da17583..15f8b8fd92 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
@@ -43,9 +43,9 @@ struct rc_program {
*/
struct rc_instruction Instructions;
- GLbitfield InputsRead;
- GLbitfield OutputsWritten;
- GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */
+ uint32_t InputsRead;
+ uint32_t OutputsWritten;
+ uint32_t ShadowSamplers; /**< Texture units used for shadow sampling. */
struct rc_constant_list Constants;
};
@@ -53,8 +53,8 @@ struct rc_program {
struct radeon_compiler {
struct memory_pool Pool;
struct rc_program Program;
- GLboolean Debug;
- GLboolean Error;
+ unsigned Debug:1;
+ unsigned Error:1;
char * ErrorMsg;
};
@@ -75,7 +75,7 @@ struct r300_fragment_program_compiler {
struct radeon_compiler Base;
struct rX00_fragment_program_code *code;
struct r300_fragment_program_external_state state;
- GLboolean is_r500;
+ unsigned is_r500;
unsigned OutputDepth;
unsigned OutputColor;
@@ -94,6 +94,7 @@ struct r300_vertex_program_compiler {
struct r300_vertex_program_code *code;
GLbitfield RequiredOutputs;
+ void * UserData;
void (*SetHwInputOutput)(struct r300_vertex_program_compiler * c);
};