diff options
author | Lionel Landwerlin <[email protected]> | 2016-08-24 17:52:12 +0100 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-08-24 11:29:23 -0700 |
commit | 91987c51e31306bcc52d2c9d18895a533ab08822 (patch) | |
tree | 1a4816dda02cc82a49abb726ba9252736968a927 | |
parent | 87a88f2daabfe14b12d447b3d96b9f8938c5cf03 (diff) |
anv: meta_blit2d: adapt texel fetch pitch for fake w-tiled
We need to compute detiling coordinates using the physical size of W tiling
(128x32) rather than the logical size (64x64).
v2: Correct comment (Jason)
Fixes dEQP-VK.api.copy_and_blit.image_to_image_stencil
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97448
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_meta_blit2d.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_meta_blit2d.c b/src/intel/vulkan/anv_meta_blit2d.c index 7085f2da8b1..6b2222c73b5 100644 --- a/src/intel/vulkan/anv_meta_blit2d.c +++ b/src/intel/vulkan/anv_meta_blit2d.c @@ -914,9 +914,11 @@ build_nir_w_tiled_fetch(struct nir_builder *b, struct anv_device *device, /* First, compute the block-aligned offset */ nir_ssa_def *x_major = nir_ushr(b, x, nir_imm_int(b, 6)); nir_ssa_def *y_major = nir_ushr(b, y, nir_imm_int(b, 6)); + /* W tiles have physical size of 128x32 and logical size of 64x64, hence + * the multiplication by 32 (instead of 64). */ nir_ssa_def *offset = nir_iadd(b, nir_imul(b, y_major, - nir_imul(b, tex_pitch, nir_imm_int(b, 64))), + nir_imul(b, tex_pitch, nir_imm_int(b, 32))), nir_imul(b, x_major, nir_imm_int(b, 4096))); /* Compute the bottom 12 bits of the offset */ |