diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-18 10:59:59 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-18 15:25:40 -0700 |
commit | 227c395c00b69fc105546d479d751d92e923b4fc (patch) | |
tree | 4d37bdaffdaa4a6938662a9689744157dfe67204 /src/gallium/drivers/panfrost/pan_fragment.c | |
parent | 79b13b437685b8dbe2e9938714eb4733b8b79a17 (diff) |
panfrost: Check for NULL surface in places
Fixes a bunch of NULL dereferences, although it does cause GPU faults of
course.
This is caused by color buffers masked out in MRT, which we'll
eventually have to solve the right way... one thing at a time.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_fragment.c')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_fragment.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_fragment.c b/src/gallium/drivers/panfrost/pan_fragment.c index 7ffb9db0a05..023569ef204 100644 --- a/src/gallium/drivers/panfrost/pan_fragment.c +++ b/src/gallium/drivers/panfrost/pan_fragment.c @@ -35,6 +35,9 @@ panfrost_initialize_surface( struct panfrost_job *batch, struct pipe_surface *surf) { + if (!surf) + return; + unsigned level = surf->u.tex.level; struct panfrost_resource *rsrc = pan_resource(surf->texture); |