From 106019a5d8bfb16bf72a692016b1972eb446aa3d Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 23 Feb 2023 11:02:20 -0800 Subject: [PATCH] nir/split_64bit_vec3_and_vec4: Handle 64-bit matrix types. The offset handling should already work for flattening to our split vars, just need to make sure we have enough (or any!) array elements. Fixes: #7154 Reviewed-by: Timothy Arceri Part-of: --- src/compiler/nir/nir_split_64bit_vec3_and_vec4.c | 5 +++-- src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt | 5 ----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/compiler/nir/nir_split_64bit_vec3_and_vec4.c b/src/compiler/nir/nir_split_64bit_vec3_and_vec4.c index ea3281f8307..0ca5cd66a6a 100644 --- a/src/compiler/nir/nir_split_64bit_vec3_and_vec4.c +++ b/src/compiler/nir/nir_split_64bit_vec3_and_vec4.c @@ -147,8 +147,9 @@ get_var_pair(nir_builder *b, nir_variable *old_var, new_var->xy->type = glsl_dvec_type(2); new_var->zw->type = glsl_dvec_type(old_components - 2); - if (glsl_type_is_array(old_var->type)) { - unsigned array_size = glsl_get_aoa_size(old_var->type); + if (glsl_type_is_array_or_matrix(old_var->type)) { + const struct glsl_type *element_type = glsl_without_array(old_var->type); + unsigned array_size = glsl_get_aoa_size(old_var->type) * glsl_get_matrix_columns(element_type); new_var->xy->type = glsl_array_type(new_var->xy->type, array_size, 0); new_var->zw->type = glsl_array_type(new_var->zw->type, diff --git a/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt b/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt index a121c77e672..173339d7352 100644 --- a/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt +++ b/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt @@ -720,9 +720,4 @@ spec@!opengl 1.0@depth-clear-precision-check@depth32,Fail # https://gitlab.freedesktop.org/mesa/mesa/-/issues/7152 spec@ext_transform_feedback@builtin-varyings gl_culldistance,Fail -# https://gitlab.freedesktop.org/mesa/mesa/-/issues/7154 -spec@arb_enhanced_layouts@matching_fp64_types_1,Crash -spec@arb_enhanced_layouts@matching_fp64_types_2,Crash -spec@arb_enhanced_layouts@matching_fp64_types_3,Crash - spec@!opengl 1.1@line-smooth-stipple,Fail