Fix 16bit_storage out of bounds buffer accesses
authorDaniel Koch <dkoch@nvidia.com>
Wed, 21 Jun 2017 14:21:04 +0000 (10:21 -0400)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 23 Jun 2017 20:28:55 +0000 (16:28 -0400)
VK-GL-CTS Issue: 518
Component: Vulkan

Affects:
dEQP-VK.spirv_assembly.instruction.compute.16bit_storage.push_constant_16_to_32.vector_sint
dEQP-VK.spirv_assembly.instruction.compute.16bit_storage.push_constant_16_to_32.vector_uint

Change-Id: I33d3c94388a8eacac78a617ba7711b3688701323
(cherry picked from commit 5bad3cacecc5de4868365cb854f9433c79770c5f)

external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsm16bitStorageTests.cpp

index 71aa57a..50a6c4e 100644 (file)
@@ -944,7 +944,7 @@ void addCompute16bitStoragePushConstant16To32Group (tcu::TestCaseGroup* group)
                        specs["convert"]                = cTypes[tyIdx].opcode;
 
                        spec.assembly                   = shaderTemplate.specialize(specs);
-                       spec.numWorkGroups              = IVec3(numElements, 1, 1);
+                       spec.numWorkGroups              = IVec3(cTypes[tyIdx].count, 1, 1);
                        spec.pushConstants              = BufferSp(new Int16Buffer(inputs));
 
                        if (cTypes[tyIdx].isSigned)