summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-09-30 22:16:55 -0400
committerMarek Olšák <[email protected]>2019-10-10 15:49:18 -0400
commite5209e6a95d50b5b9f9fe282f87e8e424ccdd6d6 (patch)
treec2bd6e041bc9a055c82ab990c8c81b7c02a9ec7d /src
parente621b30787cebbc967468f2983f4bf90a2d287ea (diff)
nir/drawpixels: fix what appears to be a copy-paste bug in get_texcoord_const
Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_lower_drawpixels.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_lower_drawpixels.c b/src/compiler/nir/nir_lower_drawpixels.c
index c0da1a4a258..f2e64722be8 100644
--- a/src/compiler/nir/nir_lower_drawpixels.c
+++ b/src/compiler/nir/nir_lower_drawpixels.c
@@ -35,7 +35,7 @@ typedef struct {
const nir_lower_drawpixels_options *options;
nir_shader *shader;
nir_builder b;
- nir_variable *texcoord, *scale, *bias, *tex, *pixelmap;
+ nir_variable *texcoord, *texcoord_const, *scale, *bias, *tex, *pixelmap;
} lower_drawpixels_state;
static nir_ssa_def *
@@ -104,11 +104,12 @@ get_bias(lower_drawpixels_state *state)
static nir_ssa_def *
get_texcoord_const(lower_drawpixels_state *state)
{
- if (state->bias == NULL) {
- state->bias = create_uniform(state->shader, "gl_MultiTexCoord0",
+ if (state->texcoord_const == NULL) {
+ state->texcoord_const = create_uniform(state->shader,
+ "gl_MultiTexCoord0",
state->options->texcoord_state_tokens);
}
- return nir_load_var(&state->b, state->bias);
+ return nir_load_var(&state->b, state->texcoord_const);
}
static void