mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
i965: Override swizzles for integer luminance formats.
The hardware's integer luminance formats are completely unusable;
currently we fall back to RGBA. This means we need to override
the texture swizzle to obtain the XXX1 values expected for luminance
formats.
Fixes spec/EXT_texture_integer/texwrap formats bordercolor [swizzled]
on Broadwell - 100% of border color tests now pass on Broadwell.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 8cb18760cc)
This commit is contained in:
parent
b9518a41d4
commit
28650815ac
1 changed files with 8 additions and 0 deletions
|
|
@ -199,6 +199,14 @@ brw_get_texture_swizzle(const struct gl_context *ctx,
|
|||
swizzles[1] = SWIZZLE_ZERO;
|
||||
swizzles[2] = SWIZZLE_ZERO;
|
||||
break;
|
||||
case GL_LUMINANCE:
|
||||
if (t->_IsIntegerFormat) {
|
||||
swizzles[0] = SWIZZLE_X;
|
||||
swizzles[1] = SWIZZLE_X;
|
||||
swizzles[2] = SWIZZLE_X;
|
||||
swizzles[3] = SWIZZLE_ONE;
|
||||
}
|
||||
break;
|
||||
case GL_RED:
|
||||
case GL_RG:
|
||||
case GL_RGB:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue