Shaders are no longer allocated contiguously in memory and the next
pointer is now the shader.
This fixes using the trap handler on GFX8.
This reverts commit
2dcd12f38be629086148dfc9ff0da90aa1fc9698.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25852>
uint64_t start = radv_buffer_get_va(block->arena->bo) + block->offset;
if (!block->freelist.prev && pc >= start && pc < start + block->size) {
mtx_unlock(&device->shader_arena_mutex);
-
- struct radv_pipeline *pipeline = (struct radv_pipeline *)block->freelist.next;
- for (uint32_t i = 0; i < MESA_VULKAN_SHADER_STAGES; i++) {
- struct radv_shader *shader = pipeline->shaders[i];
- if (!shader)
- continue;
-
- if (pc >= shader->va && pc < shader->va + align(shader->code_size, RADV_SHADER_ALLOC_ALIGNMENT))
- return shader;
- }
+ return (struct radv_shader *)block->freelist.next;
}
}
}