From d47a6ada9ca9670c60fc141fabadf40c63031c08 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 24 Aug 2012 08:31:37 -0600 Subject: mesa: add texture target field to ChooseTextureFormat() driver hook This will let us choose the actual hardware format depending on the type of texture. v2: fixup radeon, nouveau, intel and swrast drivers too Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/swrast/swrast.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/swrast') diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 7773fd9050a..9aed2f6e6c5 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -632,13 +632,14 @@ viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h) } static gl_format swrastChooseTextureFormat(struct gl_context * ctx, + GLenum target, GLint internalFormat, GLenum format, GLenum type) { if (internalFormat == GL_RGB) return MESA_FORMAT_XRGB8888; - return _mesa_choose_tex_format(ctx, internalFormat, format, type); + return _mesa_choose_tex_format(ctx, target, internalFormat, format, type); } static void -- cgit v1.2.3