Module: Mesa
Branch: master
Commit: 5befb6f810fb88ed1e51ec26b79b647cd15b1433
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5befb6f810fb88ed1e51ec26b79b647cd15b1433

Author: Francisco Jerez <curroje...@riseup.net>
Date:   Sun Mar  7 14:20:31 2010 +0100

dri/nouveau: Check _ColorDrawBuffers[0] before emitting fb state.

---

 src/mesa/drivers/dri/nouveau/nv04_state_fb.c |    2 +-
 src/mesa/drivers/dri/nouveau/nv10_state_fb.c |    2 +-
 src/mesa/drivers/dri/nouveau/nv20_state_fb.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c 
b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
index aad1e49..5e5e0c5 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
@@ -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;
 
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c 
b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
index 05c36b4..6bd383e 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
@@ -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;
 
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c 
b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
index 869acd6..d638541 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
@@ -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;
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to