[Mesa-dev] [PATCH] anv/lower_input_attachments: honor sample index parameter to subpassLoad()

Jason Ekstrand jason at jlekstrand.net
Wed Jan 25 17:03:45 UTC 2017


Oops...

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Cc: "17.0" <mesa-stable at lists.freedesktop.org>

On Wed, Jan 25, 2017 at 7:28 AM, Iago Toral Quiroga <itoral at igalia.com>
wrote:

> According to GL_KHR_vulkan_glsl, the signature of subpassLoad() is:
>
> gvec4 subpassLoad(gsubpassInput   subpass);
> gvec4 subpassLoad(gsubpassInputMS subpass, int sample);
>
> So the multisampled case always receives an explicit sample index that we
> should use. The current implementation was ignoring this parameter
> and using gl_SampleID value instead.
>
> Fixes:
> dEQP-VK.pipeline.multisample_shader_builtin.sample_id.*
> ---
>  src/intel/vulkan/anv_nir_lower_input_attachments.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_nir_lower_input_attachments.c
> b/src/intel/vulkan/anv_nir_lower_input_attachments.c
> index 1d6f727..244e7ff 100644
> --- a/src/intel/vulkan/anv_nir_lower_input_attachments.c
> +++ b/src/intel/vulkan/anv_nir_lower_input_attachments.c
> @@ -100,11 +100,8 @@ try_lower_input_load(nir_function_impl *impl,
> nir_intrinsic_instr *load)
>
>     if (image_dim == GLSL_SAMPLER_DIM_SUBPASS_MS) {
>        tex->op = nir_texop_txf_ms;
> -
> -      nir_ssa_def *sample_id =
> -         nir_load_system_value(&b, nir_intrinsic_load_sample_id, 0);
>        tex->src[2].src_type = nir_tex_src_ms_index;
> -      tex->src[2].src = nir_src_for_ssa(sample_id);
> +      tex->src[2].src = load->src[1];
>     }
>
>     nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, NULL);
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170125/e1c7993e/attachment-0001.html>


More information about the mesa-dev mailing list