aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-06-29 16:53:35 -0600
committerBrian Paul <[email protected]>2012-07-05 07:59:20 -0600
commit9b3d87b0924a3d19b99b2ceb2ae55dd74c9088a7 (patch)
treee072e56cf89572374a594a902f72131ffdefee33 /src/gallium/drivers
parent33526a2ffe37aa5e861ea3895b20d4585396b86b (diff)
svga: emit some debug messages when shader compilation fails
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c
index 8a1ed4aba79..f4ddefbec27 100644
--- a/src/gallium/drivers/svga/svga_tgsi.c
+++ b/src/gallium/drivers/svga/svga_tgsi.c
@@ -290,17 +290,23 @@ svga_tgsi_translate( const struct svga_shader *shader,
emit.nr_hw_temp = emit.info.file_max[TGSI_FILE_TEMPORARY] + 1;
- if (emit.nr_hw_temp >= SVGA3D_TEMPREG_MAX)
+ if (emit.nr_hw_temp >= SVGA3D_TEMPREG_MAX) {
+ debug_printf("svga: too many temporary registers (%u)\n", emit.nr_hw_temp);
goto fail;
+ }
emit.in_main_func = TRUE;
- if (!svga_shader_emit_header( &emit ))
+ if (!svga_shader_emit_header( &emit )) {
+ debug_printf("svga: emit header failed\n");
goto fail;
+ }
- if (!svga_shader_emit_instructions( &emit, shader->tokens ))
+ if (!svga_shader_emit_instructions( &emit, shader->tokens )) {
+ debug_printf("svga: emit instructions failed\n");
goto fail;
-
+ }
+
result = CALLOC_STRUCT(svga_shader_result);
if (result == NULL)
goto fail;