radeonsi/nir: add support vs double inputs
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 15 Dec 2017 03:22:16 +0000 (14:22 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 29 Jan 2018 22:08:47 +0000 (09:08 +1100)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader_nir.c

index 94d8def8141fd93ad624e86d4742cc583fa043cd..453d31bd135e64e63af57f5d36b367cb5a2fbbd9 100644 (file)
@@ -681,6 +681,11 @@ bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir)
                        if (nir->info.stage == MESA_SHADER_VERTEX) {
                                declare_nir_input_vs(ctx, variable, input_idx / 4, data);
                                bitcast_inputs(ctx, data, input_idx);
+                               if (glsl_type_is_dual_slot(variable->type)) {
+                                       input_idx += 4;
+                                       declare_nir_input_vs(ctx, variable, input_idx / 4, data);
+                                       bitcast_inputs(ctx, data, input_idx);
+                               }
                        } else if (nir->info.stage == MESA_SHADER_FRAGMENT) {
                                declare_nir_input_fs(ctx, variable, input_idx / 4, data);
                                bitcast_inputs(ctx, data, input_idx);