From 53d8cff63b30326eaaafe3019d00354d4775a622 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 3 Aug 2013 17:31:53 -0700 Subject: [PATCH] i965/fs: Log a performance warning if skipping 16-wide due to pulls. Usually, the driver creates both 8-wide and 16-wide variants of every fragment shader. When 16-wide compilation fails, it logs a performance warning explaining why only an 8-wide program exists. However, when there are pull parameters, the driver won't even bother trying the 16-wide compile (since it would fail). In this case, it failed to emit a performance warning, leaving no explanation for the missing 16-wide program. Signed-off-by: Kenneth Graunke Reviewed-by: Matt Turner --- src/mesa/drivers/dri/i965/brw_fs.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index a81e97fd1df..a9533104176 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -3058,14 +3058,18 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c, exec_list *simd16_instructions = NULL; fs_visitor v2(brw, c, prog, fp, 16); - bool no16 = INTEL_DEBUG & DEBUG_NO16; - if (brw->gen >= 5 && c->prog_data.nr_pull_params == 0 && likely(!no16)) { - v2.import_uniforms(&v); - if (!v2.run()) { - perf_debug("16-wide shader failed to compile, falling back to " - "8-wide at a 10-20%% performance cost: %s", v2.fail_msg); + if (brw->gen >= 5 && likely(!(INTEL_DEBUG & DEBUG_NO16))) { + if (c->prog_data.nr_pull_params == 0) { + /* Try a 16-wide compile */ + v2.import_uniforms(&v); + if (!v2.run()) { + perf_debug("16-wide shader failed to compile, falling back to " + "8-wide at a 10-20%% performance cost: %s", v2.fail_msg); + } else { + simd16_instructions = &v2.instructions; + } } else { - simd16_instructions = &v2.instructions; + perf_debug("Skipping 16-wide due to pull parameters.\n"); } } -- 2.30.2