radv: simplify the logic in radv_set_descriptor_set()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 10 Jul 2018 14:13:42 +0000 (16:13 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 12 Jul 2018 09:08:49 +0000 (11:08 +0200)
Now that 'set' can't be NULL because the meta operations no
longer bind a NULL descriptor, the logic can be simplified
a little bit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index 5d945ddafc37fcfb45356e0b3e3710673053b1de..e066b160b632b46ab8fb4594093ebe9b56f12217 100644 (file)
@@ -528,10 +528,8 @@ void radv_set_descriptor_set(struct radv_cmd_buffer *cmd_buffer,
                radv_get_descriptors_state(cmd_buffer, bind_point);
 
        descriptors_state->sets[idx] = set;
-       if (set)
-               descriptors_state->valid |= (1u << idx);
-       else
-               descriptors_state->valid &= ~(1u << idx);
+
+       descriptors_state->valid |= (1u << idx); /* active descriptors */
        descriptors_state->dirty |= (1u << idx);
 }