asahi: drop =varyings debug

hasn't been relevant.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
This commit is contained in:
Alyssa Rosenzweig
2024-03-04 11:03:10 -04:00
committed by Marge Bot
parent 9c2df9e814
commit a2265ff588
3 changed files with 6 additions and 18 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ enum agx_dbg {
AGX_DBG_SMALLTILE = BITFIELD_BIT(14),
AGX_DBG_NOMSAA = BITFIELD_BIT(15),
AGX_DBG_NOSHADOW = BITFIELD_BIT(16),
AGX_DBG_VARYINGS = BITFIELD_BIT(17),
/* bit 17 unused */
AGX_DBG_SCRATCH = BITFIELD_BIT(18),
AGX_DBG_COMPBLIT = BITFIELD_BIT(19),
AGX_DBG_FEEDBACK = BITFIELD_BIT(20),
-1
View File
@@ -79,7 +79,6 @@ static const struct debug_named_value agx_debug_options[] = {
{"feedback", AGX_DBG_FEEDBACK, "Debug feedback loops"},
{"nomsaa", AGX_DBG_NOMSAA, "Force disable MSAA"},
{"noshadow", AGX_DBG_NOSHADOW, "Force disable resource shadowing"},
{"varyings", AGX_DBG_VARYINGS, "Validate varying linkage"},
{"scratch", AGX_DBG_SCRATCH, "Debug scratch memory usage"},
DEBUG_NAMED_VALUE_END
};
+5 -16
View File
@@ -1523,7 +1523,7 @@ asahi_cs_shader_key_equal(const void *a, const void *b)
static unsigned
agx_find_linked_slot(struct agx_varyings_vs *vs, struct agx_varyings_fs *fs,
gl_varying_slot slot, unsigned offset, bool debug)
gl_varying_slot slot, unsigned offset)
{
assert(offset < 4);
assert(slot != VARYING_SLOT_PNTC && "point coords aren't linked");
@@ -1541,19 +1541,9 @@ agx_find_linked_slot(struct agx_varyings_vs *vs, struct agx_varyings_fs *fs,
unsigned vs_index = vs->slots[slot];
if (!(vs_index < vs->nr_index)) {
/* Varyings not written by vertex shader are undefined, be robust.
*
* If the layer is read but not written, its value will be ignored by the
* agx_nir_predicate_layer_id lowering, so read garbage.
*
* For other varyings, this is probably an app bug.
*/
if (unlikely(debug && (slot != VARYING_SLOT_LAYER)))
unreachable("Fragment shader read varying not written by vertex!");
/* Varyings not written by vertex shader are undefined but we can't crash */
if (!(vs_index < vs->nr_index))
return 0;
}
assert(vs_index >= 4 && "gl_Position should have been the first 4 slots");
assert((vs_index < vs->base_index_fp16) ==
@@ -1623,9 +1613,8 @@ agx_link_varyings_vs_fs(struct agx_pool *pool, struct agx_varyings_vs *vs,
cfg.source = AGX_COEFFICIENT_SOURCE_PRIMITIVE_ID;
*generate_primitive_id = true;
} else {
cfg.base_slot = agx_find_linked_slot(
vs, fs, fs->bindings[i].slot, fs->bindings[i].offset,
pool->dev->debug & AGX_DBG_VARYINGS);
cfg.base_slot = agx_find_linked_slot(vs, fs, fs->bindings[i].slot,
fs->bindings[i].offset);
assert(cfg.base_slot + cfg.components <=
MAX2(nr_slots, cfg.components) &&