mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
mesa: State tracker now checks for faulty shaders on debug
This commit is contained in:
parent
ad16ecbbe4
commit
358aab12c6
1 changed files with 12 additions and 1 deletions
|
|
@ -35,10 +35,12 @@
|
|||
#include "tgsi/tgsi_parse.h"
|
||||
#include "tgsi/tgsi_build.h"
|
||||
#include "tgsi/tgsi_util.h"
|
||||
#include "tgsi/tgsi_dump.h"
|
||||
#include "tgsi/tgsi_sanity.h"
|
||||
#include "st_mesa_to_tgsi.h"
|
||||
#include "shader/prog_instruction.h"
|
||||
#include "shader/prog_parameter.h"
|
||||
|
||||
#include "pipe/p_debug.h"
|
||||
|
||||
/*
|
||||
* Map mesa register file to TGSI register file.
|
||||
|
|
@ -980,5 +982,14 @@ tgsi_translate_mesa_program(
|
|||
maxTokens - ti );
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if(!tgsi_sanity_check(tokens)) {
|
||||
//debug_printf("Due to sanity check failure the following shader program is invalid\n");
|
||||
tgsi_dump(tokens, 0);
|
||||
|
||||
assert(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ti;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue