llvmpipe/ms: fix sign extension bug in rasterizer.
authorDave Airlie <airlied@redhat.com>
Tue, 21 Jul 2020 06:32:08 +0000 (16:32 +1000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jul 2020 01:50:28 +0000 (01:50 +0000)
/glcts --deqp-surface-width=1024 --deqp-surface-height=64  --deqp-case=KHR-GL45.texture_view.view_sampling  --deqp-surface-type=fbo
was failing but only for width 1024.

The test was filling a 4x4 ms texture, but leaving the viewport set to 1024x64.

This was resulting in this code incorrectly sign extending a value, and passing
it into the mask generator and getting the wrong values. Explicit cast
avoids the sign extension and fixes the above test.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6006>

.gitlab-ci/deqp-virgl-gl-fails.txt
.gitlab-ci/piglit/quick_gl.txt
src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h

index 92e0ea5a1949ac079b295fba25d03cfc574139e9..2da4026e53a5b360bda554266b6eb2f5f67756b2 100644 (file)
@@ -637,7 +637,6 @@ dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compu
 dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_data_and_indices
 dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_indices
 dEQP-GLES31.functional.draw_indirect.random.20
-dEQP-GLES31.functional.fbo.no_attachments.maximums.all
 dEQP-GLES31.functional.image_load_store.2d_array.atomic.add_r32i_result
 dEQP-GLES31.functional.image_load_store.2d_array.atomic.add_r32i_return_value
 dEQP-GLES31.functional.image_load_store.2d_array.atomic.add_r32ui_result
index 4eadd739a313bd39dbd460ac05edea227b9e4232..b061a96afe6b3a6ef349870fd1c7be0e794da54e 100644 (file)
@@ -769,8 +769,6 @@ spec/arb_texture_multisample/sample-position/16: skip
 spec/arb_texture_multisample/sample-position/32: skip
 spec/arb_texture_multisample/sample-position/6: skip
 spec/arb_texture_multisample/sample-position/8: skip
-spec/arb_texture_multisample/texelfetch fs sampler2dms 4 1x130-501x130: fail
-spec/arb_texture_multisample/texelfetch fs sampler2dms 4 1x71-501x71: fail
 spec/arb_texture_multisample/texelfetch/16-fs-isampler2dms: skip
 spec/arb_texture_multisample/texelfetch/16-fs-isampler2dmsarray: skip
 spec/arb_texture_multisample/texelfetch/16-fs-sampler2dms: skip
@@ -1668,8 +1666,8 @@ wgl/wgl-sanity: skip
 summary:
        name:  results
        ----  --------
-       pass:    23029
-       fail:      201
+       pass:    23031
+       fail:      199
       crash:        0
        skip:     1442
     timeout:        0
index a905c1a14aa4075965bdff4c26c8c0e386b37c6f..47280e591a6766d1480f42aaa94018d24fc676e6 100644 (file)
@@ -69,7 +69,7 @@ TAG(do_block_4)(struct lp_rasterizer_task *task,
          int64_t new_c = (c[j]) + ((IMUL64(task->scene->fixed_sample_pos[s][1], plane[j].dcdy) + IMUL64(task->scene->fixed_sample_pos[s][0], -plane[j].dcdx)) >> FIXED_ORDER);
          uint32_t build_mask;
 #ifdef RASTER_64
-         build_mask = BUILD_MASK_LINEAR((new_c - 1) >> (int64_t)FIXED_ORDER,
+         build_mask = BUILD_MASK_LINEAR((int32_t)((new_c - 1) >> (int64_t)FIXED_ORDER),
                                         -plane[j].dcdx >> FIXED_ORDER,
                                         plane[j].dcdy >> FIXED_ORDER);
 #else