summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_context.h
diff options
context:
space:
mode:
authorMaciej Cencora <m.cencora@gmail.com>2009-04-18 03:16:16 +0200
committerDave Airlie <airlied@linux.ie>2009-04-19 22:14:42 +1000
commitaa04e7d475f6d6028c06c42bedc3c7d37ee78a0e (patch)
tree63251750cb5655b422f60b05f6287f6c2b90dd79 /src/mesa/drivers/dri/r300/r300_context.h
parent27d4546f600cb444f07a4d510a328540ff37f761 (diff)
r300: merge r300/r500 fragment program structures
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_context.h')
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h60
1 files changed, 12 insertions, 48 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index 8d0f95e31e..0c7221b190 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -458,7 +458,7 @@ struct r300_vertex_program_cont {
#define PFS_NUM_CONST_REGS 16
struct r300_pfs_compile_state;
-
+struct r500_pfs_compile_state;
/**
* Stores state that influences the compilation of a fragment program.
@@ -528,47 +528,6 @@ struct r300_fragment_program_code {
int max_temp_idx;
};
-/**
- * Store everything about a fragment program that is needed
- * to render with that program.
- */
-struct r300_fragment_program {
- struct gl_fragment_program mesa_program;
-
- GLboolean translated;
- GLboolean error;
-
- struct r300_fragment_program_external_state state;
- struct r300_fragment_program_code code;
-
- GLboolean WritesDepth;
- GLuint optimization;
-};
-
-struct r500_pfs_compile_state;
-
-struct r500_fragment_program_external_state {
- struct {
- /**
- * If the sampler is used as a shadow sampler,
- * this field is:
- * 0 - GL_LUMINANCE
- * 1 - GL_INTENSITY
- * 2 - GL_ALPHA
- * depending on the depth texture mode.
- */
- GLuint depth_texture_mode : 2;
-
- /**
- * If the sampler is used as a shadow sampler,
- * this field is (texture_compare_func - GL_NEVER).
- * [e.g. if compare function is GL_LEQUAL, this field is 3]
- *
- * Otherwise, this field is 0.
- */
- GLuint texture_compare_func : 3;
- } unit[16];
-};
struct r500_fragment_program_code {
struct {
@@ -593,18 +552,23 @@ struct r500_fragment_program_code {
int max_temp_idx;
};
-struct r500_fragment_program {
- struct gl_fragment_program mesa_program;
+/**
+* Store everything about a fragment program that is needed
+* to render with that program.
+*/
+struct r300_fragment_program {
+ struct gl_fragment_program Base;
- GLcontext *ctx;
GLboolean translated;
GLboolean error;
- struct r500_fragment_program_external_state state;
- struct r500_fragment_program_code code;
+ struct r300_fragment_program_external_state state;
+ union {
+ struct r300_fragment_program_code r300;
+ struct r500_fragment_program_code r500;
+ } code;
GLboolean writes_depth;
-
GLuint optimization;
};