diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index ea26034dafd..55a17f3bf35 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -2236,6 +2236,10 @@ bifrost_compile_shader_nir(void *mem_ctx, nir_shader *nir, bifrost_debug & BIFROST_DBG_VERBOSE); } + /* Pad the shader with enough zero bytes to trick the prefetcher */ + memset(util_dynarray_grow(&program->compiled, uint8_t, BIFROST_SHADER_PREFETCH), + 0, BIFROST_SHADER_PREFETCH); + program->tls_size = ctx->tls_size; if ((bifrost_debug & BIFROST_DBG_SHADERDB || inputs->shaderdb) &&