diff options
Diffstat (limited to 'src/gallium/drivers/iris/iris_formats.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_formats.c | 13 |
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); } } |