mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
ac/llvm: remove output variable declaration for radv ps
radv ps does not support epilog when llvm, so outputs will always be lowered to exports in nir. Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>
This commit is contained in:
parent
290c3d360e
commit
33d683bf09
1 changed files with 0 additions and 28 deletions
|
|
@ -4971,23 +4971,6 @@ static bool visit_cf_list(struct ac_nir_context *ctx, struct exec_list *list)
|
|||
return true;
|
||||
}
|
||||
|
||||
static void ac_handle_shader_output_decl(struct ac_llvm_context *ctx, struct ac_shader_abi *abi,
|
||||
struct nir_shader *nir, struct nir_variable *variable,
|
||||
gl_shader_stage stage)
|
||||
{
|
||||
unsigned output_loc = variable->data.driver_location;
|
||||
unsigned attrib_count = glsl_count_attribute_slots(variable->type, false);
|
||||
bool is_16bit = glsl_type_is_16bit(glsl_without_array(variable->type));
|
||||
LLVMTypeRef type = is_16bit ? ctx->f16 : ctx->f32;
|
||||
for (unsigned i = 0; i < attrib_count; ++i) {
|
||||
for (unsigned chan = 0; chan < 4; chan++) {
|
||||
int idx = ac_llvm_reg_index_soa(output_loc + i, chan);
|
||||
abi->outputs[idx] = ac_build_alloca_undef(ctx, type, "");
|
||||
abi->is_16bit[idx] = is_16bit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void setup_scratch(struct ac_nir_context *ctx, struct nir_shader *shader)
|
||||
{
|
||||
if (shader->scratch_size == 0)
|
||||
|
|
@ -5078,17 +5061,6 @@ bool ac_nir_translate(struct ac_llvm_context *ac, struct ac_shader_abi *abi,
|
|||
|
||||
ctx.main_function = LLVMGetBasicBlockParent(LLVMGetInsertBlock(ctx.ac.builder));
|
||||
|
||||
/* TODO: remove this after RADV switches to lowered IO.
|
||||
*
|
||||
* Only fragment shader still uses store output for RADV.
|
||||
*/
|
||||
if (!nir->info.io_lowered && ctx.stage == MESA_SHADER_FRAGMENT) {
|
||||
nir_foreach_shader_out_variable(variable, nir)
|
||||
{
|
||||
ac_handle_shader_output_decl(&ctx.ac, ctx.abi, nir, variable, ctx.stage);
|
||||
}
|
||||
}
|
||||
|
||||
ctx.defs = _mesa_hash_table_create(NULL, _mesa_hash_pointer, _mesa_key_pointer_equal);
|
||||
ctx.phis = _mesa_hash_table_create(NULL, _mesa_hash_pointer, _mesa_key_pointer_equal);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue