From 5c49c20fe55828349007927ab829652419370e11 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 17 Jul 2023 09:11:01 -0400 Subject: [PATCH] glsl: only explicitly check GS components in PSIZ injection with output variables if no output variables exist then there's plenty of room for a psiz cc: mesa-stable Reviewed-by: Dave Airlie Part-of: (cherry picked from commit b398036c73b103cb7721a653ef1e40f8a0a51fbe) --- .pick_status.json | 2 +- src/compiler/glsl/gl_nir_linker.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 85a4f15f8c6..a7e8bb8b106 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -21314,7 +21314,7 @@ "description": "glsl: only explicitly check GS components in PSIZ injection with output variables", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c index d9787d79e89..c870d1b1edd 100644 --- a/src/compiler/glsl/gl_nir_linker.c +++ b/src/compiler/glsl/gl_nir_linker.c @@ -151,7 +151,7 @@ gl_nir_can_add_pointsize_to_program(const struct gl_constants *consts, } /* Ensure that there is enough attribute space to emit at least one primitive */ - if (nir->info.stage == MESA_SHADER_GEOMETRY) { + if (num_components && nir->info.stage == MESA_SHADER_GEOMETRY) { if (num_components + needed_components > consts->Program[nir->info.stage].MaxOutputComponents) return false; num_components *= nir->info.gs.vertices_out;