From af612816bc90ef4ee40ccec1d6de4f9024f4ef55 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 14 Apr 2017 18:32:24 +0200 Subject: winsys/amdgpu: simplify amdgpu_cs_add_buffer() a bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3