summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/glformats.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2014-11-26 09:05:08 +0100
committerIago Toral Quiroga <[email protected]>2015-01-12 11:20:28 +0100
commit3171a09c2539a3d08196d6a4cb91ad6276f9383d (patch)
tree79d1a582beeab9e59c11c523f69a2b75221b4051 /src/mesa/main/glformats.c
parent1aaed753301a4c0d39173616088db66231e7298d (diff)
mesa: Add a rebase_swizzle parameter to _mesa_format_convert
The new parameter allows callers to provide a rebase swizzle that the function needs to use to match the requirements of the base internal format involved. This is necessary when the source or destination internal formats (depending on whether we are doing the conversion for a pixel download or a pixel upload respectively) do not match the base formats of the source or destination formats of the conversion. This can happen when the driver does not support the internal formats and uses a different format to store pixel data internally. For example, a texture upload from RGB to Luminance in a driver that does not support textures with a Luminance format may decide to store the Luminance data as RGBA. In this case we want to store the RGBA values as (R,R,R,1). Following the same example, when we download from that texture to RGBA we want to read (R,0,0,1). The rebase_swizzle parameter allows these transforms to happen. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/main/glformats.c')
0 files changed, 0 insertions, 0 deletions