summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_fragment.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-18 10:59:59 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-18 15:25:40 -0700
commit227c395c00b69fc105546d479d751d92e923b4fc (patch)
tree4d37bdaffdaa4a6938662a9689744157dfe67204 /src/gallium/drivers/panfrost/pan_fragment.c
parent79b13b437685b8dbe2e9938714eb4733b8b79a17 (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.c3
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);