Mesa (master): freedreno/a6xx: bail instead of crash for compile fails

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 14 23:41:17 UTC 2020


Module: Mesa
Branch: master
Commit: afadaaef399498ef72ceb15777d278986e6d8d2c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=afadaaef399498ef72ceb15777d278986e6d8d2c

Author: Rob Clark <robdclark at chromium.org>
Date:   Sat Jul 11 13:27:36 2020 -0700

freedreno/a6xx: bail instead of crash for compile fails

Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907>

---

 src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
index dd9c75051c9..810bdf0ca79 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
@@ -178,10 +178,16 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
 		.primitive_restart = info->primitive_restart && info->index_size,
 	};
 
+	if (!(ctx->prog.vs && ctx->prog.fs))
+		return false;
+
 	if (info->mode == PIPE_PRIM_PATCHES) {
 		emit.key.hs = ctx->prog.hs;
 		emit.key.ds = ctx->prog.ds;
 
+		if (!(ctx->prog.hs && ctx->prog.ds))
+			return false;
+
 		shader_info *ds_info = &emit.key.ds->nir->info;
 		emit.key.key.tessellation = ir3_tess_mode(ds_info->tess.primitive_mode);
 	}



More information about the mesa-commit mailing list