#define CALLOC_STRUCT(T) (struct T *) calloc(1, sizeof(struct T))
+#define FREE( PTR ) free( PTR )
+
#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) )
#define MIN2( A, B ) ( (A)<(B) ? (A) : (B) )
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
}
-static void alpha_test_destroy(struct quad_stage *qs)\r
-{\r
- free( qs );\r
+static void alpha_test_destroy(struct quad_stage *qs)
+{
+ FREE( qs );
}
}
-static void blend_destroy(struct quad_stage *qs)\r
-{\r
- free( qs );\r
+static void blend_destroy(struct quad_stage *qs)
+{
+ FREE( qs );
}
}
-static void cbuf_loop_destroy(struct quad_stage *qs)\r
-{\r
- free( qs );\r
+static void cbuf_loop_destroy(struct quad_stage *qs)
+{
+ FREE( qs );
}
}
-static void colormask_destroy(struct quad_stage *qs)\r
-{\r
- free( qs );\r
+static void colormask_destroy(struct quad_stage *qs)
+{
+ FREE( qs );
}
}
-static void coverage_destroy(struct quad_stage *qs)\r
-{\r
- free( qs );\r
+static void coverage_destroy(struct quad_stage *qs)
+{
+ FREE( qs );
}
}
-static void depth_test_destroy(struct quad_stage *qs)\r
-{\r
- free( qs );\r
+static void depth_test_destroy(struct quad_stage *qs)
+{
+ FREE( qs );
}
static void shade_destroy(struct quad_stage *qs)
{
- free( qs );
+ struct quad_shade_stage *qss = (struct quad_shade_stage *) qs;
+
+ FREE( qss->inputs );
+ FREE( qss->outputs );
+ FREE( qs );
}
}
-static void occlusion_destroy(struct quad_stage *qs)\r
-{\r
- free( qs );\r
+static void occlusion_destroy(struct quad_stage *qs)
+{
+ FREE( qs );
}
}
-static void output_destroy(struct quad_stage *qs)\r
-{\r
- free( qs );\r
+static void output_destroy(struct quad_stage *qs)
+{
+ FREE( qs );
}
}
-static void stencil_destroy(struct quad_stage *qs)\r
-{\r
- free( qs );\r
+static void stencil_destroy(struct quad_stage *qs)
+{
+ FREE( qs );
}
}
-static void stipple_destroy(struct quad_stage *qs)\r
-{\r
- free( qs );\r
+static void stipple_destroy(struct quad_stage *qs)
+{
+ FREE( qs );
}