Commit 1790a40c by John Kessenich

SPV: Add missing break statements in type declarations.

This means the previously emitted code was incorrect.
parent d481e071
...@@ -2471,6 +2471,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty ...@@ -2471,6 +2471,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
case glslang::EbtUint8: case glslang::EbtUint8:
builder.addCapability(spv::CapabilityInt8); builder.addCapability(spv::CapabilityInt8);
spvType = builder.makeUintType(8); spvType = builder.makeUintType(8);
break;
case glslang::EbtInt16: case glslang::EbtInt16:
builder.addCapability(spv::CapabilityInt16); builder.addCapability(spv::CapabilityInt16);
#ifdef AMD_EXTENSIONS #ifdef AMD_EXTENSIONS
...@@ -2484,6 +2485,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty ...@@ -2484,6 +2485,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16); builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16);
#endif #endif
spvType = builder.makeUintType(16); spvType = builder.makeUintType(16);
break;
case glslang::EbtInt: case glslang::EbtInt:
spvType = builder.makeIntType(32); spvType = builder.makeIntType(32);
break; break;
......
...@@ -179,6 +179,7 @@ private: ...@@ -179,6 +179,7 @@ private:
range_t constRange(spv::Op opCode) const; range_t constRange(spv::Op opCode) const;
unsigned typeSizeInWords(spv::Id id) const; unsigned typeSizeInWords(spv::Id id) const;
unsigned idTypeSizeInWords(spv::Id id) const; unsigned idTypeSizeInWords(spv::Id id) const;
spv::Id& asId(unsigned word) { return spv[word]; } spv::Id& asId(unsigned word) { return spv[word]; }
const spv::Id& asId(unsigned word) const { return spv[word]; } const spv::Id& asId(unsigned word) const { return spv[word]; }
spv::Op asOpCode(unsigned word) const { return opOpCode(spv[word]); } spv::Op asOpCode(unsigned word) const { return opOpCode(spv[word]); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment