Mesa (master): nouveau: nv30: check number of colour buffers to bind

Patrice Mandin pmandin at kemper.freedesktop.org
Wed Oct 21 19:56:47 UTC 2009


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

Author: Patrice Mandin <patmandin at gmail.com>
Date:   Wed Oct 21 21:56:09 2009 +0200

nouveau: nv30: check number of colour buffers to bind

---

 src/gallium/drivers/nv30/nv30_state_fb.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/nv30/nv30_state_fb.c b/src/gallium/drivers/nv30/nv30_state_fb.c
index 9b0266f..197de82 100644
--- a/src/gallium/drivers/nv30/nv30_state_fb.c
+++ b/src/gallium/drivers/nv30/nv30_state_fb.c
@@ -17,6 +17,10 @@ nv30_state_framebuffer_validate(struct nv30_context *nv30)
 	struct nv30_miptree *nv30mt;
 	int colour_bits = 32, zeta_bits = 32;
 
+	if (fb->nr_cbufs == 0) {
+		return FALSE;
+	}
+
 	rt_enable = 0;
 	for (i = 0; i < fb->nr_cbufs; i++) {
 		if (colour_format) {




More information about the mesa-commit mailing list