zink: use slightly stricter check for update_so_info() callsite
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 24 Feb 2021 23:23:43 +0000 (18:23 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 9 Mar 2021 02:52:20 +0000 (02:52 +0000)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271>

src/gallium/drivers/zink/zink_compiler.c

index 2290501..de5ef7f 100644 (file)
@@ -691,7 +691,7 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir,
    }
 
    ret->nir = nir;
-   if (so_info) {
+   if (so_info && nir->info.outputs_written && nir->info.has_transform_feedback_varyings) {
       memcpy(&ret->streamout.so_info, so_info, sizeof(struct pipe_stream_output_info));
       update_so_info(ret, so_info, nir->info.outputs_written, have_psiz);
    }