You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting SM6.7, offsets can be variables in the sample/load texture operations.
Right now, this is not supported in the SPIR-V backend, as we use an sample instruction which cannot use the Offset operand, but only the ConstOffset.
$ dxc -T ps_6_7 shader.hlsl -spirv -fspv-target-env=vulkan1.3
fatal error: generated SPIR-V is invalid: [VUID-StandaloneSpirv-Offset-04663] Image Operand Offset can only be used with OpImage*Gather operations
%36 = OpImageSampleImplicitLod %v4float %35 %14 Offset %34
note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible
The text was updated successfully, but these errors were encountered:
The programmable offset cannot be done in Vulkan. As Nathan mentioned, only the Gather instructions can use the Offset image operand, so most sampling instruction cannot have a variable offset.
In general, the Gather instructions cannot be used to implement the other instructions. The main issue is that OpImageGather requires a component number, so it is not possible to load all components of a texel with a single load. It is also more limited in the types of images it supports.
I suggest we close this issue until SPIR-V is extended to implement this feature.
Starting SM6.7, offsets can be variables in the sample/load texture operations.
Right now, this is not supported in the SPIR-V backend, as we use an sample instruction which cannot use the
Offset
operand, but only theConstOffset
.See Programmable Offsets.
Seems like we should be able to implement this using the OpImageGather instruction, but haven't looked into it very carefully.
The text was updated successfully, but these errors were encountered: