This reduces the number of cpu copy_region fallbacks on a Nvidia system
running the piglit command
./publish/bin/piglit run -1 -t copy -t blit tests/quick
from 64789 to 780
Previously this has caused a regression in piglit test
spec@!opengl 1.0@gl-1.0-scissor-copypixels, but I'm currently not able to
reproduce that regression.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
if (try_copy_region(svga, blit))
goto done;
- /* FIXME: Ideally, we should call try_blit() before try_cpu_copy_region(),
- * however that breaks piglit test gl-1.0-scissor-copypixels.
- */
- if (try_cpu_copy_region(svga, blit))
+ if (try_blit(svga, blit))
goto done;
- if (try_blit(svga, blit))
+ if (!try_cpu_copy_region(svga, blit))
debug_printf("svga: Blit failed.\n");
+
done:
SVGA_STATS_TIME_POP(sws); /* SVGA_STATS_TIME_BLIT */
(void) sws;