};
+/** cast wrapper */
+static INLINE struct fetch_pipeline_middle_end *
+fetch_pipeline_middle_end(struct draw_pt_middle_end *middle)
+{
+ return (struct fetch_pipeline_middle_end *) middle;
+}
+
+
/**
* Prepare/validate middle part of the vertex pipeline.
* NOTE: if you change this function, also look at the LLVM
unsigned opt,
unsigned *max_vertices)
{
- struct fetch_pipeline_middle_end *fpme =
- (struct fetch_pipeline_middle_end *)middle;
+ struct fetch_pipeline_middle_end *fpme = fetch_pipeline_middle_end(middle);
struct draw_context *draw = fpme->draw;
struct draw_vertex_shader *vs = draw->vs.vertex_shader;
struct draw_geometry_shader *gs = draw->gs.geometry_shader;
const struct draw_fetch_info *fetch_info,
const struct draw_prim_info *in_prim_info)
{
- struct fetch_pipeline_middle_end *fpme =
- (struct fetch_pipeline_middle_end *) middle;
+ struct fetch_pipeline_middle_end *fpme = fetch_pipeline_middle_end(middle);
struct draw_context *draw = fpme->draw;
struct draw_vertex_shader *vshader = draw->vs.vertex_shader;
struct draw_geometry_shader *gshader = draw->gs.geometry_shader;
unsigned draw_count,
unsigned prim_flags)
{
- struct fetch_pipeline_middle_end *fpme =
- (struct fetch_pipeline_middle_end *) middle;
+ struct fetch_pipeline_middle_end *fpme = fetch_pipeline_middle_end(middle);
struct draw_fetch_info fetch_info;
struct draw_prim_info prim_info;
unsigned count,
unsigned prim_flags)
{
- struct fetch_pipeline_middle_end *fpme =
- (struct fetch_pipeline_middle_end *) middle;
+ struct fetch_pipeline_middle_end *fpme = fetch_pipeline_middle_end(middle);
struct draw_fetch_info fetch_info;
struct draw_prim_info prim_info;
unsigned draw_count,
unsigned prim_flags )
{
- struct fetch_pipeline_middle_end *fpme =
- (struct fetch_pipeline_middle_end *) middle;
+ struct fetch_pipeline_middle_end *fpme = fetch_pipeline_middle_end(middle);
struct draw_fetch_info fetch_info;
struct draw_prim_info prim_info;
static void
fetch_pipeline_destroy( struct draw_pt_middle_end *middle )
{
- struct fetch_pipeline_middle_end *fpme =
- (struct fetch_pipeline_middle_end *) middle;
+ struct fetch_pipeline_middle_end *fpme = fetch_pipeline_middle_end(middle);
if (fpme->fetch)
draw_pt_fetch_destroy( fpme->fetch );
};
+/** cast wrapper */
+static INLINE struct llvm_middle_end *
+llvm_middle_end(struct draw_pt_middle_end *middle)
+{
+ return (struct llvm_middle_end *) middle;
+}
+
+
static void
llvm_middle_end_prepare_gs(struct llvm_middle_end *fpme)
{
unsigned opt,
unsigned *max_vertices )
{
- struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle;
+ struct llvm_middle_end *fpme = llvm_middle_end(middle);
struct draw_context *draw = fpme->draw;
struct draw_vertex_shader *vs = draw->vs.vertex_shader;
struct draw_geometry_shader *gs = draw->gs.geometry_shader;
static void
llvm_middle_end_bind_parameters(struct draw_pt_middle_end *middle)
{
- struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle;
+ struct llvm_middle_end *fpme = llvm_middle_end(middle);
struct draw_context *draw = fpme->draw;
unsigned i;
const struct draw_fetch_info *fetch_info,
const struct draw_prim_info *in_prim_info)
{
- struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle;
+ struct llvm_middle_end *fpme = llvm_middle_end(middle);
struct draw_context *draw = fpme->draw;
struct draw_geometry_shader *gshader = draw->gs.geometry_shader;
struct draw_prim_info gs_prim_info;
unsigned draw_count,
unsigned prim_flags)
{
- struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle;
+ struct llvm_middle_end *fpme = llvm_middle_end(middle);
struct draw_fetch_info fetch_info;
struct draw_prim_info prim_info;
unsigned count,
unsigned prim_flags)
{
- struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle;
+ struct llvm_middle_end *fpme = llvm_middle_end(middle);
struct draw_fetch_info fetch_info;
struct draw_prim_info prim_info;
unsigned draw_count,
unsigned prim_flags)
{
- struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle;
+ struct llvm_middle_end *fpme = llvm_middle_end(middle);
struct draw_fetch_info fetch_info;
struct draw_prim_info prim_info;
static void
llvm_middle_end_destroy(struct draw_pt_middle_end *middle)
{
- struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle;
+ struct llvm_middle_end *fpme = llvm_middle_end(middle);
if (fpme->fetch)
draw_pt_fetch_destroy( fpme->fetch );