v3dv: asserts struct is always non null

This fixes an issue detected by static analyzer: access to field 'pNext'
results in a dereference of a null pointer (loaded from variable
'rs_info').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
This commit is contained in:
Juan A. Suarez Romero 2025-01-10 14:25:41 +01:00 committed by Marge Bot
parent 2c8411e9d2
commit ede3feb16d

View file

@ -1075,6 +1075,7 @@ enable_line_smooth(struct v3dv_pipeline *pipeline,
if (!pipeline->rasterization_enabled)
return false;
assert(rs_info);
const VkPipelineRasterizationLineStateCreateInfoKHR *ls_info =
vk_find_struct_const(rs_info->pNext,
PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR);