radv: remove one useless check in radv_flush_constants()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 18 Dec 2017 18:38:54 +0000 (19:38 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 19 Dec 2017 20:22:11 +0000 (21:22 +0100)
pipeline->layout can't be NULL now.

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

index 4a048485c865d8b46822dbdd976a9a3feeca6159..a366facd6345457daf20eec055ee9fe0765d0fc9 100644 (file)
@@ -1753,7 +1753,8 @@ radv_flush_constants(struct radv_cmd_buffer *cmd_buffer,
        uint64_t va;
 
        stages &= cmd_buffer->push_constant_stages;
-       if (!stages || !layout || (!layout->push_constant_size && !layout->dynamic_offset_count))
+       if (!stages ||
+           (!layout->push_constant_size && !layout->dynamic_offset_count))
                return;
 
        if (!radv_cmd_buffer_upload_alloc(cmd_buffer, layout->push_constant_size +