r600: reorder state for render_target and blend
authorAndre Maasikas <amaasikas@gmail.com>
Wed, 4 Nov 2009 08:00:47 +0000 (10:00 +0200)
committerAndre Maasikas <amaasikas@gmail.com>
Tue, 8 Dec 2009 07:41:10 +0000 (09:41 +0200)
First time around render targets are not enabled yet (done in
r700SendRenderTargetState) so blend state is not emitted for any targets.
Affects first glClear in some mesa tests.
As a quick fix reorder state emit so that target is set first

src/mesa/drivers/dri/r600/r700_chip.c

index 8707a764ac61e405cd2b1253a648f14e15df345d..d8661b443972de3afa58cbffea2152d1b51fe442 100644 (file)
@@ -1250,9 +1250,9 @@ void r600InitAtoms(context_t *context)
        ALLOC_STATE(poly, always, 10, r700SendPolyState);
        ALLOC_STATE(cb, cb, 18, r700SendCBState);
        ALLOC_STATE(clrcmp, always, 6, r700SendCBCLRCMPState);
+       ALLOC_STATE(cb_target, always, 25, r700SendRenderTargetState);
        ALLOC_STATE(blnd, blnd, (6 + (R700_MAX_RENDER_TARGETS * 3)), r700SendCBBlendState);
        ALLOC_STATE(blnd_clr, always, 6, r700SendCBBlendColorState);
-       ALLOC_STATE(cb_target, always, 25, r700SendRenderTargetState);
        ALLOC_STATE(sx, always, 9, r700SendSXState);
        ALLOC_STATE(vgt, always, 41, r700SendVGTState);
        ALLOC_STATE(spi, always, (59 + R700_MAX_SHADER_EXPORTS), r700SendSPIState);