Mesa (master): nouveau: use _mesa_is_winsys/user_fbo() helpers
Brian Paul
brianp at kemper.freedesktop.org
Tue May 1 17:41:32 UTC 2012
Module: Mesa
Branch: master
Commit: 264b584294dc1c00c53f6a0622b7e6e55e8dce37
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=264b584294dc1c00c53f6a0622b7e6e55e8dce37
Author: Brian Paul <brianp at vmware.com>
Date: Fri Apr 20 07:58:59 2012 -0600
nouveau: use _mesa_is_winsys/user_fbo() helpers
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/mesa/drivers/dri/nouveau/nouveau_context.c | 5 +++--
src/mesa/drivers/dri/nouveau/nouveau_driver.c | 4 +++-
src/mesa/drivers/dri/nouveau/nouveau_screen.c | 1 +
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 4845767..2625b76 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -33,6 +33,7 @@
#include "main/dd.h"
#include "main/framebuffer.h"
+#include "main/fbobject.h"
#include "main/light.h"
#include "main/state.h"
#include "main/version.h"
@@ -396,11 +397,11 @@ nouveau_validate_framebuffer(struct gl_context *ctx)
__DRIdrawable *dri_draw = dri_ctx->driDrawablePriv;
__DRIdrawable *dri_read = dri_ctx->driReadablePriv;
- if (ctx->DrawBuffer->Name == 0)
+ if (_mesa_is_winsys_fbo(ctx->DrawBuffer))
validate_framebuffer(dri_ctx, dri_draw,
&dri_ctx->dri2.draw_stamp);
- if (ctx->ReadBuffer->Name == 0)
+ if (_mesa_is_winsys_fbo(ctx->ReadBuffer))
validate_framebuffer(dri_ctx, dri_read,
&dri_ctx->dri2.read_stamp);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
index 7222f68..69e5cac 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
@@ -25,6 +25,8 @@
*/
#include "main/mfeatures.h"
+#include "main/mtypes.h"
+#include "main/fbobject.h"
#include "nouveau_driver.h"
#include "nouveau_context.h"
@@ -61,7 +63,7 @@ nouveau_flush(struct gl_context *ctx)
PUSH_KICK(push);
- if (ctx->DrawBuffer->Name == 0 &&
+ if (_mesa_is_winsys_fbo(ctx->DrawBuffer) &&
ctx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) {
__DRIscreen *screen = nctx->screen->dri_screen;
__DRIdri2LoaderExtension *dri2 = screen->dri2.loader;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index 7e51b94..2a15c08 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -33,6 +33,7 @@
#include "nv20_driver.h"
#include "main/framebuffer.h"
+#include "main/fbobject.h"
#include "main/renderbuffer.h"
#include "swrast/s_renderbuffer.h"
More information about the mesa-commit
mailing list