[Mesa-dev] [PATCH v2 04/12] st/drawpixels: always use two-dimensional constant references

Nicolai Hähnle nhaehnle at gmail.com
Mon Aug 28 08:58:12 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/mesa/state_tracker/st_cb_drawpixels_shader.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/state_tracker/st_cb_drawpixels_shader.c b/src/mesa/state_tracker/st_cb_drawpixels_shader.c
index 35a9da0643d..83dcfeab4da 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels_shader.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels_shader.c
@@ -197,20 +197,22 @@ transform_inst:
          continue;
 
       if (ctx->info.input_semantic_name[reg] == TGSI_SEMANTIC_COLOR &&
           ctx->info.input_semantic_index[reg] == 0) {
          src->Register.File = TGSI_FILE_TEMPORARY;
          src->Register.Index = ctx->color_temp;
       } else if (ctx->info.input_semantic_name[reg] == sem_texcoord &&
                  ctx->info.input_semantic_index[reg] == 0) {
          src->Register.File = TGSI_FILE_CONSTANT;
          src->Register.Index = ctx->texcoord_const;
+         src->Register.Dimension = 1;
+         src->Dimension.Index = 0;
       }
    }
 
    tctx->emit_instruction(tctx, current_inst);
 }
 
 const struct tgsi_token *
 st_get_drawpix_shader(const struct tgsi_token *tokens, bool use_texcoord,
                       bool scale_and_bias, unsigned scale_const,
                       unsigned bias_const, bool pixel_maps,
-- 
2.11.0



More information about the mesa-dev mailing list