diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2013-08-03 17:31:53 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-08-12 13:12:47 -0700 |
commit | 53d8cff63b30326eaaafe3019d00354d4775a622 (patch) | |
tree | b4ef0e6bb5c858c48c18c832417bf3c4a077dbbb /src | |
parent | a9b800aa81cffdcaef2490ff49986099feae2663 (diff) |
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 <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 18 |
1 files 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"); } } |