Remove 64-bit int usage in dynamic_indexing test shaders
authorMohankumar Nekkarakalaya <mnekkara@qti.qualcomm.com>
Tue, 12 Oct 2021 18:58:22 +0000 (11:58 -0700)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Fri, 29 Oct 2021 14:40:31 +0000 (14:40 +0000)
- "OpCapability Int64" is not a mandatory extension
- Replace with v2i32

Components: Vulkan

VK-GL-CTS Issue: 3205

Affected tests:
dEQP-VK.ray_tracing_pipeline.acceleration_structures.dynamic_indexing.dynamic_indexing
dEQP-VK.ray_query.acceleration_structures.dynamic_indexing.dynamic_indexing

Change-Id: I04b7cf6309b42ef4572e5c79c8e9233aee2edec7

external/vulkancts/modules/vulkan/ray_query/vktRayQueryAccelerationStructuresTests.cpp
external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingAccelerationStructuresTests.cpp

index 573a831..f132bb9 100644 (file)
@@ -2845,12 +2845,11 @@ void RayQueryASDynamicIndexingTestCase::initPrograms(SourceCollections& programC
        // #version 460 core
        // #extension GL_EXT_ray_query : require
        // #extension GL_EXT_nonuniform_qualifier : enable
-       // #extension GL_ARB_gpu_shader_int64 : enable                  // needed only to generate spir-v
 
        // #define ARRAY_SIZE 500
        // layout(set = 0, binding = 0) uniform accelerationStructureEXT tlasArray[ARRAY_SIZE];
        // layout(set = 0, binding = 1) readonly buffer topLevelASPointers {
-       //     uint64_t ptr[];
+       //     uvec2 ptr[];
        // } tlasPointers;
        // layout(set = 0, binding = 2) readonly buffer topLevelASIndices {
        //     uint idx[];
@@ -2889,7 +2888,6 @@ void RayQueryASDynamicIndexingTestCase::initPrograms(SourceCollections& programC
        // }
 
        const std::string compSource =
-               "OpCapability Int64\n"
                "OpCapability Shader\n"
                "OpCapability RayQueryKHR\n"
                "OpCapability ShaderNonUniform\n"
@@ -2985,12 +2983,12 @@ void RayQueryASDynamicIndexingTestCase::initPrograms(SourceCollections& programC
                "%124                                           = OpConstant %type_uint32 7\n"
 
                // <changed_section>
-               "%type_uint64                           = OpTypeInt 64 0\n"
-               "%127                                           = OpTypeRuntimeArray %type_uint64\n"
+               "%v2uint                                        = OpTypeVector %type_uint32 2\n"
+               "%127                                           = OpTypeRuntimeArray %v2uint\n"
                "%128                                           = OpTypeStruct %127\n"
                "%129                                           = OpTypePointer StorageBuffer %128\n"
                "%var_as_pointers_ssbo          = OpVariable %129 StorageBuffer\n"
-               "%type_uint64_ssbo_ptr          = OpTypePointer StorageBuffer %type_uint64\n"
+               "%type_uint64_ssbo_ptr          = OpTypePointer StorageBuffer %v2uint\n"
                // </changed_section>
 
                // void main()
@@ -3059,7 +3057,7 @@ void RayQueryASDynamicIndexingTestCase::initPrograms(SourceCollections& programC
 
                // <changed_section>
                "%as_device_addres_ptr          = OpAccessChain %type_uint64_ssbo_ptr %var_as_pointers_ssbo %c_int32_0 %as_index\n"
-               "%as_device_addres                      = OpLoad %type_uint64 %as_device_addres_ptr Aligned 8\n"
+               "%as_device_addres                      = OpLoad %v2uint %as_device_addres_ptr\n"
                "%as_to_use                                     = OpConvertUToAccelerationStructureKHR %type_as %as_device_addres\n"
                // </changed_section>
 
index b57e171..3a6e6ba 100644 (file)
@@ -1919,13 +1919,12 @@ void RayTracingASDynamicIndexingTestCase::initPrograms(SourceCollections& progra
        // #version 460 core
        // #extension GL_EXT_ray_tracing : require
        // #extension GL_EXT_nonuniform_qualifier : enable
-       // #extension GL_ARB_gpu_shader_int64 : enable                  // needed only to generate spir-v
        // #define ARRAY_SIZE 500
        // layout(location = 0) rayPayloadEXT uvec2 payload;    // offset and flag indicating if we are using descriptors or pointers
 
        // layout(set = 0, binding = 0) uniform accelerationStructureEXT tlasArray[ARRAY_SIZE];
        // layout(set = 0, binding = 1) readonly buffer topLevelASPointers {
-       //     uint64_t ptr[];
+       //     uvec2 ptr[];
        // } tlasPointers;
        // layout(set = 0, binding = 2) readonly buffer topLevelASIndices {
        //     uint idx[];
@@ -1955,7 +1954,6 @@ void RayTracingASDynamicIndexingTestCase::initPrograms(SourceCollections& progra
        // };
 
        const std::string rgenSource =
-               "OpCapability Int64\n"
                "OpCapability RayTracingKHR\n"
                "OpCapability ShaderNonUniform\n"
                "OpExtension \"SPV_EXT_descriptor_indexing\"\n"
@@ -2047,12 +2045,11 @@ void RayTracingASDynamicIndexingTestCase::initPrograms(SourceCollections& progra
                "%91                                                    = OpConstant %type_uint32 3\n"
 
                // <changed_section>
-               "%type_uint64                                   = OpTypeInt 64 0\n"
-               "%104                                                   = OpTypeRuntimeArray %type_uint64\n"
+               "%104                                                   = OpTypeRuntimeArray %58\n"
                "%105                                                   = OpTypeStruct %104\n"
                "%106                                                   = OpTypePointer StorageBuffer %105\n"
                "%var_as_pointers_ssbo                  = OpVariable %106 StorageBuffer\n"
-               "%type_uint64_ssbo_ptr                  = OpTypePointer StorageBuffer %type_uint64\n"
+               "%type_uint64_ssbo_ptr                  = OpTypePointer StorageBuffer %58\n"
                // </changed_section>
 
                // void main()
@@ -2122,7 +2119,7 @@ void RayTracingASDynamicIndexingTestCase::initPrograms(SourceCollections& progra
 
                // <changed_section> OLD
                "%as_device_addres_ptr                  = OpAccessChain %type_uint64_ssbo_ptr %var_as_pointers_ssbo %c_int32_0 %as_index\n"
-               "%as_device_addres                              = OpLoad %type_uint64 %as_device_addres_ptr Aligned 8\n"
+               "%as_device_addres                              = OpLoad %58 %as_device_addres_ptr\n"
                "%as_to_use                                             = OpConvertUToAccelerationStructureKHR %type_as %as_device_addres\n"
                // </changed_section>