diff options
author | Dave Airlie <[email protected]> | 2019-07-19 16:33:03 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2019-08-27 12:29:55 +1000 |
commit | 15f7688ac9d75dcc10a07f103881c062bf9fdb9a (patch) | |
tree | 7acc750c972c9d61d9fa80d4197b036925cb4f76 /src/gallium/auxiliary | |
parent | b2be174be270d653fcdf190e8252e266ff8176c3 (diff) |
gallivm/tgsi: add image interface to tgsi builder
This adds the callbacks for the driver/gallium binding for
image operations.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi.h | 20 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 1 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h index 26e8e405869..ed3465874bc 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h @@ -210,6 +210,23 @@ struct lp_build_sampler_aos enum lp_build_tex_modifier modifier); }; +struct lp_img_params; + +struct lp_build_image_soa +{ + void + (*destroy)( struct lp_build_image_soa *image ); + + void + (*emit_op)(const struct lp_build_image_soa *image, + struct gallivm_state *gallivm, + const struct lp_img_params *params); + + void + (*emit_size_query)( const struct lp_build_image_soa *sampler, + struct gallivm_state *gallivm, + const struct lp_sampler_size_query_params *params); +}; void lp_build_tgsi_info(const struct tgsi_token *tokens, @@ -230,6 +247,7 @@ struct lp_build_tgsi_params { const struct lp_build_tgsi_gs_iface *gs_iface; LLVMValueRef ssbo_ptr; LLVMValueRef ssbo_sizes_ptr; + const struct lp_build_image_soa *image; }; void @@ -238,7 +256,6 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm, const struct lp_build_tgsi_params *params, LLVMValueRef (*outputs)[4]); - void lp_build_tgsi_aos(struct gallivm_state *gallivm, const struct tgsi_token *tokens, @@ -464,6 +481,7 @@ struct lp_build_tgsi_soa_context LLVMValueRef ssbo_sizes[LP_MAX_TGSI_SHADER_BUFFERS]; const struct lp_build_sampler_soa *sampler; + const struct lp_build_image_soa *image; struct tgsi_declaration_sampler_view sv[PIPE_MAX_SHADER_SAMPLER_VIEWS]; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index c51ab658f50..ab78e6bb50c 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -4180,6 +4180,7 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm, bld.indirect_files = params->info->indirect_files; bld.context_ptr = params->context_ptr; bld.thread_data_ptr = params->thread_data_ptr; + bld.image = params->image; /* * If the number of temporaries is rather large then we just |