From a3de65659cf07420363c91ae38dd61468f122ef0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 4 Jul 2008 10:35:32 -0600 Subject: [PATCH] gallium: fix st_choose_format(internalFormat=GL_RGBA16) Need to check if we're choosing a surface or texture format. --- src/mesa/state_tracker/st_format.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- 2.30.2