mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-30 14:40:34 +00:00
Merge pull request #1383 from amdrexu/bugfix
Fix issue #1376: SPV_AMD_gpu_shader_half_float is not emitted under vulkan1.1
This commit is contained in:
commit
98e1d7f64b
@ -4630,6 +4630,10 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
|
||||
unaryOp = spv::OpFwidthCoarse;
|
||||
break;
|
||||
case glslang::EOpInterpolateAtCentroid:
|
||||
#ifdef AMD_EXTENSIONS
|
||||
if (typeProxy == glslang::EbtFloat16)
|
||||
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
|
||||
#endif
|
||||
builder.addCapability(spv::CapabilityInterpolationFunction);
|
||||
libCall = spv::GLSLstd450InterpolateAtCentroid;
|
||||
break;
|
||||
@ -6097,10 +6101,18 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
||||
libCall = spv::GLSLstd450Refract;
|
||||
break;
|
||||
case glslang::EOpInterpolateAtSample:
|
||||
#ifdef AMD_EXTENSIONS
|
||||
if (typeProxy == glslang::EbtFloat16)
|
||||
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
|
||||
#endif
|
||||
builder.addCapability(spv::CapabilityInterpolationFunction);
|
||||
libCall = spv::GLSLstd450InterpolateAtSample;
|
||||
break;
|
||||
case glslang::EOpInterpolateAtOffset:
|
||||
#ifdef AMD_EXTENSIONS
|
||||
if (typeProxy == glslang::EbtFloat16)
|
||||
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
|
||||
#endif
|
||||
builder.addCapability(spv::CapabilityInterpolationFunction);
|
||||
libCall = spv::GLSLstd450InterpolateAtOffset;
|
||||
break;
|
||||
@ -6251,6 +6263,8 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
||||
break;
|
||||
|
||||
case glslang::EOpInterpolateAtVertex:
|
||||
if (typeProxy == glslang::EbtFloat16)
|
||||
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
|
||||
extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_explicit_vertex_parameter);
|
||||
libCall = spv::InterpolateAtVertexAMD;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user