Mesa (main): d3d12: Allow RGB VS inputs without an alpha channel

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 4 21:01:15 UTC 2022


Module: Mesa
Branch: main
Commit: 126d992097893d7aa7aca0bcd345ab918e830fdd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=126d992097893d7aa7aca0bcd345ab918e830fdd

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Fri Feb  4 08:33:38 2022 -0800

d3d12: Allow RGB VS inputs without an alpha channel

Reviewed-by: Sil Vilerino <sivileri at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14881>

---

 src/gallium/drivers/d3d12/d3d12_nir_lower_vs_vertex_conversion.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/d3d12/d3d12_nir_lower_vs_vertex_conversion.c b/src/gallium/drivers/d3d12/d3d12_nir_lower_vs_vertex_conversion.c
index eec0ee6abda..101912227a8 100644
--- a/src/gallium/drivers/d3d12/d3d12_nir_lower_vs_vertex_conversion.c
+++ b/src/gallium/drivers/d3d12/d3d12_nir_lower_vs_vertex_conversion.c
@@ -111,6 +111,8 @@ lower_vs_vertex_conversion_impl(nir_builder *b, nir_instr *instr, void *options)
              fmt == PIPE_FORMAT_R8G8B8_UINT ||
              fmt == PIPE_FORMAT_R16G16B16_SINT ||
              fmt == PIPE_FORMAT_R16G16B16_UINT);
+      if (intr->dest.ssa.num_components == 3)
+         return NULL;
       return nir_vector_insert_imm(b, &intr->dest.ssa, nir_imm_int(b, 1), 3);
    } else {
       nir_ssa_def *src = nir_channel(b, &intr->dest.ssa, 0);



More information about the mesa-commit mailing list