From: Dave Airlie Date: Tue, 21 Jul 2020 06:32:08 +0000 (+1000) Subject: llvmpipe/ms: fix sign extension bug in rasterizer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be6c53bb9d3dd0c48bf956d566006e3372fbfdc4;p=mesa.git llvmpipe/ms: fix sign extension bug in rasterizer. /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 Part-of: --- diff --git a/.gitlab-ci/deqp-virgl-gl-fails.txt b/.gitlab-ci/deqp-virgl-gl-fails.txt index 92e0ea5a194..2da4026e53a 100644 --- a/.gitlab-ci/deqp-virgl-gl-fails.txt +++ b/.gitlab-ci/deqp-virgl-gl-fails.txt @@ -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 diff --git a/.gitlab-ci/piglit/quick_gl.txt b/.gitlab-ci/piglit/quick_gl.txt index 4eadd739a31..b061a96afe6 100644 --- a/.gitlab-ci/piglit/quick_gl.txt +++ b/.gitlab-ci/piglit/quick_gl.txt @@ -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 diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h b/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h index a905c1a14aa..47280e591a6 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h @@ -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