Fix inconsistent ray payloads in RT barrier tests
authorRicardo Garcia <rgarcia@igalia.com>
Fri, 30 Apr 2021 08:27:31 +0000 (10:27 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 13 May 2021 18:02:08 +0000 (18:02 +0000)
Ray payload declarations (outgoing and incoming) were not consistent
across all ray shader stages in the ray tracing pipeline barrier tests.

In addition, this commit fixes payload and callable data names to make
it clear they are not used.

Affected tests:
dEQP-VK.ray_tracing_pipeline.barrier.*

VK-GL-CTS issue: 2900
Components: Vulkan

Change-Id: If764cf3cde9effb5868a7c03a0b2200cf9d90cb8

external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingBarrierTests.cpp

index 3ab2874c59c3f93d027725695a1ad52929dbde9f..e84bfe74cd1c354cecfbc3849e723ee94022bd2e 100644 (file)
@@ -489,7 +489,7 @@ void BarrierTestCase::initPrograms (SourceCollections& programCollection) const
                ahit
                        << "#version 460 core\n"
                        << "#extension GL_EXT_ray_tracing : require\n"
-                       << "layout(location = 0) rayPayloadInEXT vec3 hitValue;\n"
+                       << "layout(location = 0) rayPayloadInEXT vec3 unusedPayload;\n"
                        << "hitAttributeEXT vec3 attribs;\n"
                        << writerResourceDecl.str()
                        << "void main()\n"
@@ -508,7 +508,7 @@ void BarrierTestCase::initPrograms (SourceCollections& programCollection) const
                chit
                        << "#version 460 core\n"
                        << "#extension GL_EXT_ray_tracing : require\n"
-                       << "layout(location = 0) rayPayloadInEXT vec3 hitValue;\n"
+                       << "layout(location = 0) rayPayloadInEXT vec3 unusedPayload;\n"
                        << "hitAttributeEXT vec3 attribs;\n"
                        << writerResourceDecl.str()
                        << "void main()\n"
@@ -527,7 +527,7 @@ void BarrierTestCase::initPrograms (SourceCollections& programCollection) const
                miss
                        << "#version 460 core\n"
                        << "#extension GL_EXT_ray_tracing : require\n"
-                       << "layout(location = 0) rayPayloadInEXT dummyPayload { vec4 dummy; };\n"
+                       << "layout(location = 0) rayPayloadInEXT vec3 unusedPayload;\n"
                        << writerResourceDecl.str()
                        << "void main()\n"
                        << "{\n"
@@ -544,7 +544,7 @@ void BarrierTestCase::initPrograms (SourceCollections& programCollection) const
                        rgen
                                << "#version 460 core\n"
                                << "#extension GL_EXT_ray_tracing : require\n"
-                               << "layout(location = 0) callableDataEXT float dummy;"
+                               << "layout(location = 0) callableDataEXT float unusedCallableData;"
                                << "layout(set = 0, binding = 1) uniform accelerationStructureEXT topLevelAS;\n"
                                << "\n"
                                << "void main()\n"
@@ -559,7 +559,7 @@ void BarrierTestCase::initPrograms (SourceCollections& programCollection) const
                callable
                        << "#version 460 core\n"
                        << "#extension GL_EXT_ray_tracing : require\n"
-                       << "layout(location = 0) callableDataInEXT float dummy;\n"
+                       << "layout(location = 0) callableDataInEXT float unusedCallableData;\n"
                        << writerResourceDecl.str()
                        << "void main()\n"
                        << "{\n"
@@ -665,7 +665,7 @@ void BarrierTestCase::initPrograms (SourceCollections& programCollection) const
                ahit
                        << "#version 460 core\n"
                        << "#extension GL_EXT_ray_tracing : require\n"
-                       << "layout(location = 0) rayPayloadInEXT vec3 hitValue;\n"
+                       << "layout(location = 0) rayPayloadInEXT vec3 unusedPayload;\n"
                        << "hitAttributeEXT vec3 attribs;\n"
                        << readerAllDecls
                        << "void main()\n"
@@ -684,7 +684,7 @@ void BarrierTestCase::initPrograms (SourceCollections& programCollection) const
                chit
                        << "#version 460 core\n"
                        << "#extension GL_EXT_ray_tracing : require\n"
-                       << "layout(location = 0) rayPayloadInEXT vec3 hitValue;\n"
+                       << "layout(location = 0) rayPayloadInEXT vec3 unusedPayload;\n"
                        << "hitAttributeEXT vec3 attribs;\n"
                        << readerAllDecls
                        << "void main()\n"
@@ -703,7 +703,7 @@ void BarrierTestCase::initPrograms (SourceCollections& programCollection) const
                miss
                        << "#version 460 core\n"
                        << "#extension GL_EXT_ray_tracing : require\n"
-                       << "layout(location = 0) rayPayloadInEXT dummyPayload { vec4 dummy; };\n"
+                       << "layout(location = 0) rayPayloadInEXT vec3 unusedPayload;\n"
                        << readerAllDecls
                        << "void main()\n"
                        << "{\n"
@@ -720,7 +720,7 @@ void BarrierTestCase::initPrograms (SourceCollections& programCollection) const
                        rgen
                                << "#version 460 core\n"
                                << "#extension GL_EXT_ray_tracing : require\n"
-                               << "layout(location = 0) callableDataEXT float dummy;"
+                               << "layout(location = 0) callableDataEXT float unusedCallableData;"
                                << "layout(set = 0, binding = 1) uniform accelerationStructureEXT topLevelAS;\n"
                                << "\n"
                                << "void main()\n"
@@ -735,7 +735,7 @@ void BarrierTestCase::initPrograms (SourceCollections& programCollection) const
                callable
                        << "#version 460 core\n"
                        << "#extension GL_EXT_ray_tracing : require\n"
-                       << "layout(location = 0) callableDataInEXT float dummy;\n"
+                       << "layout(location = 0) callableDataInEXT float unusedCallableData;\n"
                        << readerAllDecls
                        << "void main()\n"
                        << "{\n"