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 <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
Bas Nieuwenhuizen
2017-09-17 12:03:03 +02:00
parent 25ea385279
commit 68dc19d400
+1 -3
View File
@@ -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;