From a00dc69ca8dfbc346940c7d03d67c1cb229577fb Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Fri, 3 Feb 2023 12:18:49 +0800 Subject: Use SPIR-V opcode names rather than numbers (#2571) * s/emititng blobal/emitting global * Use SPIR-V opcode names rather than numbers * regenerate Visual Studio project files * Use names for extended SPIR-V GLSL instructions * Add missing operand for SPIR-V extended instruction * Add warning aginst modifying generated hashing files * Squash warnings on MSVC --- source/slang/slang-emit-spirv.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-emit-spirv.cpp') diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp index 09ad3be58..47537b108 100644 --- a/source/slang/slang-emit-spirv.cpp +++ b/source/slang/slang-emit-spirv.cpp @@ -915,6 +915,7 @@ struct SPIRVEmitContext getSection(SpvLogicalSectionID::ExtIntInstImports), nullptr, SpvOpExtInstImport, + kResultID, UnownedStringSlice("GLSL.std.450")); return m_glsl450ExtInst; } @@ -1213,7 +1214,7 @@ struct SPIRVEmitContext // ... default: - SLANG_UNIMPLEMENTED_X("unhandled instruction opcode"); + SLANG_UNIMPLEMENTED_X("unhandled instruction opcode for global instruction"); UNREACHABLE_RETURN(nullptr); } } @@ -1568,7 +1569,7 @@ struct SPIRVEmitContext // The instructions that appear inside the basic blocks of // functions are what we will call "local" instructions. // - // When emititng blobal instructions, we usually have to + // When emitting global instructions, we usually have to // pick the right logical section to emit them into, while // for local instructions they will usually emit into // a known parent (the basic block that contains them). @@ -1579,7 +1580,7 @@ struct SPIRVEmitContext switch( inst->getOp() ) { default: - SLANG_UNIMPLEMENTED_X("unhandled instruction opcode"); + SLANG_UNIMPLEMENTED_X("unhandled instruction opcode for local instruction"); break; case kIROp_Specialize: return nullptr; -- cgit v1.2.3