diff options
author | Bas Nieuwenhuizen <[email protected]> | 2019-06-15 16:10:22 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2019-06-17 10:56:50 +0000 |
commit | 1a7caac9e96f5ef5600edcaf982c5e113c3e62fd (patch) | |
tree | 9e26ba499bf04bc8d8eea8506702056407dc98a9 /src | |
parent | 410759091173fa61436ba46baeb20a79d5767849 (diff) |
radv: Add asserts that buffer descriptors are created with valid buffer formats.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_image.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |