agx: Assert that barriers are not used in the preamble
It is nonsensical and confuses the hardware. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
This commit is contained in:

committed by
Marge Bot

parent
9bf7d14b2c
commit
d9bf52e00f
@@ -891,6 +891,8 @@ agx_emit_intrinsic(agx_builder *b, nir_intrinsic_instr *instr)
|
|||||||
b, dst, instr, AGX_SR_THREAD_POSITION_IN_THREADGROUP_X);
|
b, dst, instr, AGX_SR_THREAD_POSITION_IN_THREADGROUP_X);
|
||||||
|
|
||||||
case nir_intrinsic_scoped_barrier: {
|
case nir_intrinsic_scoped_barrier: {
|
||||||
|
assert(!b->shader->is_preamble && "invalid");
|
||||||
|
|
||||||
bool needs_threadgroup_barrier = false;
|
bool needs_threadgroup_barrier = false;
|
||||||
|
|
||||||
if (nir_intrinsic_execution_scope(instr) != SCOPE_NONE) {
|
if (nir_intrinsic_execution_scope(instr) != SCOPE_NONE) {
|
||||||
@@ -2164,6 +2166,7 @@ agx_compile_function_nir(nir_shader *nir, nir_function_impl *impl,
|
|||||||
|
|
||||||
agx_context *ctx = rzalloc(NULL, agx_context);
|
agx_context *ctx = rzalloc(NULL, agx_context);
|
||||||
ctx->nir = nir;
|
ctx->nir = nir;
|
||||||
|
ctx->is_preamble = impl->function->is_preamble;
|
||||||
ctx->out = out;
|
ctx->out = out;
|
||||||
ctx->key = key;
|
ctx->key = key;
|
||||||
ctx->stage = nir->info.stage;
|
ctx->stage = nir->info.stage;
|
||||||
|
@@ -378,6 +378,8 @@ typedef struct agx_block {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
nir_shader *nir;
|
nir_shader *nir;
|
||||||
gl_shader_stage stage;
|
gl_shader_stage stage;
|
||||||
|
bool is_preamble;
|
||||||
|
|
||||||
struct list_head blocks; /* list of agx_block */
|
struct list_head blocks; /* list of agx_block */
|
||||||
struct agx_shader_info *out;
|
struct agx_shader_info *out;
|
||||||
struct agx_shader_key *key;
|
struct agx_shader_key *key;
|
||||||
|
Reference in New Issue
Block a user