diff options
author | Neil Roberts <[email protected]> | 2017-12-18 19:00:17 +0100 |
---|---|---|
committer | Alejandro PiƱeiro <[email protected]> | 2018-07-31 13:18:28 +0200 |
commit | d480623bef7cfc632af166a304eb104928c73520 (patch) | |
tree | c93760e61a8f3cb0203aea28ac2964b1a9a4df53 | |
parent | cd4a14be063957964ae54e0e828174b9e40961e0 (diff) |
mesa/glspirv: Set last_vert_prog
v2: simplify last_vert check (Timothy)
Reviewed-by: Timothy Arceri <[email protected]>
-rw-r--r-- | src/mesa/main/glspirv.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/glspirv.c b/src/mesa/main/glspirv.c index 8ad6c373914..ed7ff29328c 100644 --- a/src/mesa/main/glspirv.c +++ b/src/mesa/main/glspirv.c @@ -173,6 +173,13 @@ _mesa_spirv_link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) prog->_LinkedShaders[shader_type] = linked; prog->data->linked_stages |= 1 << shader_type; } + + int last_vert_stage = + util_last_bit(prog->data->linked_stages & + ((1 << (MESA_SHADER_GEOMETRY + 1)) - 1)); + + if (last_vert_stage) + prog->last_vert_prog = prog->_LinkedShaders[last_vert_stage - 1]->Program; } nir_shader * |