nir/lower_wpos_ytransform: remove unnecessary state variable

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31951>
This commit is contained in:
Georg Lehmann
2024-11-04 10:44:49 +01:00
committed by Marge Bot
parent 3738c69796
commit 63f828d262

View File

@@ -38,8 +38,7 @@ typedef struct {
const nir_lower_wpos_ytransform_options *options;
nir_shader *shader;
nir_builder b;
nir_variable *transform;
nir_def *load;
nir_def *transform;
} lower_wpos_ytransform_state;
static nir_def *
@@ -55,11 +54,10 @@ get_transform(lower_wpos_ytransform_state *state)
state->options->state_tokens);
var->data.how_declared = nir_var_hidden;
state->transform = var;
state->b.cursor = nir_before_impl(nir_shader_get_entrypoint(state->b.shader));
state->load = nir_load_var(&state->b, state->transform);
state->transform = nir_load_var(&state->b, var);
}
return state->load;
return state->transform;
}
/* NIR equiv of TGSI CMP instruction: */