aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_resource_texture.c
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2019-04-02 12:36:34 +0200
committerThomas Hellstrom <[email protected]>2019-05-02 09:51:00 +0200
commit978d66e4d5b8032d7bfa1a70c00f57efc2a6e443 (patch)
treefc7b3251e17f803e846046fda84773c53ca22341 /src/gallium/drivers/svga/svga_resource_texture.c
parent5961189f4e6d345651b04c547fbd1439379c6f33 (diff)
svga: Avoid bouncing buffer data in malloced buffers
Some constant- and texture upload buffer data may bounce in malloced buffers before being transferred to hardware buffers. In the case of texture upload buffers this seems to be an oversight. In the case of constant buffers, code comments indicate that we want to avoid mapping hardware buffers for reading when copying out of buffers that need modification before being passed to hardware. In this case we avoid data bouncing for upload manager buffers but make sure buffers that we read out from stay in malloced memory. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_resource_texture.c')
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index c716b66e89f..e9449e8a1ff 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -1335,7 +1335,7 @@ boolean
svga_texture_transfer_map_upload_create(struct svga_context *svga)
{
svga->tex_upload = u_upload_create(&svga->pipe, TEX_UPLOAD_DEFAULT_SIZE,
- 0, PIPE_USAGE_STAGING, 0);
+ PIPE_BIND_CUSTOM, PIPE_USAGE_STAGING, 0);
return svga->tex_upload != NULL;
}