summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2014-09-03 18:45:55 -0400
committerRob Clark <robclark@freedesktop.org>2014-09-04 22:28:50 -0400
commit08ee0488e6ae4c3728f00b24a2744cb3bd1929e8 (patch)
tree14620059208ef106b515a0d116fbe44935873149
parent4bca922878a4d433077d21d4918b1db71b3a15f7 (diff)
freedreno/ir3: bit of debug
Make it easier to figure out which compiler stage failed. Signed-off-by: Rob Clark <robclark@freedesktop.org>
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_compiler.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
index 472efd8926..e23dcdbc2c 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
@@ -1172,7 +1172,7 @@ get_tex_info(struct ir3_compile_context *ctx,
return NULL;
}
-static bool check_swiz(struct tgsi_src_register *src, int8_t order[4])
+static bool check_swiz(struct tgsi_src_register *src, const int8_t order[4])
{
unsigned i;
for (i = 1; (i < 4) && order[i] >= 0; i++)
@@ -2560,6 +2560,7 @@ ir3_compile_shader(struct ir3_shader_variant *so,
assert(so->ir);
if (compile_init(&ctx, so, tokens) != TGSI_PARSE_OK) {
+ DBG("INIT failed!");
ret = -1;
goto out;
}
@@ -2611,11 +2612,18 @@ ir3_compile_shader(struct ir3_shader_variant *so,
compile_dump(&ctx);
ret = ir3_block_flatten(block);
- if (ret < 0)
+ if (ret < 0) {
+ DBG("FLATTEN failed!");
goto out;
+ }
if ((ret > 0) && (fd_mesa_debug & FD_DBG_OPTDUMP))
compile_dump(&ctx);
+ if (fd_mesa_debug & FD_DBG_OPTMSGS) {
+ printf("BEFORE CP:\n");
+ ir3_dump_instr_list(block->head);
+ }
+
ir3_block_cp(block);
if (fd_mesa_debug & FD_DBG_OPTDUMP)
@@ -2629,8 +2637,10 @@ ir3_compile_shader(struct ir3_shader_variant *so,
}
ret = ir3_block_sched(block);
- if (ret)
+ if (ret) {
+ DBG("SCHED failed!");
goto out;
+ }
if (fd_mesa_debug & FD_DBG_OPTMSGS) {
printf("AFTER SCHED:\n");
@@ -2639,8 +2649,10 @@ ir3_compile_shader(struct ir3_shader_variant *so,
ret = ir3_block_ra(block, so->type, key.half_precision,
so->frag_coord, so->frag_face, &so->has_samp);
- if (ret)
+ if (ret) {
+ DBG("RA failed!");
goto out;
+ }
if (fd_mesa_debug & FD_DBG_OPTMSGS) {
printf("AFTER RA:\n");