aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-07-22 12:04:27 +1000
committerDave Airlie <[email protected]>2019-07-24 09:20:09 +1000
commit2631fd3b0bf5027ff904bf0e11ca271bda14a4b1 (patch)
treea8ec3c9876737bc2f557739ca7fa784ea34ec1e9 /src/gallium/drivers/swr
parent9700e45463fa6b4b5c0535b7bafa0c438eeaee84 (diff)
gallivm: rework lp_build_tgsi_soa to take a struct
The parameters were getting messy and I have to add a few more for compute shaders, so clean it up before proceeding. Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r--src/gallium/drivers/swr/swr_shader.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp
index f3492bd429c..3fc2ef4ced8 100644
--- a/src/gallium/drivers/swr/swr_shader.cpp
+++ b/src/gallium/drivers/swr/swr_shader.cpp
@@ -681,21 +681,22 @@ BuilderSWR::CompileGS(struct swr_context *ctx, swr_jit_gs_key &key)
gs_iface.info = info;
gs_iface.pVtxAttribMap = vtxAttribMap;
+ struct lp_build_tgsi_params params = {};
+ params.type = lp_type_float_vec(32, 32 * 8);
+ params.mask = & mask;
+ params.consts_ptr = wrap(consts_ptr);
+ params.const_sizes_ptr = wrap(const_sizes_ptr);
+ params.system_values = &system_values;
+ params.inputs = inputs;
+ params.context_ptr = wrap(hPrivateData);
+ params.sampler = sampler;
+ params.info = &gs->info.base;
+ params.gs_iface = &gs_iface.base;
+
lp_build_tgsi_soa(gallivm,
gs->pipe.tokens,
- lp_type_float_vec(32, 32 * 8),
- &mask,
- wrap(consts_ptr),
- wrap(const_sizes_ptr),
- &system_values,
- inputs,
- outputs,
- wrap(hPrivateData), // (sampler context)
- NULL, // thread data
- sampler,
- &gs->info.base,
- &gs_iface.base,
- NULL, NULL); // ssbos
+ &params,
+ outputs);
lp_build_mask_end(&mask);
@@ -833,21 +834,20 @@ BuilderSWR::CompileVS(struct swr_context *ctx, swr_jit_vs_key &key)
uint32_t vectorWidth = mVWidth;
#endif
+ struct lp_build_tgsi_params params = {};
+ params.type = lp_type_float_vec(32, 32 * vectorWidth);
+ params.consts_ptr = wrap(consts_ptr);
+ params.const_sizes_ptr = wrap(const_sizes_ptr);
+ params.system_values = &system_values;
+ params.inputs = inputs;
+ params.context_ptr = wrap(hPrivateData);
+ params.sampler = sampler;
+ params.info = &swr_vs->info.base;
+
lp_build_tgsi_soa(gallivm,
swr_vs->pipe.tokens,
- lp_type_float_vec(32, 32 * vectorWidth),
- NULL, // mask
- wrap(consts_ptr),
- wrap(const_sizes_ptr),
- &system_values,
- inputs,
- outputs,
- wrap(hPrivateData), // (sampler context)
- NULL, // thread data
- sampler, // sampler
- &swr_vs->info.base,
- NULL, // geometry shader face
- NULL, NULL); // ssbos
+ &params,
+ outputs);
sampler->destroy(sampler);
@@ -1324,21 +1324,21 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)
uses_mask = true;
}
+ struct lp_build_tgsi_params params = {};
+ params.type = lp_type_float_vec(32, 32 * 8);
+ params.mask = uses_mask ? &mask : NULL;
+ params.consts_ptr = wrap(consts_ptr);
+ params.const_sizes_ptr = wrap(const_sizes_ptr);
+ params.system_values = &system_values;
+ params.inputs = inputs;
+ params.context_ptr = wrap(hPrivateData);
+ params.sampler = sampler;
+ params.info = &swr_fs->info.base;
+
lp_build_tgsi_soa(gallivm,
swr_fs->pipe.tokens,
- lp_type_float_vec(32, 32 * 8),
- uses_mask ? &mask : NULL, // mask
- wrap(consts_ptr),
- wrap(const_sizes_ptr),
- &system_values,
- inputs,
- outputs,
- wrap(hPrivateData),
- NULL, // thread data
- sampler, // sampler
- &swr_fs->info.base,
- NULL, // geometry shader face
- NULL, NULL); //ssbos
+ &params,
+ outputs);
sampler->destroy(sampler);