Module: Mesa Branch: main Commit: b398036c73b103cb7721a653ef1e40f8a0a51fbe URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b398036c73b103cb7721a653ef1e40f8a0a51fbe
Author: Mike Blumenkrantz <[email protected]> Date: Mon Jul 17 09:11:01 2023 -0400 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24182> --- src/compiler/glsl/gl_nir_linker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;
