mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
iris: Enable A8/A16_UNORM in an inefficient manner
These are currently just use the 'A' hardware formats, rather than the faster 'R' formats. glBitmap handling needs these, it seems. :(
This commit is contained in:
parent
80497af192
commit
4b31f506f8
1 changed files with 7 additions and 6 deletions
|
|
@ -159,11 +159,9 @@ iris_isl_format_for_pipe_format(enum pipe_format pf)
|
|||
* we don't currently have the surface format in that code...
|
||||
*/
|
||||
//[PIPE_FORMAT_A8_UINT] = ISL_FORMAT_A8_UINT,
|
||||
[PIPE_FORMAT_A8_UNORM] = ISL_FORMAT_A8_UNORM,
|
||||
//[PIPE_FORMAT_A8_SINT] = ISL_FORMAT_A8_SINT,
|
||||
//[PIPE_FORMAT_A8_SNORM] = ISL_FORMAT_A8_SNORM,
|
||||
//[PIPE_FORMAT_A16_UINT] = ISL_FORMAT_A16_UINT,
|
||||
[PIPE_FORMAT_A16_UNORM] = ISL_FORMAT_A16_UNORM,
|
||||
//[PIPE_FORMAT_A16_SINT] = ISL_FORMAT_A16_SINT,
|
||||
//[PIPE_FORMAT_A16_SNORM] = ISL_FORMAT_A16_SNORM,
|
||||
[PIPE_FORMAT_A16_FLOAT] = ISL_FORMAT_A16_FLOAT,
|
||||
|
|
@ -171,6 +169,8 @@ iris_isl_format_for_pipe_format(enum pipe_format pf)
|
|||
//[PIPE_FORMAT_A32_SINT] = ISL_FORMAT_A32_SINT,
|
||||
[PIPE_FORMAT_A32_FLOAT] = ISL_FORMAT_A32_FLOAT,
|
||||
#endif
|
||||
[PIPE_FORMAT_A8_UNORM] = ISL_FORMAT_A8_UNORM,
|
||||
[PIPE_FORMAT_A16_UNORM] = ISL_FORMAT_A16_UNORM,
|
||||
|
||||
/* Just use red formats for these - they're actually renderable,
|
||||
* and faster to sample than the legacy L/I formats.
|
||||
|
|
@ -326,7 +326,8 @@ iris_isl_format_for_pipe_format(enum pipe_format pf)
|
|||
return table[pf];
|
||||
}
|
||||
|
||||
static enum pipe_format
|
||||
// XXX: use RED for ALPHA textures
|
||||
UNUSED static enum pipe_format
|
||||
alpha_to_red(enum pipe_format pf)
|
||||
{
|
||||
switch (pf) {
|
||||
|
|
@ -358,9 +359,9 @@ iris_format_for_usage(const struct gen_device_info *devinfo,
|
|||
swizzle = ISL_SWIZZLE(RED, RED, RED, RED);
|
||||
} else if (util_format_is_luminance(pformat)) {
|
||||
swizzle = ISL_SWIZZLE(RED, RED, RED, ONE);
|
||||
} else if (util_format_is_alpha(pformat)) {
|
||||
pformat = alpha_to_red(pformat);
|
||||
swizzle = ISL_SWIZZLE(ZERO, ZERO, ZERO, RED);
|
||||
//} else if (util_format_is_alpha(pformat)) {
|
||||
//pformat = alpha_to_red(pformat);
|
||||
//swizzle = ISL_SWIZZLE(ZERO, ZERO, ZERO, RED);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue