summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_vce.c
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-09-07 10:57:56 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2016-09-27 16:45:02 +0200
commite703f71ebdf91938c83f47c898f1da058ce0ac32 (patch)
tree560e9ddc0e7c46b60dd31fde2c1672d4d7df0415 /src/gallium/drivers/radeon/radeon_vce.c
parent84f156c0cbf0deb0f51163dc3fd6b09a62270c50 (diff)
downloadexternal_mesa3d-e703f71ebdf91938c83f47c898f1da058ce0ac32.zip
external_mesa3d-e703f71ebdf91938c83f47c898f1da058ce0ac32.tar.gz
external_mesa3d-e703f71ebdf91938c83f47c898f1da058ce0ac32.tar.bz2
gallium/radeon: add RADEON_USAGE_SYNCHRONIZED
This is really the behavior we want most of the time, but having a SYNCHRONIZED flag instead of an UNSYNCHRONIZED one has the advantage that OR'ing different flags together always results in stronger guarantees. The parent BOs of sub-allocated buffers will be added unsynchronized. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_vce.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_vce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/radeon_vce.c b/src/gallium/drivers/radeon/radeon_vce.c
index 8504d93..10c5a78 100644
--- a/src/gallium/drivers/radeon/radeon_vce.c
+++ b/src/gallium/drivers/radeon/radeon_vce.c
@@ -540,7 +540,8 @@ void rvce_add_buffer(struct rvce_encoder *enc, struct pb_buffer *buf,
{
int reloc_idx;
- reloc_idx = enc->ws->cs_add_buffer(enc->cs, buf, usage, domain, RADEON_PRIO_VCE);
+ reloc_idx = enc->ws->cs_add_buffer(enc->cs, buf, usage | RADEON_USAGE_SYNCHRONIZED,
+ domain, RADEON_PRIO_VCE);
if (enc->use_vm) {
uint64_t addr;
addr = enc->ws->buffer_get_virtual_address(buf);