From: Samuel Pitoiset Date: Fri, 14 Apr 2017 16:32:24 +0000 (+0200) Subject: winsys/amdgpu: simplify amdgpu_cs_add_buffer() a bit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af612816bc90ef4ee40ccec1d6de4f9024f4ef55;p=mesa.git winsys/amdgpu: simplify amdgpu_cs_add_buffer() a bit Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- 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;