Added additional changes for the new AccelerationStructureNV type. (#2218)
* Added additional changes for the new AccelerationStructureNV type.
* Added additional changes for the new AccelerationStructureNV type. Change tabs to space...
* Added additional changes for the new accelerationStructureNV type -- add proper type name.
Fix TypeManager.TypeStrings test:
[----------] 29 tests from TypeManager
[ RUN ] TypeManager.TypeStrings
[ OK ] TypeManager.TypeStrings (7 ms)
diff --git a/source/opt/ir_context.cpp b/source/opt/ir_context.cpp
index af9ac1a..ad453ae 100644
--- a/source/opt/ir_context.cpp
+++ b/source/opt/ir_context.cpp
@@ -328,6 +328,7 @@
SpvOpTypeImage,
SpvOpTypeSampler,
SpvOpTypeSampledImage,
+ SpvOpTypeAccelerationStructureNV,
SpvOpTypeArray,
SpvOpTypeRuntimeArray,
SpvOpTypeStruct,
diff --git a/source/opt/type_manager.cpp b/source/opt/type_manager.cpp
index 722b9b9..001883c 100644
--- a/source/opt/type_manager.cpp
+++ b/source/opt/type_manager.cpp
@@ -744,6 +744,9 @@
case SpvOpTypeNamedBarrier:
type = new NamedBarrier();
break;
+ case SpvOpTypeAccelerationStructureNV:
+ type = new AccelerationStructureNV();
+ break;
default:
SPIRV_UNIMPLEMENTED(consumer_, "unhandled type");
break;
diff --git a/source/opt/types.h b/source/opt/types.h
index d77117d..fe0f39a 100644
--- a/source/opt/types.h
+++ b/source/opt/types.h
@@ -598,7 +598,7 @@
DefineParameterlessType(Queue, queue);
DefineParameterlessType(PipeStorage, pipe_storage);
DefineParameterlessType(NamedBarrier, named_barrier);
-DefineParameterlessType(AccelerationStructureNV, acceleration_structure);
+DefineParameterlessType(AccelerationStructureNV, accelerationStructureNV);
#undef DefineParameterlessType
} // namespace analysis
diff --git a/test/opt/type_manager_test.cpp b/test/opt/type_manager_test.cpp
index fc9089e..1072c36 100644
--- a/test/opt/type_manager_test.cpp
+++ b/test/opt/type_manager_test.cpp
@@ -200,6 +200,7 @@
%pipe = OpTypePipe ReadOnly
%ps = OpTypePipeStorage
%nb = OpTypeNamedBarrier
+ %rtacc = OpTypeAccelerationStructureNV
)";
std::vector<std::pair<uint32_t, std::string>> type_id_strs = {
@@ -231,6 +232,7 @@
{26, "pipe(0)"},
{27, "pipe_storage"},
{28, "named_barrier"},
+ {29, "accelerationStructureNV"},
};
std::unique_ptr<IRContext> context =