aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-07-31 08:23:29 +1000
committerDave Airlie <[email protected]>2019-10-15 04:43:30 +1000
commitc2efc7c6378ea5cc49c801153129c0f0cc2f3b23 (patch)
tree3d1dd9097636fc5298a4bda1615f038974b8ee4e /src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
parentac7af7c50057f4b72ec058fd08b6f40db595e489 (diff)
gallivm/draw/swr: make the gs_iface not depend on tgsi.
This gs_iface doesn't seem to require a dependence on the tgsi context, except for the swr end prim code. This refactors the API to include all the info that the swr code needs in the interface rather than having to dig it out of the struct inheritance. This is a precursor to adding NIR support to llvmpipe. Reviewed-by: Jan Zielinski <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_tgsi.h')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
index 9d6dfaa390c..940a4c49a50 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
@@ -66,8 +66,7 @@ struct tgsi_shader_info;
struct lp_build_mask_context;
struct gallivm_state;
struct lp_derivatives;
-struct lp_build_tgsi_gs_iface;
-struct lp_build_coro_suspend_info;
+struct lp_build_gs_iface;
enum lp_build_tex_modifier {
LP_BLD_TEX_MODIFIER_NONE = 0,
@@ -247,7 +246,7 @@ struct lp_build_tgsi_params {
LLVMValueRef thread_data_ptr;
const struct lp_build_sampler_soa *sampler;
const struct tgsi_shader_info *info;
- const struct lp_build_tgsi_gs_iface *gs_iface;
+ const struct lp_build_gs_iface *gs_iface;
LLVMValueRef ssbo_ptr;
LLVMValueRef ssbo_sizes_ptr;
const struct lp_build_image_soa *image;
@@ -435,25 +434,26 @@ struct lp_build_tgsi_context
void (*emit_epilogue)(struct lp_build_tgsi_context*);
};
-struct lp_build_tgsi_gs_iface
+struct lp_build_gs_iface
{
- LLVMValueRef (*fetch_input)(const struct lp_build_tgsi_gs_iface *gs_iface,
- struct lp_build_tgsi_context * bld_base,
+ LLVMValueRef (*fetch_input)(const struct lp_build_gs_iface *gs_iface,
+ struct lp_build_context * bld,
boolean is_vindex_indirect,
LLVMValueRef vertex_index,
boolean is_aindex_indirect,
LLVMValueRef attrib_index,
LLVMValueRef swizzle_index);
- void (*emit_vertex)(const struct lp_build_tgsi_gs_iface *gs_iface,
- struct lp_build_tgsi_context * bld_base,
+ void (*emit_vertex)(const struct lp_build_gs_iface *gs_iface,
+ struct lp_build_context * bld,
LLVMValueRef (*outputs)[4],
LLVMValueRef emitted_vertices_vec);
- void (*end_primitive)(const struct lp_build_tgsi_gs_iface *gs_iface,
- struct lp_build_tgsi_context * bld_base,
+ void (*end_primitive)(const struct lp_build_gs_iface *gs_iface,
+ struct lp_build_context * bld,
+ LLVMValueRef total_emitted_vertices_vec,
LLVMValueRef verts_per_prim_vec,
- LLVMValueRef emitted_prims_vec);
- void (*gs_epilogue)(const struct lp_build_tgsi_gs_iface *gs_iface,
- struct lp_build_tgsi_context * bld_base,
+ LLVMValueRef emitted_prims_vec,
+ LLVMValueRef mask_vec);
+ void (*gs_epilogue)(const struct lp_build_gs_iface *gs_iface,
LLVMValueRef total_emitted_vertices_vec,
LLVMValueRef emitted_prims_vec);
};
@@ -465,7 +465,7 @@ struct lp_build_tgsi_soa_context
/* Builder for scalar elements of shader's data type (float) */
struct lp_build_context elem_bld;
- const struct lp_build_tgsi_gs_iface *gs_iface;
+ const struct lp_build_gs_iface *gs_iface;
LLVMValueRef emitted_prims_vec_ptr;
LLVMValueRef total_emitted_vertices_vec_ptr;
LLVMValueRef emitted_vertices_vec_ptr;