From b53f9011b1a298022dc26bbbac3427fd9f6af0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Francis=20Ratt=C3=A9-Boulianne?= Date: Wed, 20 Apr 2022 11:38:56 -0400 Subject: [PATCH] microsoft/compiler: Add support for more scaled formats Lower 8 and 16 bit scaled formats to integer formats. Reviewed-by: Erik Faye-Lund Reviewed-by: Jesse Natalie Part-of: --- .../compiler/dxil_nir_lower_vs_vertex_conversion.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/microsoft/compiler/dxil_nir_lower_vs_vertex_conversion.c b/src/microsoft/compiler/dxil_nir_lower_vs_vertex_conversion.c index 6c14ae10404..711ad99ab6d 100644 --- a/src/microsoft/compiler/dxil_nir_lower_vs_vertex_conversion.c +++ b/src/microsoft/compiler/dxil_nir_lower_vs_vertex_conversion.c @@ -132,6 +132,12 @@ lower_vs_vertex_conversion_impl(nir_builder *b, nir_instr *instr, void *options) return from_10_10_10_2_scaled(b, src, lshift_rgba(b), nir_ushr); case PIPE_FORMAT_B10G10R10A2_USCALED: return from_10_10_10_2_scaled(b, src, lshift_bgra(b), nir_ushr); + case PIPE_FORMAT_R8G8B8A8_USCALED: + case PIPE_FORMAT_R16G16B16A16_USCALED: + return nir_u2f32(b, &intr->dest.ssa); + case PIPE_FORMAT_R8G8B8A8_SSCALED: + case PIPE_FORMAT_R16G16B16A16_SSCALED: + return nir_i2f32(b, &intr->dest.ssa); default: unreachable("Unsupported emulated vertex format");