mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
gallium/u_blitter: don't use TXF for scaled blits
There seems to be a rounding difference with F2I vs nearest filtering. The precise problem in the rounding is unknown. This fixes an incorrect output with OpenMAX encoding. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
59adde0eab
commit
f9d5611617
1 changed files with 6 additions and 4 deletions
|
|
@ -1777,15 +1777,17 @@ void util_blitter_blit_generic(struct blitter_context *blitter,
|
|||
return;
|
||||
}
|
||||
|
||||
if (blit_stencil ||
|
||||
(dstbox->width == abs(srcbox->width) &&
|
||||
dstbox->height == abs(srcbox->height))) {
|
||||
bool is_scaled = dstbox->width != abs(srcbox->width) ||
|
||||
dstbox->height != abs(srcbox->height);
|
||||
|
||||
if (blit_stencil || !is_scaled)
|
||||
filter = PIPE_TEX_FILTER_NEAREST;
|
||||
}
|
||||
|
||||
bool use_txf = false;
|
||||
|
||||
/* Don't support scaled blits. The TXF shader uses F2I for rounding. */
|
||||
if (ctx->has_txf &&
|
||||
!is_scaled &&
|
||||
filter == PIPE_TEX_FILTER_NEAREST &&
|
||||
src->target != PIPE_TEXTURE_CUBE &&
|
||||
src->target != PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue