diff options
author | Michel Dänzer <[email protected]> | 2014-06-19 10:40:38 +0900 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2014-07-23 18:55:50 +0900 |
commit | 07c65b85eada8dd34019763b6e82ed4257a9b4a6 (patch) | |
tree | 0191488e5ee96747cb6e8199d3c31c23f9046803 /src/gallium/drivers/radeon/radeon_video.c | |
parent | 37d43ebb28ce8be38f3d9b0805b8b14354ce786d (diff) |
r600g/radeonsi: Use write-combined CPU mappings of some BOs in GTT
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_video.c')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_video.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c index eae533e6f59..17e9a59d81d 100644 --- a/src/gallium/drivers/radeon/radeon_video.c +++ b/src/gallium/drivers/radeon/radeon_video.c @@ -61,11 +61,13 @@ unsigned rvid_alloc_stream_handle() /* create a buffer in the winsys */ bool rvid_create_buffer(struct radeon_winsys *ws, struct rvid_buffer *buffer, - unsigned size, enum radeon_bo_domain domain) + unsigned size, enum radeon_bo_domain domain, + enum radeon_bo_flag flags) { buffer->domain = domain; + buffer->flags = flags; - buffer->buf = ws->buffer_create(ws, size, 4096, false, domain); + buffer->buf = ws->buffer_create(ws, size, 4096, false, domain, flags); if (!buffer->buf) return false; @@ -91,7 +93,8 @@ bool rvid_resize_buffer(struct radeon_winsys *ws, struct radeon_winsys_cs *cs, struct rvid_buffer old_buf = *new_buf; void *src = NULL, *dst = NULL; - if (!rvid_create_buffer(ws, new_buf, new_size, new_buf->domain)) + if (!rvid_create_buffer(ws, new_buf, new_size, new_buf->domain, + new_buf->flags)) goto error; src = ws->buffer_map(old_buf.cs_handle, cs, PIPE_TRANSFER_READ); @@ -191,7 +194,7 @@ void rvid_join_surfaces(struct radeon_winsys* ws, unsigned bind, /* TODO: 2D tiling workaround */ alignment *= 2; - pb = ws->buffer_create(ws, size, alignment, bind, RADEON_DOMAIN_VRAM); + pb = ws->buffer_create(ws, size, alignment, bind, RADEON_DOMAIN_VRAM, 0); if (!pb) return; |