mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 06:20:09 +01:00
radeonsi: optimize no-op cases in si_upload_shader_descriptors
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794>
This commit is contained in:
parent
e93b42c214
commit
e8dda30c6f
1 changed files with 8 additions and 9 deletions
|
|
@ -2621,20 +2621,19 @@ static bool si_upload_shader_descriptors(struct si_context *sctx, unsigned mask)
|
|||
{
|
||||
unsigned dirty = sctx->descriptors_dirty & mask;
|
||||
|
||||
/* Assume nothing will go wrong: */
|
||||
sctx->shader_pointers_dirty |= dirty;
|
||||
if (dirty) {
|
||||
unsigned iter_mask = dirty;
|
||||
|
||||
while (dirty) {
|
||||
unsigned i = u_bit_scan(&dirty);
|
||||
do {
|
||||
if (!si_upload_descriptors(sctx, &sctx->descriptors[u_bit_scan(&iter_mask)]))
|
||||
return false;
|
||||
} while (iter_mask);
|
||||
|
||||
if (!si_upload_descriptors(sctx, &sctx->descriptors[i]))
|
||||
return false;
|
||||
sctx->descriptors_dirty &= ~dirty;
|
||||
sctx->shader_pointers_dirty |= dirty;
|
||||
}
|
||||
|
||||
sctx->descriptors_dirty &= ~mask;
|
||||
|
||||
si_upload_bindless_descriptors(sctx);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue