for (unsigned i = 0; i < var->num_state_slots; i++) {
for (unsigned j = 0; j < 4; j++)
var->state_slots[i].tokens[j] = state_slots[i].tokens[j];
- var->state_slots[i].swizzle = state_slots[i].swizzle;
}
} else {
var->state_slots = NULL;
*/
typedef struct {
gl_state_index16 tokens[STATE_LENGTH];
- uint16_t swizzle;
} nir_state_slot;
typedef enum {
*/
#include "nir_builder.h"
-#include "program/prog_instruction.h"
static nir_variable *
make_uniform(nir_shader *nir, const gl_state_index16 *tokens)
var->num_state_slots = 1;
var->state_slots = ralloc_array(var, nir_state_slot, var->num_state_slots);
memcpy(var->state_slots[0].tokens, tokens, sizeof(*tokens) * STATE_LENGTH);
- var->state_slots[0].swizzle = SWIZZLE_XXXX;
return var;
}
#include "nir.h"
#include "nir_builder.h"
-#include "program/prog_instruction.h"
/* Lower gl_PointCoord to account for user requested point-coord origin
* and for whether draw buffer is flipped.
var->num_state_slots = 1;
var->state_slots = ralloc_array(var, nir_state_slot, 1);
- var->state_slots[0].swizzle = SWIZZLE_XYZW;
memcpy(var->state_slots[0].tokens, state->pntc_state_tokens,
sizeof(var->state_slots[0].tokens));
var->data.how_declared = nir_var_hidden;
glsl_vec4_type(), "gl_PointSizeClampedMESA");
in->num_state_slots = 1;
in->state_slots = ralloc_array(in, nir_state_slot, 1);
- in->state_slots[0].swizzle = BITFIELD_MASK(4);
memcpy(in->state_slots[0].tokens,
pointsize_state_tokens,
sizeof(in->state_slots[0].tokens));
#include "nir.h"
#include "nir_builder.h"
-#include "program/prog_instruction.h"
/* Lower gl_FragCoord (and fddy) to account for driver's requested coordinate-
* origin and pixel-center vs. shader. If transformation is required, a
var->num_state_slots = 1;
var->state_slots = ralloc_array(var, nir_state_slot, 1);
- var->state_slots[0].swizzle = SWIZZLE_XYZW;
memcpy(var->state_slots[0].tokens, state->options->state_tokens,
sizeof(var->state_slots[0].tokens));
var->data.how_declared = nir_var_hidden;