diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c index f07095ee110..ba6f6172e85 100644 --- a/src/gallium/drivers/i915/i915_fpc_translate.c +++ b/src/gallium/drivers/i915/i915_fpc_translate.c @@ -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