radv: prevent crashes when a task shader is compiled unlinked with ESO
That means the mesh shader stage would be NULL. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27237>
This commit is contained in:

committed by
Marge Bot

parent
f23efd7093
commit
13add95beb
@@ -1544,10 +1544,13 @@ radv_link_task(const struct radv_device *device, struct radv_shader_stage *task_
|
|||||||
struct radv_shader_stage *mesh_stage, const struct radv_graphics_state_key *gfx_state)
|
struct radv_shader_stage *mesh_stage, const struct radv_graphics_state_key *gfx_state)
|
||||||
{
|
{
|
||||||
assert(task_stage->nir->info.stage == MESA_SHADER_TASK);
|
assert(task_stage->nir->info.stage == MESA_SHADER_TASK);
|
||||||
assert(mesh_stage->nir->info.stage == MESA_SHADER_MESH);
|
|
||||||
|
|
||||||
/* Linking task and mesh shaders shouldn't do anything for now but keep it for consistency. */
|
if (mesh_stage) {
|
||||||
radv_link_shaders(device, task_stage, mesh_stage, gfx_state);
|
assert(mesh_stage->nir->info.stage == MESA_SHADER_MESH);
|
||||||
|
|
||||||
|
/* Linking task and mesh shaders shouldn't do anything for now but keep it for consistency. */
|
||||||
|
radv_link_shaders(device, task_stage, mesh_stage, gfx_state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user