From: Bas Nieuwenhuizen Date: Sat, 15 Jun 2019 14:10:22 +0000 (+0200) Subject: radv: Add asserts that buffer descriptors are created with valid buffer formats. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a7caac9e96f5ef5600edcaf982c5e113c3e62fd;p=mesa.git radv: Add asserts that buffer descriptors are created with valid buffer formats. Reviewed-by: Samuel Pitoiset --- 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) |