[Mesa-dev] [PATCH 3/7] radv: remove one useless check in radv_flush_constants()

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Dec 18 18:38:54 UTC 2017


pipeline->layout can't be NULL now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_cmd_buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 4a048485c8..a366facd63 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -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 +
-- 
2.15.1



More information about the mesa-dev mailing list