This should make the code more robust if a shader tries to use inputs which
aren't defined by the vertex element layout (which usually shouldn't happen).
No piglit change.
Reviewed-by: Brian Paul <brianp@vmware.com>
lp_build_printf(gallivm, " --- io %d = %p, loop counter %d\n",
io_itr, io, lp_loop.counter);
#endif
+
+ for (j = draw->pt.nr_vertex_elements; j < PIPE_MAX_SHADER_INPUTS; j++) {
+ for (i = 0; i < TGSI_NUM_CHANNELS; i++) {
+ inputs[j][i] = lp_build_zero(gallivm, vs_type);
+ }
+ }
+
for (i = 0; i < vector_length; ++i) {
LLVMValueRef vert_index =
LLVMBuildAdd(builder,