From 9c98be7115cea65c46cfbb53796f746d20e09b03 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 5 Sep 2023 15:20:31 -0700 Subject: [PATCH] vulkan/runtime: fix image type check for ETC2 emulation There was a typo causing the wrong push constant to be loaded. Part-of: --- src/vulkan/runtime/vk_texcompress_etc2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vulkan/runtime/vk_texcompress_etc2.c b/src/vulkan/runtime/vk_texcompress_etc2.c index a4333fabc95..9b66535e519 100644 --- a/src/vulkan/runtime/vk_texcompress_etc2.c +++ b/src/vulkan/runtime/vk_texcompress_etc2.c @@ -173,7 +173,7 @@ etc2_build_shader(struct vk_device *dev, const struct nir_shader_compiler_option nir_def *global_id = get_global_ids(&b, 3); nir_def *consts = nir_load_push_constant(&b, 4, 32, nir_imm_int(&b, 0), .range = 16); - nir_def *consts2 = nir_load_push_constant(&b, 1, 32, nir_imm_int(&b, 0), .base = 0, .range = 4); + nir_def *consts2 = nir_load_push_constant(&b, 1, 32, nir_imm_int(&b, 0), .base = 16, .range = 4); nir_def *offset = nir_channels(&b, consts, 7); nir_def *format = nir_channel(&b, consts, 3); nir_def *image_type = nir_channel(&b, consts2, 0);