mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 00:50:36 +02:00
r300g: use the dummy FS shader for shaders with zero instructions
This commit is contained in:
parent
52e591383b
commit
537d117ed5
1 changed files with 8 additions and 0 deletions
|
|
@ -275,6 +275,14 @@ static void r300_translate_fragment_shader(
|
|||
/* Invoke the compiler */
|
||||
r3xx_compile_fragment_program(&compiler);
|
||||
|
||||
/* Shaders with zero instructions are invalid,
|
||||
* use the dummy shader instead. */
|
||||
if (shader->code.code.r500.inst_end == -1) {
|
||||
rc_destroy(&compiler.Base);
|
||||
r300_dummy_fragment_shader(r300, shader);
|
||||
return;
|
||||
}
|
||||
|
||||
if (compiler.Base.Error) {
|
||||
fprintf(stderr, "r300 FP: Compiler Error:\n%sUsing a dummy shader"
|
||||
" instead.\n", compiler.Base.ErrorMsg);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue