SPV: Fix #1399 emit ImageGatherExtended when using ConstOffsets operand
This commit is contained in:
parent
ad7645f4f5
commit
ba018e6762
4
SPIRV/SpvBuilder.cpp
Normal file → Executable file
4
SPIRV/SpvBuilder.cpp
Normal file → Executable file
@ -1570,7 +1570,8 @@ Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, const
|
|||||||
|
|
||||||
// Accept all parameters needed to create a texture instruction.
|
// Accept all parameters needed to create a texture instruction.
|
||||||
// Create the correct instruction based on the inputs, and make the call.
|
// Create the correct instruction based on the inputs, and make the call.
|
||||||
Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicitLod, const TextureParameters& parameters)
|
Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather,
|
||||||
|
bool noImplicitLod, const TextureParameters& parameters)
|
||||||
{
|
{
|
||||||
static const int maxTextureArgs = 10;
|
static const int maxTextureArgs = 10;
|
||||||
Id texArgs[maxTextureArgs] = {};
|
Id texArgs[maxTextureArgs] = {};
|
||||||
@ -1623,6 +1624,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
|
|||||||
texArgs[numArgs++] = parameters.offset;
|
texArgs[numArgs++] = parameters.offset;
|
||||||
}
|
}
|
||||||
if (parameters.offsets) {
|
if (parameters.offsets) {
|
||||||
|
addCapability(CapabilityImageGatherExtended);
|
||||||
mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetsMask);
|
mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetsMask);
|
||||||
texArgs[numArgs++] = parameters.offsets;
|
texArgs[numArgs++] = parameters.offsets;
|
||||||
}
|
}
|
||||||
|
@ -460,6 +460,7 @@ using depth_any
|
|||||||
// Id's are bound by 164
|
// Id's are bound by 164
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability ImageGatherExtended
|
||||||
Capability Sampled1D
|
Capability Sampled1D
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
|
@ -5,6 +5,7 @@ spv.float16Fetch.frag
|
|||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability Float16
|
Capability Float16
|
||||||
|
Capability ImageGatherExtended
|
||||||
Capability StorageImageMultisample
|
Capability StorageImageMultisample
|
||||||
Capability ImageCubeArray
|
Capability ImageCubeArray
|
||||||
Capability ImageRect
|
Capability ImageRect
|
||||||
|
@ -4,6 +4,7 @@ spv.sparseTexture.frag
|
|||||||
// Id's are bound by 438
|
// Id's are bound by 438
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability ImageGatherExtended
|
||||||
Capability StorageImageMultisample
|
Capability StorageImageMultisample
|
||||||
Capability SampledRect
|
Capability SampledRect
|
||||||
Capability SparseResidency
|
Capability SparseResidency
|
||||||
|
@ -4,6 +4,7 @@ spv.textureGatherBiasLod.frag
|
|||||||
// Id's are bound by 298
|
// Id's are bound by 298
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability ImageGatherExtended
|
||||||
Capability SparseResidency
|
Capability SparseResidency
|
||||||
Capability SampledCubeArray
|
Capability SampledCubeArray
|
||||||
Capability ImageGatherBiasLodAMD
|
Capability ImageGatherBiasLodAMD
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
// This header is generated by the make-revision script.
|
// This header is generated by the make-revision script.
|
||||||
|
|
||||||
#define GLSLANG_PATCH_LEVEL 2765
|
#define GLSLANG_PATCH_LEVEL 2767
|
||||||
|
Loading…
x
Reference in New Issue
Block a user