i915g: Fix the blending for the A8 destination buffer case.
authorStéphane Marchesin <marcheu@chromium.org>
Mon, 16 Jan 2012 07:32:59 +0000 (23:32 -0800)
committerStéphane Marchesin <marcheu@chromium.org>
Mon, 16 Jan 2012 07:39:49 +0000 (23:39 -0800)
commit23d4a0569dcb70bdfd748bf7e1f5102289bfad6b
tree7ef1c29ea94efa9603554d5a09f689429d3f63fe
parent6e9478e382df0e2fc45741c385976ae5d26c5345
i915g: Fix the blending for the A8 destination buffer case.

The i915 GPU can't do A8 dst, so we abuse GREEN8 buffers for that
purpose. However, things get hairy as we start to do blending,
because then GL_DST_*_ALPHA should be replaced with GL_DST_*_COLOR.
This is what we do here.

Fixes piglt fbo-alpha.
src/gallium/drivers/i915/i915_clear.c
src/gallium/drivers/i915/i915_context.h
src/gallium/drivers/i915/i915_state_emit.c
src/gallium/drivers/i915/i915_state_static.c