Mesa (master): turnip: update "fetchsize" value to match fdl6_layout changes
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 12 17:58:34 UTC 2020
Module: Mesa
Branch: master
Commit: f543d87f23555912110e2c0f67a57dcb99d94e08
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f543d87f23555912110e2c0f67a57dcb99d94e08
Author: Jonathan Marek <jonathan at marek.ca>
Date: Tue May 12 11:26:05 2020 -0400
turnip: update "fetchsize" value to match fdl6_layout changes
It seems this is actually a "minimum pitch" value. For example
TFETCH6_2_BYTE means a minimum pitch of 128 bytes for mipmap levels.
This fixes breakage with compressed formats. For example this test:
dEQP-VK.pipeline.sampler.view_type.2d.format.eac_r11_snorm_block.mipmap.linear.lod.equal_min_3_max_3
Fixes: a34b3fa198a4f ("freedreno/fdl: Align after dividing by block size")
Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5009>
---
src/freedreno/vulkan/tu_image.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c
index 280263b0f36..45dff2df951 100644
--- a/src/freedreno/vulkan/tu_image.c
+++ b/src/freedreno/vulkan/tu_image.c
@@ -151,10 +151,7 @@ tu_image_create(VkDevice _device,
enum a6xx_tex_fetchsize
tu6_fetchsize(VkFormat format)
{
- if (vk_format_description(format)->layout == UTIL_FORMAT_LAYOUT_ASTC)
- return TFETCH6_16_BYTE;
-
- switch (vk_format_get_blocksize(format) / vk_format_get_blockwidth(format)) {
+ switch (vk_format_get_blocksize(format)) {
case 1: return TFETCH6_1_BYTE;
case 2: return TFETCH6_2_BYTE;
case 4: return TFETCH6_4_BYTE;
More information about the mesa-commit
mailing list