From 00ff60f799c3e8a2d0c4d7933b60b3f8f69f092c Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 12 Apr 2021 12:24:50 +0200 Subject: [PATCH] gallivm: add 16-bit integer support The new failure here is due to a bug in the test-case, and a fix has been submitted here: https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/502 Reviewed-by: Dave Airlie Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_limits.h | 3 ++- src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_shader.txt | 1 + src/gallium/drivers/llvmpipe/lp_screen.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_limits.h b/src/gallium/auxiliary/gallivm/lp_bld_limits.h index 79f91b40abb..ab61f58021a 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_limits.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_limits.h @@ -128,9 +128,10 @@ gallivm_get_shader_param(enum pipe_shader_cap param) case PIPE_SHADER_CAP_FP16: case PIPE_SHADER_CAP_FP16_DERIVATIVES: case PIPE_SHADER_CAP_FP16_CONST_BUFFERS: + return 0; case PIPE_SHADER_CAP_INT16: case PIPE_SHADER_CAP_GLSL_16BIT_CONSTS: - return 0; + return 1; case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: return PIPE_MAX_SAMPLERS; case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: diff --git a/src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_shader.txt b/src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_shader.txt index 351c7386f94..357c4b63d2a 100644 --- a/src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_shader.txt +++ b/src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_shader.txt @@ -227,6 +227,7 @@ spec/glsl-4.00/execution/conversion/vert-conversion-explicit-dvec2-vec2: fail spec/glsl-4.00/execution/conversion/vert-conversion-explicit-dvec3-vec3: fail spec/glsl-4.00/execution/conversion/vert-conversion-explicit-dvec4-vec4: fail spec/glsl-4.50/execution/ssbo-atomiccompswap-int: fail +spec/glsl-es-3.10/execution/fs-simple-atomic-counter-inc-dec-read: fail spec/intel_shader_atomic_float_minmax/execution/shared-atomiccompswap-float: skip spec/intel_shader_atomic_float_minmax/execution/shared-atomicexchange-float: skip spec/intel_shader_atomic_float_minmax/execution/shared-atomicmax-float: skip diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 0fc288ecb93..c568d580c1b 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -589,6 +589,7 @@ static const struct nir_shader_compiler_options gallivm_nir_options = { .lower_uniforms_to_ubo = true, .lower_vector_cmp = true, .lower_device_index_to_zero = true, + .support_16bit_alu = true, }; static void