mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
i915: emit passthrough for empty TGSI fragment shaders
The TGSI compiler rejected empty fragment shaders (num_instructions == 1, just TGSI_END) as errors. Instead, emit a passthrough program. Assisted-by: Claude
This commit is contained in:
parent
5e1ada315c
commit
b1e709384b
1 changed files with 6 additions and 6 deletions
|
|
@ -1006,12 +1006,11 @@ i915_fini_compile(struct i915_context *i915, struct i915_fp_compile *p)
|
|||
p->nr_decl_insn, I915_MAX_DECL_INSN);
|
||||
}
|
||||
|
||||
/* hw doesn't seem to like empty frag programs (num_instructions == 1 is just
|
||||
* TGSI_END), even when the depth write fixup gets emitted below - maybe that
|
||||
* one is fishy, too?
|
||||
*/
|
||||
if (ifs->info.num_instructions == 1)
|
||||
i915_program_error(p, "Empty fragment shader");
|
||||
if (ifs->info.num_instructions == 1) {
|
||||
i915_use_passthrough_shader(ifs);
|
||||
ifs->nr_alu_insn = 1;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (strlen(p->error) != 0) {
|
||||
i915_use_passthrough_shader(ifs);
|
||||
|
|
@ -1042,6 +1041,7 @@ i915_fini_compile(struct i915_context *i915, struct i915_fp_compile *p)
|
|||
}
|
||||
}
|
||||
|
||||
done:
|
||||
if (strlen(p->error) != 0)
|
||||
ifs->error = p->error;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue