mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
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>
This commit is contained in:
parent
a9b800aa81
commit
53d8cff63b
1 changed files with 11 additions and 7 deletions
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue