This can happen with shader object.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24346>
radv_link_tcs(const struct radv_device *device, struct radv_shader_stage *tcs_stage,
struct radv_shader_stage *tes_stage, const struct radv_pipeline_key *pipeline_key)
{
+ if (!tes_stage)
+ return;
+
assert(tcs_stage->nir->info.stage == MESA_SHADER_TESS_CTRL);
assert(tes_stage->nir->info.stage == MESA_SHADER_TESS_EVAL);
}
/* Copy shader info between TCS<->TES. */
- if (producer->stage == MESA_SHADER_TESS_CTRL) {
+ if (producer->stage == MESA_SHADER_TESS_CTRL && consumer && consumer->stage == MESA_SHADER_TESS_EVAL) {
struct radv_shader_stage *tcs_stage = producer;
struct radv_shader_stage *tes_stage = consumer;