[Mesa-dev] [PATCH 4/4] i965/fs: include multisamplers on image_intrinsic_coord_components

Jason Ekstrand jason at jlekstrand.net
Wed Sep 5 14:44:10 UTC 2018


On Wed, Sep 5, 2018 at 9:11 AM Alejandro PiƱeiro <apinheiro at igalia.com>
wrote:

> This is the second patch needed to fix the following piglit tests:
>
>    tests/spec/arb_gl_spirv/linker/uniform/multisampler.shader_test
>    tests/spec/arb_gl_spirv/linker/uniform/multisampler-array.shader_test
>
> Although in this case it doesn't affect so many borrowed tests, as
> there aren't too many tests using multisamplers on Intel.
>
> It is worth to note that this patch is also needed when those tests
> are run on GLSL mode (using the --glsl option). Although most Intel
> drivers would not be able to run/execute tests using multisamplers, as
> GL_MAX_IMAGE_SAMPLES is zero, technically those tests are expected to
> link correctly, so linking tests should pass.
>

That's a bit aggrivating... Oh, well.


> ---
>  src/intel/compiler/brw_fs_nir.cpp | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/intel/compiler/brw_fs_nir.cpp
> b/src/intel/compiler/brw_fs_nir.cpp
> index 2fef050f81a..eef3453672c 100644
> --- a/src/intel/compiler/brw_fs_nir.cpp
> +++ b/src/intel/compiler/brw_fs_nir.cpp
> @@ -3815,6 +3815,8 @@ image_intrinsic_coord_components(nir_intrinsic_instr
> *instr)
>        return 3;
>     case GLSL_SAMPLER_DIM_BUF:
>        return 1;
> +   case GLSL_SAMPLER_DIM_MS:
> +      return 2;
>

This should be 2 + nir_intrinsic_image_array(instr) because multisampled
images can also be arrays.  With that fixed,

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180905/446f8571/attachment-0001.html>


More information about the mesa-dev mailing list