st/mesa: pass the clip distance array size to drivers
authorMarek Olšák <marek.olsak@amd.com>
Sat, 17 Oct 2015 21:17:52 +0000 (23:17 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 20 Oct 2015 10:58:25 +0000 (12:58 +0200)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_program.c

index 87571a88e78f70c6e61ee6c6d4f41fb33eeb0427..75ccaf2f26bf340d86a59028fef70368d0db28d5 100644 (file)
@@ -395,6 +395,10 @@ st_translate_vertex_program(struct st_context *st,
    if (ureg == NULL)
       return false;
 
+   if (stvp->Base.Base.ClipDistanceArraySize)
+      ureg_property(ureg, TGSI_PROPERTY_NUM_CLIPDIST_ENABLED,
+                    stvp->Base.Base.ClipDistanceArraySize);
+
    if (ST_DEBUG & DEBUG_MESA) {
       _mesa_print_program(&stvp->Base.Base);
       _mesa_print_program_parameters(st->ctx, &stvp->Base.Base);
@@ -1049,6 +1053,10 @@ st_translate_program_common(struct st_context *st,
    memset(outputMapping, 0, sizeof(outputMapping));
    memset(out_state, 0, sizeof(*out_state));
 
+   if (prog->ClipDistanceArraySize)
+      ureg_property(ureg, TGSI_PROPERTY_NUM_CLIPDIST_ENABLED,
+                    prog->ClipDistanceArraySize);
+
    /*
     * Convert Mesa program inputs to TGSI input register semantics.
     */