From 2adb13f187fa02970a6c6a8cd60368a91a3e182b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 14 Apr 2020 14:00:11 +1000 Subject: [PATCH] llvmpipe/format: fix snorm conversion This fixes: GTF-GL45.gtf33.GL3Tests.vertex_type_2_10_10_10_rev.vertex_type_2_10_10_10_rev_conversion and piglit spec/arb_texture_view/rendering-formats/clear gl_rgba8_snorm as gl_r32f Reviewed-by: Roland Scheidegger Part-of: --- .gitlab-ci/deqp-virgl-gl-fails.txt | 2 -- .gitlab-ci/deqp-virgl-gles-fails.txt | 2 -- .gitlab-ci/piglit/quick_gl.txt | 6 ++---- src/gallium/auxiliary/gallivm/lp_bld_format_soa.c | 10 +++++----- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci/deqp-virgl-gl-fails.txt b/.gitlab-ci/deqp-virgl-gl-fails.txt index df790647cf5..92e0ea5a194 100644 --- a/.gitlab-ci/deqp-virgl-gl-fails.txt +++ b/.gitlab-ci/deqp-virgl-gl-fails.txt @@ -85,8 +85,6 @@ dEQP-GLES3.functional.rasterization.interpolation.basic.lines_wide dEQP-GLES3.functional.rasterization.interpolation.projected.line_loop_wide dEQP-GLES3.functional.rasterization.interpolation.projected.line_strip_wide dEQP-GLES3.functional.rasterization.interpolation.projected.lines_wide -dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.int2_10_10_10.components4_quads1 -dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.int2_10_10_10.components4_quads256 dEQP-GLES31.functional.atomic_counter.dec.1_counter_100_calls_10_threads dEQP-GLES31.functional.atomic_counter.dec.1_counter_100_calls_1_thread dEQP-GLES31.functional.atomic_counter.dec.1_counter_1_call_10_threads diff --git a/.gitlab-ci/deqp-virgl-gles-fails.txt b/.gitlab-ci/deqp-virgl-gles-fails.txt index e3d456552e3..cc536f0b8c2 100644 --- a/.gitlab-ci/deqp-virgl-gles-fails.txt +++ b/.gitlab-ci/deqp-virgl-gles-fails.txt @@ -86,8 +86,6 @@ dEQP-GLES3.functional.rasterization.interpolation.basic.lines_wide dEQP-GLES3.functional.rasterization.interpolation.projected.line_loop_wide dEQP-GLES3.functional.rasterization.interpolation.projected.line_strip_wide dEQP-GLES3.functional.rasterization.interpolation.projected.lines_wide -dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.int2_10_10_10.components4_quads1 -dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.int2_10_10_10.components4_quads256 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.8 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.4 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.9 diff --git a/.gitlab-ci/piglit/quick_gl.txt b/.gitlab-ci/piglit/quick_gl.txt index ec37260be8e..6df99b75778 100644 --- a/.gitlab-ci/piglit/quick_gl.txt +++ b/.gitlab-ci/piglit/quick_gl.txt @@ -880,7 +880,6 @@ spec/arb_texture_view/rendering-formats/clear gl_rgba8 as gl_rg16f: fail spec/arb_texture_view/rendering-formats/clear gl_rgba8 as gl_rg16i: fail spec/arb_texture_view/rendering-formats/clear gl_rgba8 as gl_rgba8_snorm: fail spec/arb_texture_view/rendering-formats/clear gl_rgba8 as gl_rgba8i: fail -spec/arb_texture_view/rendering-formats/clear gl_rgba8_snorm as gl_r32f: fail spec/arb_timer_query/query gl_timestamp: fail spec/arb_vertex_attrib_64bit/get_double_attribs-display-lists: skip spec/arb_vertex_program/vp-address-02: skip @@ -1627,7 +1626,6 @@ spec/oes_texture_view/rendering-formats/clear gl_rgba8 as gl_rg16f: fail spec/oes_texture_view/rendering-formats/clear gl_rgba8 as gl_rg16i: fail spec/oes_texture_view/rendering-formats/clear gl_rgba8 as gl_rgba8_snorm: fail spec/oes_texture_view/rendering-formats/clear gl_rgba8 as gl_rgba8i: fail -spec/oes_texture_view/rendering-formats/clear gl_rgba8_snorm as gl_r32f: fail spec/oes_texture_view/rendering-formats/render to gl_rgb16 as gl_rgb16f: skip spec/oes_texture_view/rendering-formats/render to gl_rgb16 as gl_rgb16i: skip spec/oes_texture_view/rendering-formats/render to gl_rgb16 as gl_rgb16ui: skip @@ -1672,8 +1670,8 @@ wgl/wgl-sanity: skip summary: name: results ---- -------- - pass: 21853 - fail: 202 + pass: 21855 + fail: 200 crash: 0 skip: 1445 timeout: 0 diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c index 0cabe848529..2a185cf9348 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c @@ -209,12 +209,12 @@ lp_build_extract_soa_chan(struct lp_build_context *bld, LLVMValueRef scale_val = lp_build_const_vec(gallivm, type, scale); input = LLVMBuildFMul(builder, input, scale_val, ""); /* - * The formula above will produce value below -1.0 for most negative - * value but everything seems happy with that hence disable for now. + * The formula above will produce value below -1.0 for most negative values. + * compliance requires clamping it. + * GTF-GL45.gtf33.GL3Tests.vertex_type_2_10_10_10_rev.vertex_type_2_10_10_10_rev_conversion. */ - if (0) - input = lp_build_max(bld, input, - lp_build_const_vec(gallivm, type, -1.0f)); + input = lp_build_max(bld, input, + lp_build_const_vec(gallivm, type, -1.0f)); } } else if (chan_desc.pure_integer) { -- 2.30.2