summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-07-01 07:55:00 -0600
committerBrian Paul <[email protected]>2014-07-01 09:42:44 -0600
commitdfca35f8078e79e8c5ba520dae4a2741b96c9ed9 (patch)
tree1fbbde5f6a82b20939ba9fbf45bac2df37b18436 /src
parentf11e3dc122d6fba23bf01f0ec2d27cd8e26cf534 (diff)
st/mesa: allow 2D indexing for all shader types in translate_src()
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp5
1 files changed, 4 insertions, 1 deletions
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]),