summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-07-12 21:21:38 +0200
committerMarek Olšák <[email protected]>2017-07-17 15:47:30 +0200
commitf9d5611617d2498a05dddb036659ef37567a7753 (patch)
tree2264e0ce7d00bb69048546793bc75bb7da49550f /src/gallium/auxiliary
parent59adde0eabd9585100b23c111f1783a67b6f7f4d (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index c38534dfeef..65c6f5d21fa 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -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) {