llvmpipe/format: fix snorm conversion
authorDave Airlie <airlied@redhat.com>
Tue, 14 Apr 2020 04:00:11 +0000 (14:00 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 15 Jul 2020 19:47:03 +0000 (05:47 +1000)
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 <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5820>

.gitlab-ci/deqp-virgl-gl-fails.txt
.gitlab-ci/deqp-virgl-gles-fails.txt
.gitlab-ci/piglit/quick_gl.txt
src/gallium/auxiliary/gallivm/lp_bld_format_soa.c

index df790647cf59f4712e5451a681e070af5c876145..92e0ea5a1949ac079b295fba25d03cfc574139e9 100644 (file)
@@ -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
index e3d456552e385048995a7cc458800694f7a00d59..cc536f0b8c2b5033d5ad75de4a532ec6240036a8 100644 (file)
@@ -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
index ec37260be8ead6a70c4cfe1a5729a1172d084d72..6df99b7577898c477072ad004e7e544be42883d5 100644 (file)
@@ -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
index 0cabe848529761cc84ec5d1ae47f322825b34b70..2a185cf9348d897b62691dbfd1093acf53bb5a21 100644 (file)
@@ -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) {