summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-04-18 16:43:19 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-08-21 20:42:14 +0200
commit0481ed25c9c35178bf5151c80f4c36ad42b75648 (patch)
tree8073c0eb370c7ba9f18f2db6d229c2c59c80e386 /src
parent28eb392a853bb43bdc6cfe7ba814f046c39ca7ae (diff)
nvfx: new 2D: use a CPU copy for up to 4 pixels, up from 0
Seems a reasonable threshold for now. Significantly speeds up Piglit's 1x1 glReadPixels (but, you know, reading pixels in 1x1 blocks is NOT a good idea, especially if you might be running on a less-than-perfect driver).
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_surface.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_surface.c b/src/gallium/drivers/nvfx/nvfx_surface.c
index 8208c67f2a..7efdd954b4 100644
--- a/src/gallium/drivers/nvfx/nvfx_surface.c
+++ b/src/gallium/drivers/nvfx/nvfx_surface.c
@@ -250,11 +250,7 @@ nvfx_resource_copy_region(struct pipe_context *pipe,
static int copy_threshold = -1;
if(copy_threshold < 0)
- {
- copy_threshold = debug_get_num_option("NOUVEAU_COPY_THRESHOLD", 0);
- if(copy_threshold < 0)
- copy_threshold = 0;
- }
+ copy_threshold = debug_get_num_option("NOUVEAU_COPY_THRESHOLD", 4);
int dst_to_gpu = dstr->usage != PIPE_USAGE_DYNAMIC && dstr->usage != PIPE_USAGE_STAGING;
int src_on_gpu = nvfx_resource_on_gpu(srcr);