projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd4a14b
)
mesa/glspirv: Set last_vert_prog
author
Neil Roberts
<nroberts@igalia.com>
Mon, 18 Dec 2017 18:00:17 +0000
(19:00 +0100)
committer
Alejandro Piñeiro
<apinheiro@igalia.com>
Tue, 31 Jul 2018 11:18:28 +0000
(13:18 +0200)
v2: simplify last_vert check (Timothy)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/main/glspirv.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/glspirv.c
b/src/mesa/main/glspirv.c
index
8ad6c37
..
ed7ff29
100644
(file)
--- 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 *