From 55d2b82cc09953b104d46edc12524945e82eb45f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 1 Feb 2022 17:49:25 +1000 Subject: [PATCH] glsl/types: fix dword slots calc for float16 matricies. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current uniform query uploader for mat3 calcs things as if the vector elements are f16vec4 wide, so fix the calcs here to do the same. Fixes GTF-GL46.gtf21.GL.mat3.mat3arraysimple_frag on llvmpipe when 16-bit uniform lowering is allowed. Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl_types.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index c890928ab1b..63190eec9dd 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -2968,7 +2968,7 @@ glsl_type::count_dword_slots(bool is_bindless) const case GLSL_TYPE_UINT16: case GLSL_TYPE_INT16: case GLSL_TYPE_FLOAT16: - return DIV_ROUND_UP(this->components(), 2); + return DIV_ROUND_UP(this->vector_elements, 2) * this->matrix_columns; case GLSL_TYPE_UINT8: case GLSL_TYPE_INT8: return DIV_ROUND_UP(this->components(), 4);