vkd3d-shader/spirv: Allow gradient sampling cube textures.
Currently emitting gradient sampling assumes that the number of components of the gradient is the same as the number of components of offsets. This is not correct, because offsets are not allowed for cube textures, while gradient sampling is allowed for cube textures.
This commit splits the concepts of offset component count and gradient component count. The gradient component count is indeed equal to the offset component count for all the texture dimensions where the latter makes sense, but is also defined for cube textures.
This commit fixes the compilation of shaders in Star Wars Jedi: Survivor, which make use of gradient sampling a cube texture.
Merge request reports
Activity
added 1 commit
- c81ce422 - vkd3d-shader/spirv: Allow gradient sampling cube textures.
But both of these are essentially "coordinate_component_count - arrayed", i.e., the number of components required to address a single array slice. (Which incidentally is the calculation the GLSL backend uses.) I'd also like to see some tests for this; if not immediately then at least eventually.
added 1 commit
- 47281f89 - vkd3d-shader/spirv: Allow gradient sampling cube textures.
added 4 commits
-
47281f89...c34dc817 - 3 commits from branch
wine:master
- 7412e660 - vkd3d-shader/spirv: Get rid of the "offset_component_count" field of struct...
-
47281f89...c34dc817 - 3 commits from branch