aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_formats.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-11-04 15:00:31 -0800
committerKenneth Graunke <[email protected]>2019-02-21 10:26:09 -0800
commit4b31f506f8a5765f470fbe130fc4b40a02c3931b (patch)
treebb5fa5b2e252482961f06b50ab5c3827293cbe70 /src/gallium/drivers/iris/iris_formats.c
parent80497af192fb8b326b6e4fb4f9ef81f8b001c2eb (diff)
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. :(
Diffstat (limited to 'src/gallium/drivers/iris/iris_formats.c')
-rw-r--r--src/gallium/drivers/iris/iris_formats.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/drivers/iris/iris_formats.c b/src/gallium/drivers/iris/iris_formats.c
index 89f13dbbac4..b18645439f3 100644
--- a/src/gallium/drivers/iris/iris_formats.c
+++ b/src/gallium/drivers/iris/iris_formats.c
@@ -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);
}
}