diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-14 18:32:24 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-04-17 11:59:17 +0200 |
commit | af612816bc90ef4ee40ccec1d6de4f9024f4ef55 (patch) | |
tree | 60e3fc9a779a398a23cd579e2ee57f6f0d83f7e5 | |
parent | 7c3b8ed87859bfdfb985d21685115a729f9cd138 (diff) |
winsys/amdgpu: simplify amdgpu_cs_add_buffer() a bit
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index 3ae5d33fce6..f068d8ea7a8 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -527,18 +527,17 @@ static unsigned amdgpu_cs_add_buffer(struct radeon_winsys_cs *rcs, } buffer = &cs->real_buffers[index]; - buffer->u.real.priority_usage |= 1llu << priority; - buffer->usage |= usage; } else { index = amdgpu_lookup_or_add_sparse_buffer(acs, bo); if (index < 0) return 0; buffer = &cs->sparse_buffers[index]; - buffer->usage |= usage; - buffer->u.real.priority_usage |= 1llu << priority; } + buffer->u.real.priority_usage |= 1llu << priority; + buffer->usage |= usage; + cs->last_added_bo = bo; cs->last_added_bo_index = index; cs->last_added_bo_usage = buffer->usage; |