freedreno/a3xx+a4xx: fix potential null ptr deref
Coverity spotted the a3xx case (not sure why not the a4xx). CID 1362452 Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
27a97097e1
commit
9b854ce53c
|
@ -79,7 +79,8 @@ emit_mrt(struct fd_ringbuffer *ring, unsigned nr_bufs,
|
|||
if (rsc->stencil) {
|
||||
rsc = rsc->stencil;
|
||||
pformat = rsc->base.b.format;
|
||||
bases++;
|
||||
if (bases)
|
||||
bases++;
|
||||
}
|
||||
slice = fd_resource_slice(rsc, psurf->u.tex.level);
|
||||
format = fd3_pipe2color(pformat);
|
||||
|
|
|
@ -80,7 +80,8 @@ emit_mrt(struct fd_ringbuffer *ring, unsigned nr_bufs,
|
|||
if (rsc->stencil) {
|
||||
rsc = rsc->stencil;
|
||||
pformat = rsc->base.b.format;
|
||||
bases++;
|
||||
if (bases)
|
||||
bases++;
|
||||
}
|
||||
|
||||
slice = fd_resource_slice(rsc, psurf->u.tex.level);
|
||||
|
|
Loading…
Reference in New Issue