mirror of
https://github.com/RPCS3/glslang.git
synced 2025-02-12 13:58:12 +00:00
Merge pull request #1345 from amdrexu/bugfix
Add AMD float16/int16 SPV extension string when GLSL specifies them
This commit is contained in:
commit
16b80f7897
@ -6126,6 +6126,11 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
|||||||
assert(builder.isPointerType(typeId1));
|
assert(builder.isPointerType(typeId1));
|
||||||
typeId1 = builder.getContainedTypeId(typeId1);
|
typeId1 = builder.getContainedTypeId(typeId1);
|
||||||
int width = builder.getScalarTypeWidth(typeId1);
|
int width = builder.getScalarTypeWidth(typeId1);
|
||||||
|
#ifdef AMD_EXTENSIONS
|
||||||
|
if (width == 16)
|
||||||
|
// Using 16-bit exp operand, enable extension SPV_AMD_gpu_shader_int16
|
||||||
|
builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16);
|
||||||
|
#endif
|
||||||
if (builder.getNumComponents(operands[0]) == 1)
|
if (builder.getNumComponents(operands[0]) == 1)
|
||||||
frexpIntType = builder.makeIntegerType(width, true);
|
frexpIntType = builder.makeIntegerType(width, true);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user