Merge remote branch 'origin/master' into gallium_draw_llvm
[mesa.git] / src / mesa / drivers / dri / nouveau / nv04_state_fb.c
index e97eb2a03b9d4583971cd9b3560b5edabca53bc5..5e5e0c587420cac17b93dc782297e4818fc84a9a 100644 (file)
@@ -50,8 +50,8 @@ void
 nv04_emit_framebuffer(GLcontext *ctx, int emit)
 {
        struct nouveau_channel *chan = context_chan(ctx);
-       struct nouveau_screen *screen = to_nouveau_context(ctx)->screen;
-       struct nouveau_grobj *surf3d = screen->surf3d;
+       struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
+       struct nouveau_grobj *surf3d = hw->surf3d;
        struct nouveau_bo_context *bctx = context_bctx(ctx, FRAMEBUFFER);
        struct gl_framebuffer *fb = ctx->DrawBuffer;
        struct nouveau_surface *s;
@@ -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;
 
@@ -100,8 +100,8 @@ void
 nv04_emit_scissor(GLcontext *ctx, int emit)
 {
        struct nouveau_channel *chan = context_chan(ctx);
-       struct nouveau_screen *screen = to_nouveau_context(ctx)->screen;
-       struct nouveau_grobj *surf3d = screen->surf3d;
+       struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
+       struct nouveau_grobj *surf3d = hw->surf3d;
        int x, y, w, h;
 
        get_scissors(ctx->DrawBuffer, &x, &y, &w, &h);