[Mesa-dev] [PATCH] nir/lower_tex: fix typo with sample_dim

Jason Ekstrand jason at jlekstrand.net
Thu Sep 8 21:22:18 UTC 2016


On Thu, Sep 8, 2016 at 12:53 PM, Rob Clark <robdclark at gmail.com> wrote:

> Numeric 2 is actually GLSL_SAMPLER_DIM_3D, which I don't think is what
> was intended.
>
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> ---
>  src/compiler/nir/nir_lower_tex.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/compiler/nir/nir_lower_tex.c
> b/src/compiler/nir/nir_lower_tex.c
> index a405758..0efd443 100644
> --- a/src/compiler/nir/nir_lower_tex.c
> +++ b/src/compiler/nir/nir_lower_tex.c
> @@ -211,7 +211,7 @@ sample_plane(nir_builder *b, nir_tex_instr *tex, int
> plane)
>     plane_tex->src[1].src = nir_src_for_ssa(nir_imm_int(b, plane));
>     plane_tex->src[1].src_type = nir_tex_src_plane;
>     plane_tex->op = nir_texop_tex;
> -   plane_tex->sampler_dim = 2;
> +   plane_tex->sampler_dim = GLSL_SAMPLER_DIM_2D;
>

Ugh... 2 doesn't even map to 2D. :(

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>


>     plane_tex->dest_type = nir_type_float;
>     plane_tex->coord_components = 2;
>
> --
> 2.7.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160908/2bd2196b/attachment-0001.html>


More information about the mesa-dev mailing list