intel/compiler: fix -Wsign-compare warning
[mesa.git] / src / mesa / state_tracker / st_program.h
index 0e6c8e00c6ef18755f8c037e6767b8d6e535ff37..f67ea5eb2087cccde456eb314d40b75e02fc0f02 100644 (file)
@@ -150,6 +150,9 @@ struct st_fragment_program
    struct gl_shader_program *shader_program;
 
    struct st_fp_variant *variants;
+
+   /* Used by the shader cache and ARB_get_program_binary */
+   unsigned num_tgsi_tokens;
 };
 
 
@@ -193,6 +196,9 @@ struct st_vp_variant
 
    /** similar to that in st_vertex_program, but with edgeflags info too */
    GLuint num_inputs;
+
+   /** Bitfield of VERT_BIT_* bits of mesa vertex processing inputs */
+   GLbitfield vert_attrib_mask;
 };
 
 
@@ -212,6 +218,8 @@ struct st_vertex_program
    /** maps a TGSI input index back to a Mesa VERT_ATTRIB_x */
    ubyte index_to_input[PIPE_MAX_ATTRIBS];
    ubyte num_inputs;
+   /** Reverse mapping of the above */
+   ubyte input_to_index[VERT_ATTRIB_MAX];
 
    /** Maps VARYING_SLOT_x to slot */
    ubyte result_to_output[VARYING_SLOT_MAX];
@@ -222,6 +230,9 @@ struct st_vertex_program
 
    /** SHA1 hash of linked tgsi shader program, used for on-disk cache */
    unsigned char sha1[20];
+
+   /* Used by the shader cache and ARB_get_program_binary */
+   unsigned num_tgsi_tokens;
 };
 
 
@@ -264,6 +275,9 @@ struct st_common_program
 
    /** SHA1 hash of linked tgsi shader program, used for on-disk cache */
    unsigned char sha1[20];
+
+   /* Used by the shader cache and ARB_get_program_binary */
+   unsigned num_tgsi_tokens;
 };
 
 
@@ -284,6 +298,9 @@ struct st_compute_program
 
    /** SHA1 hash of linked tgsi shader program, used for on-disk cache */
    unsigned char sha1[20];
+
+   /* Used by the shader cache and ARB_get_program_binary */
+   unsigned num_tgsi_tokens;
 };