mesa/src
Iago Toral Quiroga 3c19251f28 mesa: Let _mesa_get_format_base_format also handle mesa_array_format.
If we need the base format for a mesa_array_format we have to find the
matching mesa_format first. This is expensive because it requires
to loop through all existing mesa formats until we find the right match.

We can resolve the base format of an array format directly by looking
at its swizzle information. Also, we can have _mesa_get_format_base_format
accept an uint32_t which can pack either a mesa_format or a mesa_array_format
and resolve the base format for either type. This way clients do not need to
check if they have a mesa_format or a mesa_array_format and call different
functions depending on the case.

Another reason to resolve the base format for array formats directly is that
we don't have matching mesa_format enums for every possible array format, so
for some GL format/type combinations we can produce array formats that don't
have a corresponding mesa format, in which case we would not be able to
find the base format. Example format=GL_RGB, type=GL_UNSIGNED_SHORT. This type
would map to something like MESA_FORMAT_RGB_UNORM16, but we don't have that.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2015-01-12 11:20:28 +01:00
..
egl egl: Inform the client API when ancillary buffers may become undefined. 2015-01-06 15:40:40 -08:00
gallium vc4: Clamp the inputs to the blend equation to [0, 1]. 2015-01-11 17:17:20 +13:00
gbm gbm: remove support for GCC older than 4.1.0 2014-12-17 08:37:29 +11:00
getopt
glsl glsl: use the is_gl_identifier() helper in a couple more places 2015-01-05 13:50:54 -07:00
glx mesa: remove support for GCC older than 3.3.0 2014-12-17 08:37:05 +11:00
gtest gtest: Add headers to distribution. 2014-12-12 12:11:46 -08:00
hgl hgl: traverse add-on entries 2014-12-10 14:01:01 +00:00
loader mesa: Add scons files to distribution. 2014-12-12 12:11:50 -08:00
mapi main: Added entry point for glTextureBuffer. 2015-01-08 11:37:30 -08:00
mesa mesa: Let _mesa_get_format_base_format also handle mesa_array_format. 2015-01-12 11:20:28 +01:00
util util: Silence signed-unsigned comparison warnings 2014-12-17 17:15:36 +00:00
Makefile.am mesa: Add scons files to distribution. 2014-12-12 12:11:50 -08:00
SConscript egl: Fix non-dri SCons builds re #87657 2014-12-25 10:34:49 -05:00