From e9ab3825d5603f702ce2ec7c2f87e1298d50f449 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 24 Jan 2017 13:18:38 +1000 Subject: [PATCH] Fix llvm 3.8 radeonsi tess bug (#1413888) --- mesa-13.0-fix-radeonsi-tess.patch | 36 +++++++++++++++++++++++++++++++ mesa.spec | 8 ++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 mesa-13.0-fix-radeonsi-tess.patch diff --git a/mesa-13.0-fix-radeonsi-tess.patch b/mesa-13.0-fix-radeonsi-tess.patch new file mode 100644 index 0000000..28feb55 --- /dev/null +++ b/mesa-13.0-fix-radeonsi-tess.patch @@ -0,0 +1,36 @@ +From 57f18623fb94891c04f3a395cfd977ea3747ee61 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= +Date: Tue, 17 Jan 2017 13:45:42 +0100 +Subject: radeonsi: for the tess barrier, only use emit_waitcnt on SI and LLVM + 3.9+ +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Cc: 17.0 13.0 +Reviewed-by: Edward O'Callaghan +Reviewed-by: Nicolai Hähnle + +diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c +index f404273..10f40a9 100644 +--- a/src/gallium/drivers/radeonsi/si_shader.c ++++ b/src/gallium/drivers/radeonsi/si_shader.c +@@ -5440,10 +5440,13 @@ static void si_llvm_emit_barrier(const struct lp_build_tgsi_action *action, + struct si_shader_context *ctx = si_shader_context(bld_base); + struct gallivm_state *gallivm = bld_base->base.gallivm; + +- /* The real barrier instruction isn’t needed, because an entire patch ++ /* SI only (thanks to a hw bug workaround): ++ * The real barrier instruction isn’t needed, because an entire patch + * always fits into a single wave. + */ +- if (ctx->type == PIPE_SHADER_TESS_CTRL) { ++ if (HAVE_LLVM >= 0x0309 && ++ ctx->screen->b.chip_class == SI && ++ ctx->type == PIPE_SHADER_TESS_CTRL) { + emit_waitcnt(ctx, LGKM_CNT & VM_CNT); + return; + } +-- +cgit v0.10.2 + diff --git a/mesa.spec b/mesa.spec index 94e3557..4dd52e8 100644 --- a/mesa.spec +++ b/mesa.spec @@ -59,7 +59,7 @@ Name: mesa Summary: Mesa graphics libraries Version: 13.0.3 -Release: 3%{?rctag:.%{rctag}}%{?dist} +Release: 4%{?rctag:.%{rctag}}%{?dist} License: MIT URL: http://www.mesa3d.org @@ -84,6 +84,9 @@ Patch12: glvnd-fix-gl-dot-pc.patch Patch13: 0001-Fix-linkage-against-shared-glapi.patch Patch14: 0001-glapi-Link-with-glapi-when-built-shared.patch +# regression fix should be in 13.0.4 +Patch15: mesa-13.0-fix-radeonsi-tess.patch + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: automake @@ -679,6 +682,9 @@ popd %endif %changelog +* Tue Jan 24 2017 Dave Airlie - 13.0.3-3 - Enable libglvnd support (rhbz#1413579)