From: Brian Paul Date: Fri, 4 Jul 2008 16:35:32 +0000 (-0600) Subject: gallium: fix st_choose_format(internalFormat=GL_RGBA16) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a3de65659cf07420363c91ae38dd61468f122ef0;p=mesa.git gallium: fix st_choose_format(internalFormat=GL_RGBA16) Need to check if we're choosing a surface or texture format. --- diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 03ec558a367..50a06868dfc 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -362,7 +362,10 @@ st_choose_format(struct pipe_context *pipe, GLint internalFormat, case GL_RGBA12: return default_rgba_format( screen, surfType ); case GL_RGBA16: - return default_deep_rgba_format( screen, surfType ); + if (surfType == PIPE_SURFACE) + return default_deep_rgba_format( screen, surfType ); + else + return default_rgba_format( screen, surfType ); case GL_RGBA4: case GL_RGBA2: