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 aad1e49..5e5e0c5 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 05c36b4..6bd383e 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 869acd6..d638541 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;