i965: Make the brw_format_for_mesa_format table static const.

Once again, assuming the compiler is clever works out so poorly.  The
generated code initialized the structure on the stack, then did a
lookup into it.  This was a performance regression from
70c6cd39bd.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Eric Anholt 2011-06-21 17:38:20 -07:00
parent 3541cc0d40
commit 0c27dcb75c
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ translate_tex_target(GLenum target)
uint32_t
brw_format_for_mesa_format(gl_format mesa_format)
{
uint32_t table[MESA_FORMAT_COUNT] =
static const uint32_t table[MESA_FORMAT_COUNT] =
{
[MESA_FORMAT_L8] = BRW_SURFACEFORMAT_L8_UNORM,
[MESA_FORMAT_I8] = BRW_SURFACEFORMAT_I8_UNORM,