radeonsi: make screen available to shader part compilation
authorMarek Olšák <marek.olsak@amd.com>
Fri, 24 Jan 2020 21:28:54 +0000 (16:28 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sat, 25 Jan 2020 05:59:24 +0000 (05:59 +0000)
to fix a crash in is_multi_part_shader.

Fixes: 1a0890dcf30 - radeonsi: change prototypes of si_is_multi_part_shader & si_is_merged_shader
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3561>

src/gallium/drivers/radeonsi/si_shader.c

index 105e76260cd052bdd8dfb91d54b7a1d4bcbb60a8..fa35489ea50ab2cae8ed8100cc43ce4b8ca8178e 100644 (file)
@@ -2090,7 +2090,11 @@ si_get_shader_part(struct si_screen *sscreen,
        result = CALLOC_STRUCT(si_shader_part);
        result->key = *key;
 
+       struct si_shader_selector sel = {};
+       sel.screen = sscreen;
+
        struct si_shader shader = {};
+       shader.selector = &sel;
 
        switch (type) {
        case PIPE_SHADER_VERTEX: