* \sa nir_variable::state_slots
*/
typedef struct {
- gl_state_index16 tokens[5];
+ gl_state_index16 tokens[STATE_LENGTH];
int swizzle;
} nir_state_slot;
void nir_lower_tes_patch_vertices(nir_shader *tes, unsigned patch_vertices);
typedef struct nir_lower_wpos_ytransform_options {
- gl_state_index16 state_tokens[5];
+ gl_state_index16 state_tokens[STATE_LENGTH];
bool fs_coord_origin_upper_left :1;
bool fs_coord_origin_lower_left :1;
bool fs_coord_pixel_center_integer :1;
bool nir_lower_wpos_center(nir_shader *shader, const bool for_sample_shading);
typedef struct nir_lower_drawpixels_options {
- gl_state_index16 texcoord_state_tokens[5];
- gl_state_index16 scale_state_tokens[5];
- gl_state_index16 bias_state_tokens[5];
+ gl_state_index16 texcoord_state_tokens[STATE_LENGTH];
+ gl_state_index16 scale_state_tokens[STATE_LENGTH];
+ gl_state_index16 bias_state_tokens[STATE_LENGTH];
unsigned drawpix_sampler;
unsigned pixelmap_sampler;
bool pixel_maps :1;
static nir_variable *
create_uniform(nir_shader *shader, const char *name,
- const gl_state_index16 state_tokens[5])
+ const gl_state_index16 state_tokens[STATE_LENGTH])
{
nir_variable *var = nir_variable_create(shader,
nir_var_uniform,
MESA_SHADER_COMPUTE = 5,
} gl_shader_stage;
+/**
+ * Number of STATE_* values we need to address any GL state.
+ * Used to dimension arrays.
+ */
+#define STATE_LENGTH 5
+
typedef short gl_state_index16; /* see enum gl_state_index */
const char *gl_shader_stage_name(gl_shader_stage stage);
struct gl_context;
struct gl_program_parameter_list;
-/**
- * Number of STATE_* values we need to address any GL state.
- * Used to dimension arrays.
- */
-#define STATE_LENGTH 5
-
/**
* Used for describing GL state referenced from inside ARB vertex and