mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
pvr: Fix NULL pointer indirection in pvr_enable_z_replicate()
Check input_subpass->depth_stencil_attachment is non-NULL before indirecting it. Signed-off-by: Sarah Walker <sarah.walker@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19475>
This commit is contained in:
parent
b0016bc36a
commit
ae268884da
1 changed files with 2 additions and 1 deletions
|
|
@ -1488,7 +1488,8 @@ pvr_enable_z_replicate(struct pvr_renderpass_context *ctx,
|
|||
struct pvr_render_subpass *input_subpass = subpass->input_subpass;
|
||||
|
||||
/* If the subpass writes to the attachment then enable z replication. */
|
||||
if (*input_subpass->depth_stencil_attachment == replicate_attach_idx &&
|
||||
if (input_subpass->depth_stencil_attachment &&
|
||||
*input_subpass->depth_stencil_attachment == replicate_attach_idx &&
|
||||
!subpass->z_replicate) {
|
||||
subpass->z_replicate = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue