[Mesa-dev] [PATCH] intel/compiler/gen10: Disable push constants.
Ben Widawsky
ben at bwidawsk.net
Mon Dec 18 23:27:42 UTC 2017
On 17-12-18 15:23:11, Antognolli, Rafael wrote:
>We still have gpu hangs on Cannonlake when using push constants, so
>disable them for now until we have a proper fix for these hangs.
>
>v2: Add warning message when creating context too.
>
>Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
>Cc: Ben Widawsky <ben at bwidawsk.net>
>Cc: Kenneth Graunke <kenneth at whitecape.org>
Since this improves the current situation by enabling more workloads to be run
by folks with these platforms, and we don't regress any of the conformance
suites, this is:
Reviewed-by: Ben Widawsky <ben at bwidawsk.net>
I'd go as far as to suggest this for stable, but I know there's a lot of
heartburn around that.
>---
> src/intel/compiler/brw_fs.cpp | 9 +++++++++
> src/mesa/drivers/dri/i965/brw_context.c | 7 +++++++
> 2 files changed, 16 insertions(+)
>
>diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
>index 3717c50e32a..6d9f0eccb29 100644
>--- a/src/intel/compiler/brw_fs.cpp
>+++ b/src/intel/compiler/brw_fs.cpp
>@@ -2096,6 +2096,15 @@ fs_visitor::assign_constant_locations()
> if (subgroup_id_index >= 0)
> max_push_components--; /* Save a slot for the thread ID */
>
>+ /* FIXME: We currently have some GPU hangs that happen apparently when using
>+ * push constants. Since we have no solution for such hangs yet, just
>+ * go ahead and use pull constants for now.
>+ */
>+ if (devinfo->gen == 10 && compiler->supports_pull_constants) {
>+ compiler->shader_perf_log(log_data, "Disabling push constants.");
>+ max_push_components = 0;
>+ }
>+
> /* We push small arrays, but no bigger than 16 floats. This is big enough
> * for a vec4 but hopefully not large enough to push out other stuff. We
> * should probably use a better heuristic at some point.
>diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
>index 126c187f629..b555f7bfdf1 100644
>--- a/src/mesa/drivers/dri/i965/brw_context.c
>+++ b/src/mesa/drivers/dri/i965/brw_context.c
>@@ -1022,6 +1022,13 @@ brwCreateContext(gl_api api,
> return false;
> }
>
>+ if (devinfo->gen == 10) {
>+ fprintf(stderr,
>+ "WARNING: i965 does not fully support Gen10 yet.\n"
>+ "Instability or lower performance might occur.\n");
>+
>+ }
>+
> brw_init_state(brw);
>
> intelInitExtensions(ctx);
>--
>2.14.3
>
More information about the mesa-dev
mailing list