vk/meta: Fix base_type selection in build_{clear,blit}_shader()
vk_format_is_int() returns true for both signed and unsigned integers, which means unsigned types will always be assigned a GLSL_TYPE_INT type, which causes some backend compilers (like bifrost) to pick a wrong register type. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28073>
This commit is contained in:

committed by
Marge Bot

parent
c722265c16
commit
6fab8abebb
@@ -263,7 +263,7 @@ build_blit_shader(const struct vk_meta_blit_key *key)
|
||||
switch (aspect) {
|
||||
case VK_IMAGE_ASPECT_COLOR_BIT:
|
||||
tex_name = "color_tex";
|
||||
if (vk_format_is_int(key->dst_format))
|
||||
if (vk_format_is_sint(key->dst_format))
|
||||
base_type = GLSL_TYPE_INT;
|
||||
else if (vk_format_is_uint(key->dst_format))
|
||||
base_type = GLSL_TYPE_UINT;
|
||||
|
@@ -71,7 +71,7 @@ build_clear_shader(const struct vk_meta_clear_key *key)
|
||||
nir_load_deref(b, nir_build_deref_array_imm(b, push_arr, a));
|
||||
|
||||
const struct glsl_type *out_type;
|
||||
if (vk_format_is_int(key->render.color_attachment_formats[a]))
|
||||
if (vk_format_is_sint(key->render.color_attachment_formats[a]))
|
||||
out_type = glsl_ivec4_type();
|
||||
else if (vk_format_is_uint(key->render.color_attachment_formats[a]))
|
||||
out_type = glsl_uvec4_type();
|
||||
|
Reference in New Issue
Block a user