aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_state_framebuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_framebuffer.c')
-rw-r--r--src/gallium/drivers/svga/svga_state_framebuffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c
index 7d7f93d8e3c..cfdcae4ee4a 100644
--- a/src/gallium/drivers/svga/svga_state_framebuffer.c
+++ b/src/gallium/drivers/svga/svga_state_framebuffer.c
@@ -54,6 +54,9 @@ static int emit_framebuffer( struct svga_context *svga,
for(i = 0; i < PIPE_MAX_COLOR_BUFS; ++i) {
if (curr->cbufs[i] != hw->cbufs[i]) {
+ if (svga->curr.nr_fbs++ > 8)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_COLOR0 + i, curr->cbufs[i]);
if (ret != PIPE_OK)
return ret;