agx: Implement texture offsets and comparators

Texture offsets and shadow comparison values get grouped into a vector
passed by register. Comparison values are provided as-is (fp32). Texture
offsets are packed into nibbles, but we can do this on the CPU, as
nonconstant offsets are forbidden in GLSL at least. They're also
forbidden in Vulkan/SPIR-V without ImageGatherExtended/
shaderImageGatherExtended. I'm happy kicking the NIR lowering can down
the line, this commit is complicated enough already.

Passes dEQP-GLES3.functional.shaders.texture_functions.texture.* and
dEQP-GLES3.functional.shaders.texture_functions.textureoffset.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18525>
This commit is contained in:
Alyssa Rosenzweig
2022-09-08 18:59:35 -04:00
committed by Marge Bot
parent 4f85a7be8c
commit 7a4e0a4d35
5 changed files with 62 additions and 18 deletions

View File

@@ -319,6 +319,8 @@ typedef struct {
/* TODO: Handle tex ops more efficient */
enum agx_dim dim : 3;
bool offset : 1;
bool shadow : 1;
/* Final st_vary op */
bool last : 1;