summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/amdgpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/amdgpu')
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_cs.c6
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_cs.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index ec164175dbc..872e67a790a 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -629,7 +629,7 @@ static unsigned amdgpu_cs_add_buffer(struct radeon_cmdbuf *rcs,
*/
if (bo == cs->last_added_bo &&
(usage & cs->last_added_bo_usage) == usage &&
- (1ull << priority) & cs->last_added_bo_priority_usage)
+ (1u << priority) & cs->last_added_bo_priority_usage)
return cs->last_added_bo_index;
if (!bo->sparse) {
@@ -658,7 +658,7 @@ static unsigned amdgpu_cs_add_buffer(struct radeon_cmdbuf *rcs,
buffer = &cs->sparse_buffers[index];
}
- buffer->u.real.priority_usage |= 1ull << priority;
+ buffer->u.real.priority_usage |= 1u << priority;
buffer->usage |= usage;
cs->last_added_bo = bo;
@@ -1339,7 +1339,7 @@ void amdgpu_cs_submit_ib(void *job, int thread_index)
assert(buffer->u.real.priority_usage != 0);
handles[num_handles] = buffer->bo->bo;
- flags[num_handles] = (util_last_bit64(buffer->u.real.priority_usage) - 1) / 4;
+ flags[num_handles] = (util_last_bit(buffer->u.real.priority_usage) - 1) / 2;
++num_handles;
}
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h
index 3b10cc66c21..9f5a4fd991a 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h
@@ -46,7 +46,7 @@ struct amdgpu_cs_buffer {
struct amdgpu_winsys_bo *bo;
union {
struct {
- uint64_t priority_usage;
+ uint32_t priority_usage;
} real;
struct {
uint32_t real_idx; /* index of underlying real BO */
@@ -94,7 +94,7 @@ struct amdgpu_cs_context {
struct amdgpu_winsys_bo *last_added_bo;
unsigned last_added_bo_index;
unsigned last_added_bo_usage;
- uint64_t last_added_bo_priority_usage;
+ uint32_t last_added_bo_priority_usage;
struct pipe_fence_handle **fence_dependencies;
unsigned num_fence_dependencies;