From 3060b471b52635fda01509eb9162bdb8724ec728 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 24 Jan 2025 13:05:57 -0500 Subject: [PATCH] libagx: add missing null pointer check fixes KHR-GL46.pipeline_statistics_query_tests_ARB.functional_tess_queries with hard fault Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/libagx/tessellation.cl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/asahi/libagx/tessellation.cl b/src/asahi/libagx/tessellation.cl index 47275325edf..86e67a25ab2 100644 --- a/src/asahi/libagx/tessellation.cl +++ b/src/asahi/libagx/tessellation.cl @@ -192,7 +192,9 @@ libagx_tess_setup_indirect( *vertex_output_buffer_ptr = (uintptr_t)(blob + vb_offs); p->counts = (global uint32_t *)(blob + count_offs); - ia->verts_per_instance = count; + if (ia) { + ia->verts_per_instance = count; + } /* If indexing is enabled, the third word is the offset into the index buffer * in elements. Apply that offset now that we have it. For a hardware