vulkan/runtime: fix image type check for ETC2 emulation

There was a typo causing the wrong push constant to be loaded.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25071>
This commit is contained in:
Chia-I Wu
2023-09-05 15:20:31 -07:00
committed by Marge Bot
parent afdbeaf1b4
commit 9c98be7115

View File

@@ -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);