Open Keenuts opened 1 month ago
I don't think this can be implemented in a straight forward way. The problem is that the new instruction retrieves "a single value that represents a raw, bitwise copy of all of the element’s channels without any conversion of texture contents." As far a I can tell, no existing Vulkan instruction will do that.
When we talked about that, it seemed we'd need to to 4 OpImageGather
calls to recombine the N components. But I saw the GatherRaw limits thew formats of the textures to single channels, or worst case, 2 channels textures. So doesn't this means in most cases, we would have a single OpImageGather
to do? And in a very few cases 2?
The issue the the bitwise copy. AFAIK, all of the existing instructions will do a format conversion. The point of RawGather is to avoid the format conversion.
Shader Model 6.7 added Raw Gather Methods which are currently unimplemented in the SPIR-V backend.