From: Stéphane Marchesin Date: Fri, 24 Jun 2011 21:07:31 +0000 (-0700) Subject: st/mesa: add PIPE_FORMAT_R8G8B8A8_UNORM as the first RGBA format. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=407832b0d251515307dc0712863e243435baa4c2;p=mesa.git st/mesa: add PIPE_FORMAT_R8G8B8A8_UNORM as the first RGBA format. Otherwise we can end up creating RGBA render targets (which are BGRA on the hardware), and then we bind them as RGBA textures (which are RGBA on the hardware). This generates software fallbacks every time we bind the frame as a texture. --- diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index b8c0d1f029e..fa5d8f5050a 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -616,7 +616,7 @@ static const struct format_mapping format_map[] = { }, { { 4, GL_RGBA, GL_RGBA8, 0 }, - { DEFAULT_RGBA_FORMATS } + { PIPE_FORMAT_R8G8B8A8_UNORM, DEFAULT_RGBA_FORMATS } }, { { GL_BGRA, 0 },