mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 00:50:07 +01:00
svga: Check if Stencil buffer is NULL
Fixes a nullptr dereference on older HW versions.
Fixes: f29d939824 ("svga: rework framebuffer state")
Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38623>
This commit is contained in:
parent
67d05f71e9
commit
4e16a5b68b
1 changed files with 1 additions and 1 deletions
|
|
@ -84,7 +84,7 @@ emit_fb_vgpu9(struct svga_context *svga)
|
|||
if (svga_surface_needs_propagation(hwfb->zsbuf))
|
||||
svga_propagate_surface(svga, hwfb->zsbuf, true);
|
||||
|
||||
if (currfb->zsbuf->base.texture &&
|
||||
if (currfb->zsbuf && currfb->zsbuf->base.texture &&
|
||||
util_format_is_depth_and_stencil(currfb->zsbuf->base.format)) {
|
||||
ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_STENCIL,
|
||||
currfb->zsbuf);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue