diff options
author | Samuel Pitoiset <[email protected]> | 2019-10-21 10:40:23 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-10-23 08:33:12 +0200 |
commit | 411ad8e7c5973f58cdc94d5ce45df21c7b994f52 (patch) | |
tree | 61d02b50be33baaa0cf956277f79a59caef31dc1 /src/amd/vulkan | |
parent | f4ab58c1a07c58525018649573ffff92eb3ccf19 (diff) |
radv: add an assertion in radv_gfx10_compute_bin_size()
To prevent out of bounds access.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index f8dd6178733..9c83e22fda2 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -3226,6 +3226,7 @@ radv_gfx10_compute_bin_size(struct radv_pipeline *pipeline, const VkGraphicsPipe color_bytes_per_pixel += vk_format_get_blocksize(format); if (total_samples > 1) { + assert(samples_log <= 3); const unsigned fmask_array[] = {0, 1, 1, 4}; fmask_bytes_per_pixel += fmask_array[samples_log]; } |