dri/nouveau: Check _ColorDrawBuffers[0] before emitting fb state.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 7 Mar 2010 13:20:31 +0000 (14:20 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Sun, 7 Mar 2010 21:40:09 +0000 (22:40 +0100)
src/mesa/drivers/dri/nouveau/nv04_state_fb.c
src/mesa/drivers/dri/nouveau/nv10_state_fb.c
src/mesa/drivers/dri/nouveau/nv20_state_fb.c

index aad1e491d2f840dbddc577420027a31351bdbf26..5e5e0c587420cac17b93dc782297e4818fc84a9a 100644 (file)
@@ -63,7 +63,7 @@ nv04_emit_framebuffer(GLcontext *ctx, int emit)
                return;
 
        /* Render target */
-       if (fb->_NumColorDrawBuffers) {
+       if (fb->_ColorDrawBuffers[0]) {
                s = &to_nouveau_renderbuffer(
                        fb->_ColorDrawBuffers[0])->surface;
 
index 05c36b4f8f59c959914cc167fea6b3ab39f34c1b..6bd383ebcd32e2dbf81a71c8455fa5528cb00da4 100644 (file)
@@ -111,7 +111,7 @@ nv10_emit_framebuffer(GLcontext *ctx, int emit)
        }
 
        /* Render target */
-       if (fb->_NumColorDrawBuffers) {
+       if (fb->_ColorDrawBuffers[0]) {
                s = &to_nouveau_renderbuffer(
                        fb->_ColorDrawBuffers[0])->surface;
 
index 869acd6e3175fd78948911f73633bd1aff6d02c4..d638541df9eb81dc7090ed79d719ab1c336e5cf6 100644 (file)
@@ -67,7 +67,7 @@ nv20_emit_framebuffer(GLcontext *ctx, int emit)
                return;
 
        /* Render target */
-       if (fb->_NumColorDrawBuffers) {
+       if (fb->_ColorDrawBuffers[0]) {
                s = &to_nouveau_renderbuffer(
                        fb->_ColorDrawBuffers[0])->surface;