summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-01-13 14:28:13 -0800
committerKenneth Graunke <[email protected]>2015-01-14 16:55:38 -0800
commit68ed14d6adcaf4b91216fc1c53792e88d1fd024d (patch)
tree2dc68f329220fc3395c1242cd3a048ca1c1b0b58 /src
parentefef6c828092702b1f928f98d15fb90b4544a85c (diff)
i965: Pass a shader stage abbreviation to fs_generator().
A lot of messages hardcoded the string "FS", which is confusing on Broadwell, where we use this code for VS support as well. shader-db particularly got confused, as it reported two "FS SIMD8" shaders, and no vertex shaders at all. Craziness ensued. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h4
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_generator.cpp16
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp2
5 files changed, 15 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
index 83fccc2a98b..f9b17376451 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
@@ -31,7 +31,7 @@ brw_blorp_eu_emitter::brw_blorp_eu_emitter(struct brw_context *brw,
: mem_ctx(ralloc_context(NULL)),
generator(brw, mem_ctx, (void *) rzalloc(mem_ctx, struct brw_wm_prog_key),
(struct brw_stage_prog_data *) rzalloc(mem_ctx, struct brw_wm_prog_data),
- NULL, false)
+ NULL, false, "BLORP")
{
if (debug_flag)
generator.enable_debug("blorp");
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 9dfb7b7343d..cbe4fda63dd 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3857,7 +3857,7 @@ brw_wm_fs_emit(struct brw_context *brw,
}
fs_generator g(brw, mem_ctx, (void *) key, &prog_data->base,
- &fp->Base, v.runtime_check_aads_emit);
+ &fp->Base, v.runtime_check_aads_emit, "FS");
if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
char *name;
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 06575a54753..c9f235cd09e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -712,7 +712,8 @@ public:
const void *key,
struct brw_stage_prog_data *prog_data,
struct gl_program *fp,
- bool runtime_check_aads_emit);
+ bool runtime_check_aads_emit,
+ const char *stage_abbrev);
~fs_generator();
void enable_debug(const char *shader_name);
@@ -825,6 +826,7 @@ private:
bool runtime_check_aads_emit;
bool debug_flag;
const char *shader_name;
+ const char *stage_abbrev;
void *mem_ctx;
};
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 7b4ac8d3695..ab848f1714a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -123,12 +123,13 @@ fs_generator::fs_generator(struct brw_context *brw,
const void *key,
struct brw_stage_prog_data *prog_data,
struct gl_program *prog,
- bool runtime_check_aads_emit)
+ bool runtime_check_aads_emit,
+ const char *stage_abbrev)
: brw(brw), key(key),
prog_data(prog_data),
prog(prog), runtime_check_aads_emit(runtime_check_aads_emit),
- debug_flag(false), mem_ctx(mem_ctx)
+ debug_flag(false), stage_abbrev(stage_abbrev), mem_ctx(mem_ctx)
{
ctx = &brw->ctx;
@@ -2035,10 +2036,11 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
default:
if (inst->opcode < (int) ARRAY_SIZE(opcode_descs)) {
- _mesa_problem(ctx, "Unsupported opcode `%s' in FS",
- opcode_descs[inst->opcode].name);
+ _mesa_problem(ctx, "Unsupported opcode `%s' in %s",
+ opcode_descs[inst->opcode].name, stage_abbrev);
} else {
- _mesa_problem(ctx, "Unsupported opcode %d in FS", inst->opcode);
+ _mesa_problem(ctx, "Unsupported opcode %d in %s", inst->opcode,
+ stage_abbrev);
}
abort();
@@ -2085,9 +2087,9 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
MESA_DEBUG_SOURCE_SHADER_COMPILER,
MESA_DEBUG_TYPE_OTHER,
MESA_DEBUG_SEVERITY_NOTIFICATION,
- "FS SIMD%d shader: %d inst, %d loops, "
+ "%s SIMD%d shader: %d inst, %d loops, "
"compacted %d to %d bytes.\n",
- dispatch_width, before_size / 16, loop_count,
+ stage_abbrev, dispatch_width, before_size / 16, loop_count,
before_size, after_size);
return start_offset;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index c96bd847160..0089bd0827c 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1895,7 +1895,7 @@ brw_vs_emit(struct brw_context *brw,
}
fs_generator g(brw, mem_ctx, (void *) &c->key, &prog_data->base.base,
- &c->vp->program.Base, v.runtime_check_aads_emit);
+ &c->vp->program.Base, v.runtime_check_aads_emit, "VS");
if (INTEL_DEBUG & DEBUG_VS) {
char *name = ralloc_asprintf(mem_ctx, "%s vertex shader %d",
prog->Label ? prog->Label : "unnamed",