VK_KHR_variable_pointers: Don't use OpPtrAccessChain on a bare SSBO
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 19 Oct 2017 16:07:52 +0000 (09:07 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 31 Oct 2017 09:15:11 +0000 (05:15 -0400)
commitc66859de319168016aadcfe317784185568db549
treed660b568f603056644db8f708ccfdc12f51cb57f
parent1c48146763d1754ea9c6491d06b4805c89c1ecd8
VK_KHR_variable_pointers: Don't use OpPtrAccessChain on a bare SSBO

You can't use OpPtrAccessChain on the direct result of an OpVariable
because it's not the element of any array.  Instead, we need to do our
OpPtrAccessChain on a pointer to an actual array element and that
pointer needs to be properly decorated with a stride.

Component: Vulkan

VK-GL-CTS issue: https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/686

Affects:
dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.multi_buffer_*

Change-Id: I9c45fb1320099e404672ee169a6a8e5c41eb13f7
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmVariablePointersTests.cpp