OSDN Git Service

anv/lower_input_attachments: honor sample index parameter to subpassLoad()
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 25 Jan 2017 14:04:35 +0000 (15:04 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 3 Feb 2017 11:08:55 +0000 (11:08 +0000)
commitebfe5e17ee5e484737dd7055df0f6542983473ac
treed4de18ab8aa80e6e24ffd6440337d636101f0aa3
parentdcb3b24b86bb75f25f99e1a2bb13bb182d58f16f
anv/lower_input_attachments: honor sample index parameter to subpassLoad()

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.*

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 9b25769da63999fa65a70a14194a452c49d18f3e)
src/intel/vulkan/anv_nir_lower_input_attachments.c