input_semantic_indices[i] == index)
return i;
}
- debug_assert(0);
return -1;
}
(float)shader->in_prim_idx;
} else {
vs_slot = draw_gs_get_input_index(
- shader->info.input_semantic_name[slot],
- shader->info.input_semantic_index[slot],
- shader->input_info);
+ shader->info.input_semantic_name[slot],
+ shader->info.input_semantic_index[slot],
+ shader->input_info);
+ if (vs_slot < 0) {
+ debug_printf("VS/GS signature mismatch!\n");
+ machine->Inputs[idx].xyzw[0].f[prim_idx] = 0;
+ machine->Inputs[idx].xyzw[1].f[prim_idx] = 0;
+ machine->Inputs[idx].xyzw[2].f[prim_idx] = 0;
+ machine->Inputs[idx].xyzw[3].f[prim_idx] = 0;
+ } else {
#if DEBUG_INPUTS
- debug_printf("\tSlot = %d, vs_slot = %d, idx = %d:\n",
- slot, vs_slot, idx);
- assert(!util_is_inf_or_nan(input[vs_slot][0]));
- assert(!util_is_inf_or_nan(input[vs_slot][1]));
- assert(!util_is_inf_or_nan(input[vs_slot][2]));
- assert(!util_is_inf_or_nan(input[vs_slot][3]));
+ debug_printf("\tSlot = %d, vs_slot = %d, idx = %d:\n",
+ slot, vs_slot, idx);
+ assert(!util_is_inf_or_nan(input[vs_slot][0]));
+ assert(!util_is_inf_or_nan(input[vs_slot][1]));
+ assert(!util_is_inf_or_nan(input[vs_slot][2]));
+ assert(!util_is_inf_or_nan(input[vs_slot][3]));
#endif
- machine->Inputs[idx].xyzw[0].f[prim_idx] = input[vs_slot][0];
- machine->Inputs[idx].xyzw[1].f[prim_idx] = input[vs_slot][1];
- machine->Inputs[idx].xyzw[2].f[prim_idx] = input[vs_slot][2];
- machine->Inputs[idx].xyzw[3].f[prim_idx] = input[vs_slot][3];
+ machine->Inputs[idx].xyzw[0].f[prim_idx] = input[vs_slot][0];
+ machine->Inputs[idx].xyzw[1].f[prim_idx] = input[vs_slot][1];
+ machine->Inputs[idx].xyzw[2].f[prim_idx] = input[vs_slot][2];
+ machine->Inputs[idx].xyzw[3].f[prim_idx] = input[vs_slot][3];
#if DEBUG_INPUTS
- debug_printf("\t\t%f %f %f %f\n",
- machine->Inputs[idx].xyzw[0].f[prim_idx],
- machine->Inputs[idx].xyzw[1].f[prim_idx],
- machine->Inputs[idx].xyzw[2].f[prim_idx],
- machine->Inputs[idx].xyzw[3].f[prim_idx]);
+ debug_printf("\t\t%f %f %f %f\n",
+ machine->Inputs[idx].xyzw[0].f[prim_idx],
+ machine->Inputs[idx].xyzw[1].f[prim_idx],
+ machine->Inputs[idx].xyzw[2].f[prim_idx],
+ machine->Inputs[idx].xyzw[3].f[prim_idx]);
#endif
- ++vs_slot;
+ ++vs_slot;
+ }
}
}
}
/* skip. we handle system values through gallivm */
} else {
vs_slot = draw_gs_get_input_index(
- shader->info.input_semantic_name[slot],
- shader->info.input_semantic_index[slot],
- shader->input_info);
+ shader->info.input_semantic_name[slot],
+ shader->info.input_semantic_index[slot],
+ shader->input_info);
+ if (vs_slot < 0) {
+ debug_printf("VS/GS signature mismatch!\n");
+ (*input_data)[i][slot][0][prim_idx] = 0;
+ (*input_data)[i][slot][1][prim_idx] = 0;
+ (*input_data)[i][slot][2][prim_idx] = 0;
+ (*input_data)[i][slot][3][prim_idx] = 0;
+ } else {
#if DEBUG_INPUTS
- debug_printf("\tSlot = %d, vs_slot = %d, i = %d:\n",
- slot, vs_slot, i);
- assert(!util_is_inf_or_nan(input[vs_slot][0]));
- assert(!util_is_inf_or_nan(input[vs_slot][1]));
- assert(!util_is_inf_or_nan(input[vs_slot][2]));
- assert(!util_is_inf_or_nan(input[vs_slot][3]));
+ debug_printf("\tSlot = %d, vs_slot = %d, i = %d:\n",
+ slot, vs_slot, i);
+ assert(!util_is_inf_or_nan(input[vs_slot][0]));
+ assert(!util_is_inf_or_nan(input[vs_slot][1]));
+ assert(!util_is_inf_or_nan(input[vs_slot][2]));
+ assert(!util_is_inf_or_nan(input[vs_slot][3]));
#endif
- (*input_data)[i][slot][0][prim_idx] = input[vs_slot][0];
- (*input_data)[i][slot][1][prim_idx] = input[vs_slot][1];
- (*input_data)[i][slot][2][prim_idx] = input[vs_slot][2];
- (*input_data)[i][slot][3][prim_idx] = input[vs_slot][3];
+ (*input_data)[i][slot][0][prim_idx] = input[vs_slot][0];
+ (*input_data)[i][slot][1][prim_idx] = input[vs_slot][1];
+ (*input_data)[i][slot][2][prim_idx] = input[vs_slot][2];
+ (*input_data)[i][slot][3][prim_idx] = input[vs_slot][3];
#if DEBUG_INPUTS
- debug_printf("\t\t%f %f %f %f\n",
- (*input_data)[i][slot][0][prim_idx],
- (*input_data)[i][slot][1][prim_idx],
- (*input_data)[i][slot][2][prim_idx],
- (*input_data)[i][slot][3][prim_idx]);
+ debug_printf("\t\t%f %f %f %f\n",
+ (*input_data)[i][slot][0][prim_idx],
+ (*input_data)[i][slot][1][prim_idx],
+ (*input_data)[i][slot][2][prim_idx],
+ (*input_data)[i][slot][3][prim_idx]);
#endif
- ++vs_slot;
+ ++vs_slot;
+ }
}
}
}