nir/drawpixels: fix what appears to be a copy-paste bug in get_texcoord_const
authorMarek Olšák <marek.olsak@amd.com>
Tue, 1 Oct 2019 02:16:55 +0000 (22:16 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 10 Oct 2019 19:49:18 +0000 (15:49 -0400)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/nir/nir_lower_drawpixels.c

index c0da1a4a258c82dad15bbb642b0e53eae4e6a365..f2e64722be8e491d030023f4e0c761bc0e490b4c 100644 (file)
@@ -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