mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
winsys/amdgpu: skip code checking RADEON_USAGE_SYNCHRONIZED for slabs
We unset RADEON_USAGE_SYNCHRONIZED, but we still checked it. Iterate over such buffers separately without checking RADEON_USAGE_SYNCHRONIZED. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
This commit is contained in:
parent
0911aea126
commit
c79697fec5
1 changed files with 12 additions and 6 deletions
|
|
@ -1294,11 +1294,8 @@ static void amdgpu_cs_submit_ib(void *job, void *gdata, int thread_index)
|
||||||
amdgpu_lookup_or_add_buffer(cs, &get_slab_entry_real_bo(buffer->bo)->b,
|
amdgpu_lookup_or_add_buffer(cs, &get_slab_entry_real_bo(buffer->bo)->b,
|
||||||
&cs->buffer_lists[AMDGPU_BO_REAL]);
|
&cs->buffer_lists[AMDGPU_BO_REAL]);
|
||||||
|
|
||||||
/* We need to set the usage because it determines the BO priority.
|
/* We need to set the usage because it determines the BO priority. */
|
||||||
* Mask out the SYNCHRONIZED flag because the backing buffer of slabs shouldn't add its
|
real_buffer->usage |= buffer->usage;
|
||||||
* BO fences to fence dependencies. Only the slab entries should do that.
|
|
||||||
*/
|
|
||||||
real_buffer->usage |= buffer->usage & ~RADEON_USAGE_SYNCHRONIZED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sparse BOs: Add fence dependencies, update seq_no in BOs, add real buffers. */
|
/* Sparse BOs: Add fence dependencies, update seq_no in BOs, add real buffers. */
|
||||||
|
|
@ -1346,7 +1343,7 @@ static void amdgpu_cs_submit_ib(void *job, void *gdata, int thread_index)
|
||||||
alloca(num_real_buffers * sizeof(struct drm_amdgpu_bo_list_entry));
|
alloca(num_real_buffers * sizeof(struct drm_amdgpu_bo_list_entry));
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
for (i = 0; i < num_real_buffers_except_sparse; i++) {
|
for (i = 0; i < initial_num_real_buffers; i++) {
|
||||||
struct amdgpu_cs_buffer *buffer = &real_buffers[i];
|
struct amdgpu_cs_buffer *buffer = &real_buffers[i];
|
||||||
struct amdgpu_winsys_bo *bo = buffer->bo;
|
struct amdgpu_winsys_bo *bo = buffer->bo;
|
||||||
|
|
||||||
|
|
@ -1355,6 +1352,15 @@ static void amdgpu_cs_submit_ib(void *job, void *gdata, int thread_index)
|
||||||
amdgpu_add_to_kernel_bo_list(&bo_list[i], bo, buffer->usage);
|
amdgpu_add_to_kernel_bo_list(&bo_list[i], bo, buffer->usage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* These are backing buffers of slab entries. Don't add their fence dependencies. */
|
||||||
|
for (; i < num_real_buffers_except_sparse; i++) {
|
||||||
|
struct amdgpu_cs_buffer *buffer = &real_buffers[i];
|
||||||
|
struct amdgpu_winsys_bo *bo = buffer->bo;
|
||||||
|
|
||||||
|
amdgpu_set_bo_seq_no(queue_index, bo, next_seq_no);
|
||||||
|
amdgpu_add_to_kernel_bo_list(&bo_list[i], bo, buffer->usage);
|
||||||
|
}
|
||||||
|
|
||||||
/* Sparse backing BOs are last. Don't update their fences because we don't use them. */
|
/* Sparse backing BOs are last. Don't update their fences because we don't use them. */
|
||||||
for (; i < num_real_buffers; ++i) {
|
for (; i < num_real_buffers; ++i) {
|
||||||
struct amdgpu_cs_buffer *buffer = &real_buffers[i];
|
struct amdgpu_cs_buffer *buffer = &real_buffers[i];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue