util: fix uninitialized table
[mesa.git] / src / gallium / drivers / nvfx / nvfx_fragprog.c
index dbd7c77346512d4ae00afa0d1308c1a1ce3f59ab..0babcbb9978bede6021b6bfb9bcc850f1ea62039 100644 (file)
@@ -977,7 +977,8 @@ nvfx_fragprog_prepare(struct nvfx_context* nvfx, struct nvfx_fpc *fpc)
        if(fpc->fp->num_slots > num_texcoords)
                return FALSE;
        util_semantic_layout_from_set(fpc->fp->slot_to_generic, &set, 0, num_texcoords);
-       util_semantic_table_from_layout(fpc->generic_to_slot, fpc->fp->slot_to_generic, 0, num_texcoords);
+       util_semantic_table_from_layout(fpc->generic_to_slot, sizeof fpc->generic_to_slot,
+                                        fpc->fp->slot_to_generic, 0, num_texcoords);
 
        memset(fpc->fp->slot_to_fp_input, 0xff, sizeof(fpc->fp->slot_to_fp_input));