Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions src/asahi/compiler/agx3_graphics_program.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@
#include "asahi/lib/agx_ioto_preshader_core.h"
#include "asahi/lib/agx_ioto_state_core.h"
#include "util/macros.h"
#include "util/u_debug.h"

#include <string.h>

/* Read once: it is consulted for every background and end-of-tile program */
DEBUG_GET_ONCE_BOOL_OPTION(zero_colour_release_diagnostic,
"ASAHI_G17P_ZERO_COLOUR_RELEASE_DIAGNOSTIC", false)

static bool
graphics_state_tail(const struct agx3_g17p_graphics_program_desc *desc,
struct agx_ioto_state_tail_output *tail)
Expand Down Expand Up @@ -442,9 +437,7 @@ graphics_program_write_unpublished(
/* Zero remains the conservative no-colour/default-fragment spelling. It
* has the same loader release mask as one active colour partition. */
const unsigned colour_classes =
!desc->fragment ? 0
: desc->colour_classes ? desc->colour_classes
: debug_get_option_zero_colour_release_diagnostic() ? 0 : 1;
!desc->fragment ? 0 : desc->colour_classes ? desc->colour_classes : 1;
const enum agx_ioto_g17p_program_stage stage =
!desc->fragment ? AGX_IOTO_G17P_PROGRAM_VERTEX_COMPUTE :
desc->writes_sample_mask ? AGX_IOTO_G17P_PROGRAM_COVERAGE_FRAGMENT :
Expand Down
17 changes: 0 additions & 17 deletions src/asahi/compiler/agx3_pack_binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -23337,23 +23337,6 @@ agx3_pack_binary(agx_context *ctx, struct util_dynarray *emission)
!agx3_retire_slots_noop(emission, enc, outstanding))
AGX3_PACK_FAIL();

if (ctx->key->dev.chip == AGX_CHIP_G17P &&
enc == AGX_ISA_ENCODING_AGX3B &&
ctx->stage == MESA_SHADER_FRAGMENT && !ctx->is_preamble &&
!ctx->key->secondary && !ctx->key->fs.ignore_tib_dependencies &&
ctx->nir && !ctx->nir->info.outputs_written && count == 0 &&
debug_get_bool_option("ASAHI_G17P_EMPTY_FS_PIXEL_DIAGNOSTIC", false)) {
uint8_t bytes[AGX3_PIXEL_MAX_LENGTH], len;
if (!agx3_pixel_colour_entry(enc, bytes, &len) ||
!agx3_append(emission, bytes, len))
goto fail;
ctx->agx3_colour_link.entry_emitted = true;
ctx->agx3_colour_link.entry_offset = emission->size - len - initial_size;
if (!agx3_pixel_release(enc, 0, true, 0, bytes, &len) ||
!agx3_append(emission, bytes, len))
goto fail;
}

if (gen1_mesh && mesh_allocated &&
(!mesh_indices_fenced ||
(ctx->nir && ctx->nir->info.mesh.max_vertices_out &&
Expand Down
18 changes: 0 additions & 18 deletions src/asahi/compiler/agx_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -13137,24 +13137,6 @@ agx_compile_function_nir_attempt(nir_shader *nir, nir_function_impl *impl,

/* Record provenance before RA can create stack instructions. */
const bool imports_only_before_ra = agx3_cprog_spill_provenance(ctx);
if (ctx->key->dev.encoding == AGX_ISA_ENCODING_AGX3C &&
ctx->stage == MESA_SHADER_FRAGMENT && ctx->key->fs.nr_samples > 1 &&
debug_get_bool_option("ASAHI_M5_TILE_DATA_COPY_PROBE", false)) {
agx_foreach_instr_global_safe(ctx, I) {
if (I->op != AGX_OPCODE_ST_TILE ||
I->src[0].type != AGX_INDEX_NORMAL || I->src[0].memory)
continue;
agx_builder b = agx_init_builder(ctx, agx_before_instr(I));
const unsigned channels = agx_channels(I->src[0]);
if (channels > 4)
continue;
agx_index parts[4];
agx_emit_split(&b, parts, I->src[0], channels);
for (unsigned c = 0; c < channels; ++c)
parts[c] = agx_mov(&b, parts[c]);
agx_replace_src(I, 0, agx_emit_collect(&b, channels, parts));
}
}
if (disable_remat)
agx_ra_without_remat(ctx);
else
Expand Down
Loading