diff options
author | Eric Anholt <[email protected]> | 2020-01-21 14:36:32 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-26 18:17:46 +0000 |
commit | 5ec3747fbe8e1d5a5a8b29b123b843b57ce77c6e (patch) | |
tree | a80de22a1898331390c59276882ac5174fa124f2 /src/freedreno/ir3/ir3_compiler_nir.c | |
parent | 2ec4c53ef94901bd7d1623047c52dcdb98a9764f (diff) |
freedreno/ir3: Use RESINFO for a6xx image size queries.
The closed GL driver uses resinfo on images with the writeonly flag (using
the texture-path's getsize only for readonly images). The closed vulkan
driver seems to use resinfo regardless. Using resinfo doesn't need any
fixups after the instruction. It also avoids one of the needs for the
TEX_CONST state for the image, which is awkward to set up in the GL
driver.
The new handler goes into ir3_a6xx to be next to the other current image
code, but the a4xx version is left in place because it wants a bunch of
sampler helpers.
Fixes assertion failure in dEQP-VK.image.image_size.buffer.readonly_32.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3501>
Diffstat (limited to 'src/freedreno/ir3/ir3_compiler_nir.c')
-rw-r--r-- | src/freedreno/ir3/ir3_compiler_nir.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index e12a814abd8..054c679aedf 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -1175,8 +1175,9 @@ emit_intrinsic_load_image(struct ir3_context *ctx, nir_intrinsic_instr *intr, ir3_split_dest(b, dst, sam, 0, 4); } -static void -emit_intrinsic_image_size(struct ir3_context *ctx, nir_intrinsic_instr *intr, +/* A4xx version of image_size, see ir3_a6xx.c for newer resinfo version. */ +void +emit_intrinsic_image_size_tex(struct ir3_context *ctx, nir_intrinsic_instr *intr, struct ir3_instruction **dst) { struct ir3_block *b = ctx->block; @@ -1726,7 +1727,7 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr) break; case nir_intrinsic_image_size: case nir_intrinsic_bindless_image_size: - emit_intrinsic_image_size(ctx, intr, dst); + ctx->funcs->emit_intrinsic_image_size(ctx, intr, dst); break; case nir_intrinsic_image_atomic_add: case nir_intrinsic_bindless_image_atomic_add: |