summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-05-10 11:41:02 +1000
committerDave Airlie <[email protected]>2016-05-10 13:14:29 +1000
commitf75a26d1ba6336d1e8a760ad106642f34265b64c (patch)
treefc3fab789a566bd783a8960fca8f5035696449c3 /src/mesa
parentaa730aca20a04e46109fceb4cf99c00b35a135cf (diff)
st/glsl_to_tgsi: handle offsets from inputs
This fixes: GL45-CTS.gpu_shader5.texture_gather_offset_color_repeat Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 060e854caa1..7489fa368cf 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5581,6 +5581,15 @@ translate_tex_offset(struct st_translate *t,
offset.SwizzleZ = imm_src.SwizzleZ;
offset.Padding = 0;
break;
+ case PROGRAM_INPUT:
+ imm_src = t->inputs[t->inputMapping[imm_src.Index]];
+ offset.File = imm_src.File;
+ offset.Index = imm_src.Index;
+ offset.SwizzleX = GET_SWZ(in_offset->swizzle, 0);
+ offset.SwizzleY = GET_SWZ(in_offset->swizzle, 1);
+ offset.SwizzleZ = GET_SWZ(in_offset->swizzle, 2);
+ offset.Padding = 0;
+ break;
case PROGRAM_TEMPORARY:
imm_src = ureg_src(t->temps[in_offset->index]);
offset.File = imm_src.File;