Merge branch '7.8'
[mesa.git] / src / mesa / drivers / dri / nouveau / nouveau_fbo.c
index 91eade8d633db87125eb02848e892a304c39cb49..8be7edb150bf8bbde835eed86ee0ecdcf3fd9a37 100644 (file)
@@ -70,9 +70,9 @@ set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat)
        case GL_DEPTH_COMPONENT24:
        case GL_STENCIL_INDEX8_EXT:
        case GL_DEPTH24_STENCIL8_EXT:
-               rb->_BaseFormat  = GL_DEPTH_COMPONENT;
+               rb->_BaseFormat  = GL_DEPTH_STENCIL;
                rb->Format = MESA_FORMAT_Z24_S8;
-               rb->DataType = GL_UNSIGNED_INT;
+               rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
                s->cpp = 4;
                break;
        default:
@@ -142,7 +142,6 @@ nouveau_renderbuffer_dri_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
        rb->Width = width;
        rb->Height = height;
 
-       context_dirty(ctx, FRAMEBUFFER);
        return GL_TRUE;
 }
 
@@ -216,6 +215,8 @@ get_tex_format(struct gl_texture_image *ti)
        switch (ti->TexFormat) {
        case MESA_FORMAT_ARGB8888:
                return GL_RGBA8;
+       case MESA_FORMAT_XRGB8888:
+               return GL_RGB8;
        case MESA_FORMAT_RGB565:
                return GL_RGB5;
        default:
@@ -235,7 +236,7 @@ nouveau_render_texture(GLcontext *ctx, struct gl_framebuffer *fb,
        /* Allocate a renderbuffer object for the texture if we
         * haven't already done so. */
        if (!rb) {
-               rb = nouveau_renderbuffer_new(ctx, 0);
+               rb = nouveau_renderbuffer_new(ctx, ~0);
                assert(rb);
 
                rb->AllocStorage = NULL;
@@ -258,11 +259,7 @@ static void
 nouveau_finish_render_texture(GLcontext *ctx,
                              struct gl_renderbuffer_attachment *att)
 {
-       struct nouveau_renderbuffer *nrb
-               = to_nouveau_renderbuffer(att->Renderbuffer);
-
        texture_dirty(att->Texture);
-       nouveau_surface_ref(NULL, &nrb->surface);
 }
 
 void