summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-04-22 11:04:21 -0700
committerEric Anholt <eric@anholt.net>2013-05-06 14:34:14 -0700
commit77a405dba7f70f8a47655e90774a5ecf5c88a6ed (patch)
tree0d0144210074d3ccfbe397ee3bb97f8afc77a391 /src/mesa/drivers/dri/nouveau
parent5b190d19d326369a5c43fbdd1f19d9c8d112da40 (diff)
mesa: Make Mesa core set up wrapped texture renderbuffer state.
Everyone was doing effectively the same thing, except for some funky code reuse in Intel, and swrast mistakenly recomputing _BaseFormat instead of using the texture's _BaseFormat. swrast's sRGB handling is left in place, though it should be done by using _mesa_get_render_format() at render time instead (as-is, it will miss updates to GL_FRAMEBUFFER_SRGB). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_fbo.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
index adead3d1bd4..a692051c082 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
@@ -247,21 +247,6 @@ nouveau_framebuffer_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *
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)
@@ -271,9 +256,6 @@ nouveau_render_texture(struct gl_context *ctx, struct gl_framebuffer *fb,
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);