struct intel_mipmap_tree *mt = intel_image->mt;
int level = image->Level;
- rb->Format = image->TexFormat;
- rb->InternalFormat = image->InternalFormat;
- rb->_BaseFormat = image->_BaseFormat;
- rb->NumSamples = mt->num_samples;
- rb->Width = image->Width2;
- rb->Height = image->Height2;
rb->Delete = intel_delete_renderbuffer;
rb->AllocStorage = intel_nop_alloc_storage;
context_dirty(ctx, FRAMEBUFFER);
}
-static GLenum
-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:
- return GL_NONE;
- }
-}
-
static void
nouveau_render_texture(struct gl_context *ctx, struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att)
att->Texture->Image[att->CubeMapFace][att->TextureLevel];
/* Update the renderbuffer fields from the texture. */
- set_renderbuffer_format(rb, get_tex_format(ti));
- rb->Width = ti->Width;
- rb->Height = ti->Height;
nouveau_surface_ref(&to_nouveau_teximage(ti)->surface,
&to_nouveau_renderbuffer(rb)->surface);
rb->AllocStorage = NULL;
}
+ rb->_BaseFormat = texImage->_BaseFormat;
+ rb->Format = texImage->TexFormat;
+ rb->InternalFormat = texImage->InternalFormat;
+ rb->Width = texImage->Width2;
+ rb->Height = texImage->Height2;
+ rb->NumSamples = texImage->NumSamples;
+
ctx->Driver.RenderTexture(ctx, fb, att);
}
strb->rtt_level = att->TextureLevel;
strb->rtt_face = att->CubeMapFace;
strb->rtt_slice = att->Zoffset;
- rb->NumSamples = texImage->NumSamples;
- rb->Width = texImage->Width2;
- rb->Height = texImage->Height2;
- rb->_BaseFormat = texImage->_BaseFormat;
- rb->InternalFormat = texImage->InternalFormat;
pipe_resource_reference( &strb->texture, pt );
zOffset = att->Zoffset;
}
- rb->Width = swImage->Base.Width;
- rb->Height = swImage->Base.Height;
- rb->InternalFormat = swImage->Base.InternalFormat;
- rb->_BaseFormat = _mesa_get_format_base_format(format);
-
/* Want to store linear values, not sRGB */
rb->Format = _mesa_get_srgb_format_linear(format);