radeonsi: fallback to util_blitter_draw_rectangle
The blitter VS expects coords to fit in a signed int16. When this is not the case, use util_blitter_draw_rectangle instead. Since util_blitter_draw_rectangle sets vertex elements, we need to make sure they're properly restored. The alternative to this fallback would be to pass coordinates unpacked (so 4 SGPRs instead of 2), but this doesn't fix the fbo-blit-check-limits test because of uv interpolation precision issue. Using 2 triangles instead of a rectangle + disabling window_space_position helps but then this breaks some GLES3 tests, like dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_x (which doesn't pass either if u_blitter is used for all cases). Using a single triangle covering the whole rectangles fixes all cases but it then requires to setup scissors to not write too much pixels... So, instead of adding so much complexity, let's use u_blitter for the "large coordinates" fallback, and keep the rectangle blit for the other cases. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32698>
This commit is contained in:
committed by
Marge Bot
parent
7f50162424
commit
dc293ffe50
@@ -21,7 +21,6 @@ spec@egl_chromium_sync_control@conformance,Fail
|
||||
spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_test,Fail
|
||||
spec@egl_khr_surfaceless_context@viewport,Fail
|
||||
spec@egl_mesa_configless_context@basic,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y210,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y212,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y216,Fail
|
||||
|
||||
@@ -75,7 +75,6 @@ spec@egl_chromium_sync_control@conformance,Fail
|
||||
spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_test,Fail
|
||||
spec@egl_khr_surfaceless_context@viewport,Fail
|
||||
spec@egl_mesa_configless_context@basic,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y210,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y212,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y216,Fail
|
||||
|
||||
@@ -32,7 +32,6 @@ spec@arb_tessellation_shader@arb_tessellation_shader-tes-gs-max-output -small -s
|
||||
spec@arb_viewport_array@display-list,Fail
|
||||
spec@egl 1.4@eglterminate then unbind context,Fail
|
||||
spec@egl_khr_surfaceless_context@viewport,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@khr_texture_compression_astc@miptree-gles srgb-fp,Fail
|
||||
|
||||
@@ -18,7 +18,6 @@ spec@arb_shading_language_packing@execution@built-in-functions@fs-packhalf2x16,F
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@egl_chromium_sync_control@conformance,Fail
|
||||
spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_test,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@glsl-1.20@compiler@invalid-vec4-array-to-vec3-array-conversion.vert,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
|
||||
|
@@ -17,7 +17,6 @@ spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@arb_texture_multisample@sample-position@8,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@glsl-1.20@compiler@invalid-vec4-array-to-vec3-array-conversion.vert,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
|
||||
|
@@ -19,7 +19,6 @@ spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@egl 1.4@egl-ext_egl_image_storage,Crash
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@glsl-1.20@compiler@invalid-vec4-array-to-vec3-array-conversion.vert,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
|
||||
|
@@ -84,7 +84,6 @@ spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG8I- swizzled-
|
||||
spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG8UI- swizzled- border color only,Fail
|
||||
spec@arb_texture_rgb10_a2ui@texwrap formats bordercolor-swizzled,Fail
|
||||
spec@arb_texture_rgb10_a2ui@texwrap formats bordercolor-swizzled@GL_RGB10_A2UI- swizzled- border color only,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y210,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y212,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y216,Fail
|
||||
|
||||
|
@@ -74,7 +74,6 @@ spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG8I- swizzled-
|
||||
spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG8UI- swizzled- border color only,Fail
|
||||
spec@arb_texture_rgb10_a2ui@texwrap formats bordercolor-swizzled,Fail
|
||||
spec@arb_texture_rgb10_a2ui@texwrap formats bordercolor-swizzled@GL_RGB10_A2UI- swizzled- border color only,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@ext_framebuffer_multisample@accuracy 8 stencil_draw small depthstencil,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y210,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y212,Fail
|
||||
|
||||
|
@@ -25,7 +25,6 @@ spec@arb_shading_language_packing@execution@built-in-functions@vs-packhalf2x16,F
|
||||
spec@egl_chromium_sync_control@conformance,Fail
|
||||
spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_test,Fail
|
||||
spec@egl_ext_protected_content@conformance,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@glsl-1.20@compiler@invalid-vec4-array-to-vec3-array-conversion.vert,Fail
|
||||
spec@glsl-1.50@execution@geometry@tri-strip-ordering-with-prim-restart gl_triangle_strip_adjacency ffs,Fail
|
||||
spec@glsl-1.50@execution@geometry@tri-strip-ordering-with-prim-restart gl_triangle_strip_adjacency other,Fail
|
||||
|
||||
|
@@ -33,7 +33,6 @@ spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@egl_ext_protected_content@conformance,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y210,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y212,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y216,Fail
|
||||
|
||||
|
@@ -2473,6 +2473,15 @@ static void si_draw_rectangle(struct blitter_context *blitter, void *vertex_elem
|
||||
uint32_t attribute_ring_address_lo =
|
||||
sctx->gfx_level >= GFX11 ? sctx->screen->attribute_pos_prim_ring->gpu_address : 0;
|
||||
|
||||
if (std::max(std::abs(x1), std::abs(x2)) > INT16_MAX ||
|
||||
std::max(std::abs(y1), std::abs(y2)) > INT16_MAX) {
|
||||
/* Fallback when coordinates can't fit in int16. */
|
||||
util_blitter_save_vertex_elements(sctx->blitter, sctx->vertex_elements);
|
||||
util_blitter_draw_rectangle(blitter, vertex_elements_cso, get_vs, x1, y1, x2, y2,
|
||||
depth, num_instances, type, attrib);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Pack position coordinates as signed int16. */
|
||||
sctx->vs_blit_sh_data[0] = (uint32_t)(x1 & 0xffff) | ((uint32_t)(y1 & 0xffff) << 16);
|
||||
sctx->vs_blit_sh_data[1] = (uint32_t)(x2 & 0xffff) | ((uint32_t)(y2 & 0xffff) << 16);
|
||||
|
||||
Reference in New Issue
Block a user