nouveau: Don't fill nrb->dPriv for private buffers
authorBen Skeggs <darktama@iinet.net.au>
Sat, 23 Dec 2006 12:03:55 +0000 (23:03 +1100)
committerBen Skeggs <darktama@iinet.net.au>
Sat, 23 Dec 2006 12:03:55 +0000 (23:03 +1100)
src/mesa/drivers/dri/nouveau/nouveau_buffers.c
src/mesa/drivers/dri/nouveau/nouveau_screen.c
src/mesa/drivers/dri/nouveau/nouveau_state.c
src/mesa/drivers/dri/nouveau/nv30_state.c

index f30e59323d20a28f29327d4153d1e5cab3cfe1db..0a5efa8c2e2ca9557c0d40ba80be2860bd4ac863 100644 (file)
@@ -152,7 +152,7 @@ nouveau_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
 
    /* If this buffer isn't statically alloc'd, we may need to ask the
     * drm for more memory */
-   if (!nrb->map && (rb->Width != width || rb->Height != height)) {
+   if (!nrb->dPriv && (rb->Width != width || rb->Height != height)) {
       GLuint pitch;
 
       /* align pitches to 64 bytes */
index 140db496b2ec377aeb9f79da16546a6f1d3a17b0..99992b838a53675dac6bebbb006dad84bad63f8c 100644 (file)
@@ -152,7 +152,7 @@ nouveauCreateBuffer(__DRIscreenPrivate *driScrnPriv,
                if (mesaVis->doubleBufferMode) {
                        nrb = nouveau_renderbuffer_new(color_format, NULL,
                                                       0, 0,
-                                                      driDrawPriv);
+                                                      NULL);
                        nouveauSpanSetFunctions(nrb, mesaVis);
                        _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &nrb->mesa);
                }
@@ -160,20 +160,20 @@ nouveauCreateBuffer(__DRIscreenPrivate *driScrnPriv,
                if (mesaVis->depthBits == 24 && mesaVis->stencilBits == 8) {
                        nrb = nouveau_renderbuffer_new(GL_DEPTH24_STENCIL8_EXT, NULL,
                                                       0, 0,
-                                                      driDrawPriv);
+                                                      NULL);
                        nouveauSpanSetFunctions(nrb, mesaVis);
                        _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa);
                        _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &nrb->mesa);
                } else if (mesaVis->depthBits == 24) {
                        nrb = nouveau_renderbuffer_new(GL_DEPTH_COMPONENT24, NULL,
                                                       0, 0,
-                                                      driDrawPriv);
+                                                      NULL);
                        nouveauSpanSetFunctions(nrb, mesaVis);
                        _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa);
                } else if (mesaVis->depthBits == 16) {
                        nrb = nouveau_renderbuffer_new(GL_DEPTH_COMPONENT16, NULL,
                                                       0, 0,
-                                                      driDrawPriv);
+                                                      NULL);
                        nouveauSpanSetFunctions(nrb, mesaVis);
                        _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa);
                }
index cec7120d43e8291e51551d5e4acd07c715e2da81..d3c233eb130bb4492cff3ea9940f661836a2f9e3 100644 (file)
@@ -68,7 +68,7 @@ static void nouveauCalcViewport(GLcontext *ctx)
     nrb = nouveau_current_draw_buffer(ctx);
     nmesa->depth_scale = 1.0 / ctx->DrawBuffer->_DepthMaxF;
 
-    if (nrb && nrb->map) {
+    if (nrb && nrb->dPriv) {
        /* Window */
        xoffset = nrb->dPriv->x;
        yoffset = nrb->dPriv->y;
index 4169dad66161bda3e373eb42530deb62a9b2645d..35b428b37c2dfe61b9e96b3968b880774079ac72 100644 (file)
@@ -577,7 +577,7 @@ static void nv30Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
 
        /* Adjust offsets if drawing to a window */
        nrb = nouveau_current_draw_buffer(ctx);
-       if (nrb && nrb->map) {
+       if (nrb && nrb->dPriv) {
           x += nrb->dPriv->x;
           y += nrb->dPriv->y;
        }
@@ -690,7 +690,7 @@ static void nv30WindowMoved(nouveauContextPtr nmesa)
 
        /* Adjust offsets if drawing to a window */
        nrb = nouveau_current_draw_buffer(ctx);
-       if (nrb && nrb->map) {
+       if (nrb && nrb->dPriv) {
           x += nrb->dPriv->x;
           y += nrb->dPriv->y;
        }
@@ -777,7 +777,7 @@ static GLboolean nv30BindBuffers(nouveauContextPtr nmesa, int num_color,
    nrb = nouveau_current_draw_buffer(nmesa->glCtx);
    w = nrb->mesa.Width;
    h = nrb->mesa.Height;
-   if (nrb && nrb->map) {
+   if (nrb && nrb->dPriv) {
       x = nrb->dPriv->x;
       y = nrb->dPriv->y;
    } else {