diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2017-09-09 00:20:26 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2017-10-12 17:22:42 -0700 |
commit | cb9a4ae6c00245398aa63644bf6ab4f1b09050fa (patch) | |
tree | ee5d106b7f358e2e85ef472bbc880532eb44b83a /include | |
parent | 32fcced7b479cb7acf43305481cc23a0b04b051c (diff) |
i965: Ignore GL_SKIP_DECODE_EXT for textures accessed via texelFetch().
The GL_EXT_texture_sRGB_decode spec says:
"The conversion of sRGB color space components to linear color space is
always performed if the texel lookup function is one of the texelFetch
builtin functions.
Otherwise, if the texel lookup function is one of the texture builtin
functions or one of the texture gather functions, the conversion of sRGB
color space components to linear color space is controlled by the
TEXTURE_SRGB_DECODE_EXT parameter.
If the TEXTURE_SRGB_DECODE_EXT parameter is DECODE_EXT, the conversion
of sRGB color space components to linear color space is performed.
If the TEXTURE_SRGB_DECODE_EXT parameter is SKIP_DECODE_EXT, the value
is returned without decoding. However, if the texture is also accessed
with a texelFetch function, then the result of texture builtin functions
and/or texture gather functions may be returned with decoding or without
decoding."
This patch makes i965 force sRGB decoding for any textures accessed via
texelFetch(). If textures are accessed via texelFetch() and a regular
texture access function, this will affect the other ones too - which is
fine - it's undefined according to the last paragraph quoted.
We could make both work, but we'd have to emit multiple SURFACE_STATEs,
and have two binding table sections, like we do for texture gather hacks
on older platforms.
Fixes the following Android O CTS test:
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.srgba8.texel_fetch
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions