mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 06:20:19 +01:00
nir: remove nir_state_slot::swizzle
This is only ever written to, never read from. Let's just get rid of it! This also saves us a few needless includes. Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22620>
This commit is contained in:
parent
4c47d83051
commit
4e8b532db3
6 changed files with 0 additions and 9 deletions
|
|
@ -707,7 +707,6 @@ nir_visitor::visit(ir_variable *ir)
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -171,7 +171,6 @@ struct nir_xfb_info;
|
|||
*/
|
||||
typedef struct {
|
||||
gl_state_index16 tokens[STATE_LENGTH];
|
||||
uint16_t swizzle;
|
||||
} nir_state_slot;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
|
||||
#include "nir_builder.h"
|
||||
#include "program/prog_instruction.h"
|
||||
|
||||
static nir_variable *
|
||||
make_uniform(nir_shader *nir, const gl_state_index16 *tokens)
|
||||
|
|
@ -36,7 +35,6 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#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.
|
||||
|
|
@ -50,7 +49,6 @@ get_pntc_transform(lower_pntc_ytransform_state *state)
|
|||
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ lower_impl(nir_function_impl *impl,
|
|||
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));
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#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
|
||||
|
|
@ -56,7 +55,6 @@ get_transform(lower_wpos_ytransform_state *state)
|
|||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue