gallivm: add ssbo pointers to the soa build api.
Need to pass ssbo + ssbo size pointers just like constants. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
parent
2a55acbc1d
commit
5ff697aa65
|
@ -630,7 +630,7 @@ generate_vs(struct draw_llvm_variant *variant,
|
||||||
NULL,
|
NULL,
|
||||||
draw_sampler,
|
draw_sampler,
|
||||||
&llvm->draw->vs.vertex_shader->info,
|
&llvm->draw->vs.vertex_shader->info,
|
||||||
NULL);
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
{
|
{
|
||||||
LLVMValueRef out;
|
LLVMValueRef out;
|
||||||
|
@ -2363,7 +2363,7 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
|
||||||
NULL,
|
NULL,
|
||||||
sampler,
|
sampler,
|
||||||
&llvm->draw->gs.geometry_shader->info,
|
&llvm->draw->gs.geometry_shader->info,
|
||||||
(const struct lp_build_tgsi_gs_iface *)&gs_iface);
|
(const struct lp_build_tgsi_gs_iface *)&gs_iface, NULL, NULL);
|
||||||
|
|
||||||
sampler->destroy(sampler);
|
sampler->destroy(sampler);
|
||||||
|
|
||||||
|
|
|
@ -230,7 +230,9 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
|
||||||
LLVMValueRef thread_data_ptr,
|
LLVMValueRef thread_data_ptr,
|
||||||
const struct lp_build_sampler_soa *sampler,
|
const struct lp_build_sampler_soa *sampler,
|
||||||
const struct tgsi_shader_info *info,
|
const struct tgsi_shader_info *info,
|
||||||
const struct lp_build_tgsi_gs_iface *gs_iface);
|
const struct lp_build_tgsi_gs_iface *gs_iface,
|
||||||
|
LLVMValueRef ssbo_ptr,
|
||||||
|
LLVMValueRef ssbo_sizes_ptr);
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -452,6 +454,9 @@ struct lp_build_tgsi_soa_context
|
||||||
LLVMValueRef context_ptr;
|
LLVMValueRef context_ptr;
|
||||||
LLVMValueRef thread_data_ptr;
|
LLVMValueRef thread_data_ptr;
|
||||||
|
|
||||||
|
LLVMValueRef ssbo_ptr;
|
||||||
|
LLVMValueRef ssbo_sizes_ptr;
|
||||||
|
|
||||||
const struct lp_build_sampler_soa *sampler;
|
const struct lp_build_sampler_soa *sampler;
|
||||||
|
|
||||||
struct tgsi_declaration_sampler_view sv[PIPE_MAX_SHADER_SAMPLER_VIEWS];
|
struct tgsi_declaration_sampler_view sv[PIPE_MAX_SHADER_SAMPLER_VIEWS];
|
||||||
|
|
|
@ -3838,7 +3838,9 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
|
||||||
LLVMValueRef thread_data_ptr,
|
LLVMValueRef thread_data_ptr,
|
||||||
const struct lp_build_sampler_soa *sampler,
|
const struct lp_build_sampler_soa *sampler,
|
||||||
const struct tgsi_shader_info *info,
|
const struct tgsi_shader_info *info,
|
||||||
const struct lp_build_tgsi_gs_iface *gs_iface)
|
const struct lp_build_tgsi_gs_iface *gs_iface,
|
||||||
|
LLVMValueRef ssbo_ptr,
|
||||||
|
LLVMValueRef ssbo_sizes_ptr)
|
||||||
{
|
{
|
||||||
struct lp_build_tgsi_soa_context bld;
|
struct lp_build_tgsi_soa_context bld;
|
||||||
|
|
||||||
|
@ -3879,6 +3881,8 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
|
||||||
bld.outputs = outputs;
|
bld.outputs = outputs;
|
||||||
bld.consts_ptr = consts_ptr;
|
bld.consts_ptr = consts_ptr;
|
||||||
bld.const_sizes_ptr = const_sizes_ptr;
|
bld.const_sizes_ptr = const_sizes_ptr;
|
||||||
|
bld.ssbo_ptr = ssbo_ptr;
|
||||||
|
bld.ssbo_sizes_ptr = ssbo_sizes_ptr;
|
||||||
bld.sampler = sampler;
|
bld.sampler = sampler;
|
||||||
bld.bld_base.info = info;
|
bld.bld_base.info = info;
|
||||||
bld.indirect_files = info->indirect_files;
|
bld.indirect_files = info->indirect_files;
|
||||||
|
|
|
@ -479,7 +479,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
|
||||||
consts_ptr, num_consts_ptr, &system_values,
|
consts_ptr, num_consts_ptr, &system_values,
|
||||||
interp->inputs,
|
interp->inputs,
|
||||||
outputs, context_ptr, thread_data_ptr,
|
outputs, context_ptr, thread_data_ptr,
|
||||||
sampler, &shader->info.base, NULL);
|
sampler, &shader->info.base, NULL, NULL, NULL);
|
||||||
|
|
||||||
/* Alpha test */
|
/* Alpha test */
|
||||||
if (key->alpha.enabled) {
|
if (key->alpha.enabled) {
|
||||||
|
|
|
@ -693,7 +693,8 @@ BuilderSWR::CompileGS(struct swr_context *ctx, swr_jit_gs_key &key)
|
||||||
NULL, // thread data
|
NULL, // thread data
|
||||||
sampler,
|
sampler,
|
||||||
&gs->info.base,
|
&gs->info.base,
|
||||||
&gs_iface.base);
|
&gs_iface.base,
|
||||||
|
NULL, NULL); // ssbos
|
||||||
|
|
||||||
lp_build_mask_end(&mask);
|
lp_build_mask_end(&mask);
|
||||||
|
|
||||||
|
@ -844,7 +845,8 @@ BuilderSWR::CompileVS(struct swr_context *ctx, swr_jit_vs_key &key)
|
||||||
NULL, // thread data
|
NULL, // thread data
|
||||||
sampler, // sampler
|
sampler, // sampler
|
||||||
&swr_vs->info.base,
|
&swr_vs->info.base,
|
||||||
NULL); // geometry shader face
|
NULL, // geometry shader face
|
||||||
|
NULL, NULL); // ssbos
|
||||||
|
|
||||||
sampler->destroy(sampler);
|
sampler->destroy(sampler);
|
||||||
|
|
||||||
|
@ -1334,7 +1336,8 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)
|
||||||
NULL, // thread data
|
NULL, // thread data
|
||||||
sampler, // sampler
|
sampler, // sampler
|
||||||
&swr_fs->info.base,
|
&swr_fs->info.base,
|
||||||
NULL); // geometry shader face
|
NULL, // geometry shader face
|
||||||
|
NULL, NULL); //ssbos
|
||||||
|
|
||||||
sampler->destroy(sampler);
|
sampler->destroy(sampler);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue