From fc77070fdc9bfa599e8d66b21743778de3011e53 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 17 Jan 2025 14:37:27 -0800 Subject: Refactor _Texture to constrain on texel types. (#6115) * Refactor _Texture to constrain on texel types. * Fix tests. * Fix. * Disable glsl texture test because rhi can't run it correctly. --- source/slang/slang-emit-cpp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-emit-cpp.cpp') diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index b0d1fbb4c..13a85e8ab 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -614,7 +614,10 @@ void CPPSourceEmitter::emitGlobalRTTISymbolPrefix() void CPPSourceEmitter::emitWitnessTable(IRWitnessTable* witnessTable) { - auto interfaceType = cast(witnessTable->getConformanceType()); + auto interfaceType = as(witnessTable->getConformanceType()); + + if (!interfaceType) + return; // Ignore witness tables for builtin interface types. if (isBuiltin(interfaceType)) -- cgit v1.2.3