d3d12: Allow RGB VS inputs without an alpha channel

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14881>
This commit is contained in:
Jesse Natalie 2022-02-04 08:33:38 -08:00 committed by Marge Bot
parent a3a3599a08
commit 126d992097
1 changed files with 2 additions and 0 deletions

View File

@ -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);