gallivm: add 16-bit integer support
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 12 Apr 2021 10:24:50 +0000 (12:24 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 20 Apr 2021 07:49:21 +0000 (07:49 +0000)
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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10185>

src/gallium/auxiliary/gallivm/lp_bld_limits.h
src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_shader.txt
src/gallium/drivers/llvmpipe/lp_screen.c

index 79f91b4..ab61f58 100644 (file)
@@ -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:
index 351c738..357c4b6 100644 (file)
@@ -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
index 0fc288e..c568d58 100644 (file)
@@ -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