[Mesa-dev] [PATCH] st/glsl_to_tgsi: handle offsets from inputs

Nicolai Hähnle nhaehnle at gmail.com
Tue May 10 02:26:02 UTC 2016


Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

On 09.05.2016 20:41, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This fixes:
> GL45-CTS.gpu_shader5.texture_gather_offset_color_repeat
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>   src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index 060e854..7489fa3 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;
>


More information about the mesa-dev mailing list