mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-22 12:50:35 +01:00
i965/vec4: Move perf_debug about register spilling into the visitor.
This patch makes us only issue the performance warning about register
spilling if we actually spilled registers. We also use scratch space
for indirect addressing and the like.
This is basically commit c51163b0cf for
the vec4 backend.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
parent
0163c99e8f
commit
dc776ffb90
3 changed files with 13 additions and 11 deletions
|
|
@ -268,10 +268,6 @@ brw_codegen_gs_prog(struct brw_context *brw,
|
|||
|
||||
/* Scratch space is used for register spilling */
|
||||
if (c.base.last_scratch) {
|
||||
perf_debug("Geometry shader triggered register spilling. "
|
||||
"Try reducing the number of live vec4 values to "
|
||||
"improve performance.\n");
|
||||
|
||||
c.prog_data.base.base.total_scratch
|
||||
= brw_get_scratch_size(c.base.last_scratch*REG_SIZE);
|
||||
|
||||
|
|
|
|||
|
|
@ -1827,9 +1827,19 @@ vec4_visitor::run(gl_clip_plane *clip_planes)
|
|||
}
|
||||
}
|
||||
|
||||
while (!reg_allocate()) {
|
||||
if (failed)
|
||||
return false;
|
||||
bool allocated_without_spills = reg_allocate();
|
||||
|
||||
if (!allocated_without_spills) {
|
||||
compiler->shader_perf_log(log_data,
|
||||
"%s shader triggered register spilling. "
|
||||
"Try reducing the number of live vec4 values "
|
||||
"to improve performance.\n",
|
||||
stage_name);
|
||||
|
||||
while (!reg_allocate()) {
|
||||
if (failed)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
opt_schedule_instructions();
|
||||
|
|
|
|||
|
|
@ -196,10 +196,6 @@ brw_codegen_vs_prog(struct brw_context *brw,
|
|||
|
||||
/* Scratch space is used for register spilling */
|
||||
if (c.base.last_scratch) {
|
||||
perf_debug("Vertex shader triggered register spilling. "
|
||||
"Try reducing the number of live vec4 values to "
|
||||
"improve performance.\n");
|
||||
|
||||
prog_data.base.base.total_scratch
|
||||
= brw_get_scratch_size(c.base.last_scratch*REG_SIZE);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue