summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_context.h
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2008-06-14 04:07:51 +0200
committerNicolai Haehnle <nhaehnle@gmail.com>2008-06-14 04:15:42 +0200
commita1c0c56d70308a562c90cc01982c89ed1396c830 (patch)
treeed2aad239b34f80c95139f13a9b6fccf79a8d5ad /src/mesa/drivers/dri/r300/r300_context.h
parent83ad2a756ea8dd1b0ca9746e355ce3de0f29356e (diff)
r300: Implement GL_ARB_shadow and GL_EXT_shadow_funcs
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_context.h')
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index a9b3b061f4..ca22c5dd8a 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -655,6 +655,34 @@ struct r300_vertex_program_cont {
struct r300_pfs_compile_state;
+
+/**
+ * Stores state that influences the compilation of a fragment program.
+ */
+struct r300_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];
+};
+
+
/**
* Stores an R300 fragment program in its compiled-to-hardware form.
*/
@@ -711,6 +739,7 @@ struct r300_fragment_program {
GLboolean translated;
GLboolean error;
+ struct r300_fragment_program_external_state state;
struct r300_fragment_program_code code;
GLboolean WritesDepth;