summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_video.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2014-01-21 11:49:06 -0700
committerChristian König <[email protected]>2014-02-06 15:54:14 +0100
commit9b218dcdd7877b81d8b6c55799b6ec33e1cc8079 (patch)
tree69e78fbae0e9125564a72193ce9f1ab1cbc04b48 /src/gallium/drivers/radeon/radeon_video.c
parent7bcfb0bc8ffed0db244cf0b3d4e200add590a02a (diff)
radeon/video: directly create buffers in the right domain
Avoid moving things around on start of stream. Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_video.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_video.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c
index 3471202f94b..455b147144e 100644
--- a/src/gallium/drivers/radeon/radeon_video.c
+++ b/src/gallium/drivers/radeon/radeon_video.c
@@ -59,9 +59,12 @@ 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)
+bool rvid_create_buffer(struct radeon_winsys *ws, struct rvid_buffer *buffer,
+ unsigned size, enum radeon_bo_domain domain)
{
- buffer->buf = ws->buffer_create(ws, size, 4096, false, RADEON_DOMAIN_GTT | RADEON_DOMAIN_VRAM);
+ buffer->domain = domain;
+
+ buffer->buf = ws->buffer_create(ws, size, 4096, false, domain);
if (!buffer->buf)
return false;
@@ -87,7 +90,7 @@ 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))
+ if (!rvid_create_buffer(ws, new_buf, new_size, new_buf->domain))
goto error;
src = ws->buffer_map(old_buf.cs_handle, cs, PIPE_TRANSFER_READ);