radeonsi: add tcs_vgpr_only_inputs parameter to si_get_nir_shader
Will be used later. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16418>
This commit is contained in:
parent
47dd3525fb
commit
87dfff3e6b
|
@ -1492,7 +1492,8 @@ static bool si_nir_kill_outputs(nir_shader *nir, const union si_shader_key *key)
|
|||
|
||||
struct nir_shader *si_get_nir_shader(struct si_shader_selector *sel,
|
||||
const union si_shader_key *key,
|
||||
bool *free_nir)
|
||||
bool *free_nir,
|
||||
uint64_t tcs_vgpr_only_inputs)
|
||||
{
|
||||
nir_shader *nir;
|
||||
*free_nir = false;
|
||||
|
@ -1683,7 +1684,7 @@ bool si_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compi
|
|||
{
|
||||
struct si_shader_selector *sel = shader->selector;
|
||||
bool free_nir;
|
||||
struct nir_shader *nir = si_get_nir_shader(sel, &shader->key, &free_nir);
|
||||
struct nir_shader *nir = si_get_nir_shader(sel, &shader->key, &free_nir, 0);
|
||||
|
||||
/* Assign param export indices. */
|
||||
if ((sel->stage == MESA_SHADER_VERTEX ||
|
||||
|
|
|
@ -176,7 +176,8 @@ void si_get_vs_prolog_key(const struct si_shader_info *info, unsigned num_input_
|
|||
struct si_shader *shader_out, union si_shader_part_key *key);
|
||||
struct nir_shader *si_get_nir_shader(struct si_shader_selector *sel,
|
||||
const union si_shader_key *key,
|
||||
bool *free_nir);
|
||||
bool *free_nir,
|
||||
uint64_t tcs_vgpr_only_inputs);
|
||||
void si_get_tcs_epilog_key(struct si_shader *shader, union si_shader_part_key *key);
|
||||
bool si_need_ps_prolog(const union si_shader_part_key *key);
|
||||
void si_get_ps_prolog_key(struct si_shader *shader, union si_shader_part_key *key,
|
||||
|
|
|
@ -1253,7 +1253,8 @@ bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *
|
|||
shader_ls.key.ge.opt.inline_uniforms = false; /* only TCS can inline uniforms */
|
||||
shader_ls.is_monolithic = true;
|
||||
|
||||
nir = si_get_nir_shader(ls, &shader_ls.key, &free_nir);
|
||||
nir = si_get_nir_shader(ls, &shader_ls.key, &free_nir,
|
||||
sel->info.tcs_vgpr_only_inputs);
|
||||
si_update_shader_binary_info(shader, nir);
|
||||
|
||||
if (!si_llvm_translate_nir(&ctx, &shader_ls, nir, free_nir, false)) {
|
||||
|
@ -1313,7 +1314,7 @@ bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *
|
|||
shader_es.key.ge.opt.kill_outputs = 0;
|
||||
shader_es.is_monolithic = true;
|
||||
|
||||
nir = si_get_nir_shader(es, &shader_es.key, &free_nir);
|
||||
nir = si_get_nir_shader(es, &shader_es.key, &free_nir, 0);
|
||||
si_update_shader_binary_info(shader, nir);
|
||||
|
||||
if (!si_llvm_translate_nir(&ctx, &shader_es, nir, free_nir, false)) {
|
||||
|
|
|
@ -663,7 +663,8 @@ static bool si_check_blend_dst_sampler_noop(struct si_context *sctx)
|
|||
|
||||
bool free_nir;
|
||||
if (unlikely(sel->info.writes_1_if_tex_is_1 == 0xff)) {
|
||||
struct nir_shader *nir = si_get_nir_shader(sel, &sctx->shader.ps.key, &free_nir);
|
||||
struct nir_shader *nir =
|
||||
si_get_nir_shader(sel, &sctx->shader.ps.key, &free_nir, 0);
|
||||
|
||||
/* Determine if this fragment shader always writes vec4(1) if a specific texture
|
||||
* is all 1s.
|
||||
|
|
Loading…
Reference in New Issue