From 1a7caac9e96f5ef5600edcaf982c5e113c3e62fd Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sat, 15 Jun 2019 16:10:22 +0200 Subject: [PATCH] radv: Add asserts that buffer descriptors are created with valid buffer formats. Reviewed-by: Samuel Pitoiset --- src/amd/vulkan/radv_image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 909145e1e75..a74884f411b 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -379,6 +379,9 @@ radv_make_buffer_descriptor(struct radv_device *device, num_format = radv_translate_buffer_numformat(desc, first_non_void); data_format = radv_translate_buffer_dataformat(desc, first_non_void); + assert(data_format != V_008F0C_BUF_DATA_FORMAT_INVALID); + assert(num_format != ~0); + va += offset; state[0] = va; state[1] = S_008F04_BASE_ADDRESS_HI(va >> 32) | -- 2.30.2