nir: allow nir_lower_point_size_mov to run in geometry shader
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 8 Jul 2020 15:59:16 +0000 (11:59 -0400)
committerMarge Bot <eric+marge@anholt.net>
Sat, 11 Jul 2020 07:32:24 +0000 (07:32 +0000)
geometry shaders may need to emit PSIZ as well

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5851>

src/compiler/nir/nir_lower_point_size_mov.c

index 0b9226b60fae302e0ed7f0b7d2022b9e1063c948..4a7f8085e6f7ae2bfbc391522ace03b1faad0167 100644 (file)
@@ -68,7 +68,8 @@ void
 nir_lower_point_size_mov(nir_shader *shader,
                          const gl_state_index16 *pointsize_state_tokens)
 {
-   assert(shader->info.stage == MESA_SHADER_VERTEX);
+   assert(shader->info.stage == MESA_SHADER_VERTEX ||
+          shader->info.stage == MESA_SHADER_GEOMETRY);
 
    nir_variable *out = NULL;
    nir_foreach_variable(var, &shader->outputs) {