mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
r300g: Do not abort on fragment program compiler error
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
This commit is contained in:
parent
59b20b760d
commit
81e5188f66
2 changed files with 9 additions and 4 deletions
|
|
@ -126,9 +126,14 @@ void r300_translate_fragment_shader(struct r300_context* r300,
|
|||
/* Invoke the compiler */
|
||||
r3xx_compile_fragment_program(&compiler);
|
||||
if (compiler.Base.Error) {
|
||||
/* Todo: Fail gracefully */
|
||||
fprintf(stderr, "r300 FP: Compiler error\n");
|
||||
abort();
|
||||
/* Todo: Fallback to software rendering gracefully? */
|
||||
fprintf(stderr, "r300 FP: Compiler error: %s\n", compiler.Base.ErrorMsg);
|
||||
|
||||
if (compiler.is_r500) {
|
||||
memcpy(compiler.code, &r5xx_passthrough_fragment_shader, sizeof(r5xx_passthrough_fragment_shader));
|
||||
} else {
|
||||
memcpy(compiler.code, &r3xx_passthrough_fragment_shader, sizeof(r3xx_passthrough_fragment_shader));
|
||||
}
|
||||
}
|
||||
|
||||
/* And, finally... */
|
||||
|
|
|
|||
|
|
@ -48,4 +48,4 @@ struct r300_fragment_shader {
|
|||
void r300_translate_fragment_shader(struct r300_context* r300,
|
||||
struct r300_fragment_shader* fs);
|
||||
|
||||
#endif /* R300_FS_H */
|
||||
#endif /* R300_FS_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue