-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
Description
We need to implement handle the spv intrinsic add in #159608 in the SPIR-V backend. This intrinsic is used to indicate that the index to the resource array is non uniform. For SPIR-V, this means that we have to add the appropriate capability to the module. Which capability depends on the type of the resource array, and add the decoration to the index, and the access chain that does the indexing.
Most of the code for this is already in the SPIR-V backend. During ISel, in SPIRVInstructionSelector::buildPointerToResource, the IsNonUniform
is used to trigger all everything. For now, that value is always false.
The new implementation can be:
- When we see the new intrinsic, apply create a OpCopyObject and add the decoration SPIRV::Decoration::NonUniformEXT to the index.
- In SPIRVInstructionSelector::buildPointerToResource, remove the
IsNonUniform
parameter. If the index register has theSPIRV::Decoration::NonUniformEXT
decoration, then add the decoration to the access chain as well.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Ready