nir/lower_viewport_transform: Allow geom/tess

This pass needs to run on the last shader in a pipeline writing
gl_Position. In GLES2, that's always the vertex shader, but in ES3.2, it
can be a geometry or tessellation shader. The shared code works the same
in this case, just make the assert more generous.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9444>
This commit is contained in:
Alyssa Rosenzweig 2021-03-06 18:51:29 +00:00 committed by Marge Bot
parent 3436e5295b
commit e30994a471

View file

@ -43,7 +43,9 @@
void
nir_lower_viewport_transform(nir_shader *shader)
{
assert(shader->info.stage == MESA_SHADER_VERTEX);
assert((shader->info.stage == MESA_SHADER_VERTEX)
|| (shader->info.stage == MESA_SHADER_GEOMETRY)
|| (shader->info.stage == MESA_SHADER_TESS_EVAL));
nir_foreach_function(func, shader) {
nir_foreach_block(block, func->impl) {