mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
llvmpipe/blit: for 32-bit unorm depth blits just copy 32-bit
Don't have the shader do a 32-bit unorn to float conversion,
the values don't remain accurate then.
Fixes:
GTF-GL45.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit
for 32-bit unorm depth buffers.
Cc: "20.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6044>
(cherry picked from commit 2e40b2c155)
This commit is contained in:
parent
2891ddb996
commit
81b1dcf83a
2 changed files with 10 additions and 1 deletions
|
|
@ -265,7 +265,7 @@
|
|||
"description": "llvmpipe/blit: for 32-bit unorm depth blits just copy 32-bit",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -132,6 +132,15 @@ static void lp_blit(struct pipe_context *pipe,
|
|||
return;
|
||||
}
|
||||
|
||||
/* for 32-bit unorm depth, avoid the conversions to float and back,
|
||||
which can introduce accuracy errors. */
|
||||
if (blit_info->src.format == PIPE_FORMAT_Z32_UNORM &&
|
||||
blit_info->dst.format == PIPE_FORMAT_Z32_UNORM && info.filter == PIPE_TEX_FILTER_NEAREST) {
|
||||
info.src.format = PIPE_FORMAT_R32_UINT;
|
||||
info.dst.format = PIPE_FORMAT_R32_UINT;
|
||||
info.mask = PIPE_MASK_R;
|
||||
}
|
||||
|
||||
/* XXX turn off occlusion and streamout queries */
|
||||
|
||||
util_blitter_save_vertex_buffer_slot(lp->blitter, lp->vertex_buffer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue