Mesa (master): nir: convert_ycbcr: preserve alpha channel
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Apr 20 23:00:21 UTC 2020
Module: Mesa
Branch: master
Commit: 71820c6b02d71e40d413e2d080e87108e64cfeeb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=71820c6b02d71e40d413e2d080e87108e64cfeeb
Author: Jonathan Marek <jonathan at marek.ca>
Date: Fri Apr 10 08:37:48 2020 -0400
nir: convert_ycbcr: preserve alpha channel
Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: D Scott Phillips <d.scott.phillips at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4528>
---
src/compiler/nir/nir_convert_ycbcr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_convert_ycbcr.c b/src/compiler/nir/nir_convert_ycbcr.c
index fdd6cf1597d..2a111699fdb 100644
--- a/src/compiler/nir/nir_convert_ycbcr.c
+++ b/src/compiler/nir/nir_convert_ycbcr.c
@@ -122,7 +122,7 @@ nir_convert_ycbcr_to_rgb(nir_builder *b,
chroma_range(b, nir_channel(b, raw_channels, 0), bpcs[0], range),
y_range(b, nir_channel(b, raw_channels, 1), bpcs[1], range),
chroma_range(b, nir_channel(b, raw_channels, 2), bpcs[2], range),
- nir_imm_float(b, 1.0f));
+ nir_channel(b, raw_channels, 3));
if (model == VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY)
return expanded_channels;
@@ -138,5 +138,5 @@ nir_convert_ycbcr_to_rgb(nir_builder *b,
return nir_vec4(b,
converted_channels[0], converted_channels[1],
- converted_channels[2], nir_imm_float(b, 1.0f));
+ converted_channels[2], nir_channel(b, raw_channels, 3));
}
More information about the mesa-commit
mailing list