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 92e0ea5..2da4026 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 4eadd73..b061a96 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 a905c1a..47280e5 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