diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-09-17 12:03:03 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-09-20 22:04:25 +0200 |
commit | 68dc19d4002fac0c743fd1f16a2aa9d839bed762 (patch) | |
tree | 5d11235cbd7fe3760c5134b5ed85792987fdc839 /src | |
parent | 25ea3852798dc2d32345727f062384024044409b (diff) |
radv: Use for_each_bit in the descriptor set flush.
Since most games use only a few, iterating through all of them is
a waste. Simplifies the code too.
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 0c3a5c6ffc2..e6ed637e4fa 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -1598,9 +1598,7 @@ radv_flush_descriptors(struct radv_cmd_buffer *cmd_buffer, cmd_buffer->cs, MAX_SETS * MESA_SHADER_STAGES * 4); - for (i = 0; i < MAX_SETS; i++) { - if (!(cmd_buffer->state.descriptors_dirty & (1u << i))) - continue; + for_each_bit(i, cmd_buffer->state.descriptors_dirty) { struct radv_descriptor_set *set = cmd_buffer->state.descriptors[i]; if (!set) continue; |