From: Brian Paul Date: Tue, 1 Jul 2014 13:55:00 +0000 (-0600) Subject: st/mesa: allow 2D indexing for all shader types in translate_src() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dfca35f8078e79e8c5ba520dae4a2741b96c9ed9;p=mesa.git st/mesa: allow 2D indexing for all shader types in translate_src() Reviewed-by: Roland Scheidegger --- diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 256f356623b..d660a6be7cb 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4488,7 +4488,10 @@ translate_src(struct st_translate *t, const st_src_reg *src_reg) { struct ureg_src src = src_register(t, src_reg->file, src_reg->index, src_reg->index2D); - if (t->procType == TGSI_PROCESSOR_GEOMETRY && src_reg->has_index2) { + if (src_reg->has_index2) { + /* 2D indexes occur with geometry shader inputs (attrib, vertex) + * and UBO constant buffers (buffer, position). + */ src = src_register(t, src_reg->file, src_reg->index, src_reg->index2D); if (src_reg->reladdr2) src = ureg_src_dimension_indirect(src, ureg_src(t->address[1]),