i915g: Use the normal compile error path for empty FSes.
This means they'll get dumped and you'll see the passthrough FS. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
This commit is contained in:
parent
d83f0c1c04
commit
7921648cd6
|
@ -985,6 +985,13 @@ i915_fini_compile(struct i915_context *i915, struct i915_fp_compile *p)
|
||||||
if (p->nr_decl_insn > I915_MAX_DECL_INSN)
|
if (p->nr_decl_insn > I915_MAX_DECL_INSN)
|
||||||
i915_program_error(p, "Exceeded max DECL instructions");
|
i915_program_error(p, "Exceeded max DECL instructions");
|
||||||
|
|
||||||
|
/* 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 (p->error) {
|
if (p->error) {
|
||||||
p->NumNativeInstructions = 0;
|
p->NumNativeInstructions = 0;
|
||||||
p->NumNativeAluInstructions = 0;
|
p->NumNativeAluInstructions = 0;
|
||||||
|
@ -1053,14 +1060,6 @@ i915_translate_fragment_program(struct i915_context *i915,
|
||||||
tgsi_dump(tokens, 0);
|
tgsi_dump(tokens, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hw doesn't seem to like empty frag programs, even when the depth write
|
|
||||||
* fixup gets emitted below - may that one is fishy, too? */
|
|
||||||
if (fs->info.num_instructions == 1) {
|
|
||||||
i915_use_passthrough_shader(fs);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
p = i915_init_compile(i915, fs);
|
p = i915_init_compile(i915, fs);
|
||||||
|
|
||||||
i_tokens = i915_optimize(tokens);
|
i_tokens = i915_optimize(tokens);
|
||||||
|
|
Loading…
Reference in New Issue