diff options
author | Eduardo Lima Mitev <[email protected]> | 2017-10-10 10:27:01 +0200 |
---|---|---|
committer | Alejandro Piñeiro <[email protected]> | 2018-06-21 14:25:05 +0200 |
commit | a940683733f5f5d22453237840e970dd7ca81a5d (patch) | |
tree | 7cc15e319959a39d4ff641f572461cf7d4bafaad /src/mesa/program/prog_execute.c | |
parent | 697254111bcf541f41d40e8680258d90063e5feb (diff) |
mesa/main: Add a 'spirv' flag to gl_shader_program_data
This will be used by the linker code to differentiate between programs
made out of SPIR-V or GLSL shaders.
This was rejected in the past, assuming that it was equivalent to
check for "shProg->_LinkedShaders[stage]->spirv_data != NULL". But:
* At some points of the linking process it would be needed to check
if _LinkerShaders[stage] is present, so the full check would be:
"shProg->_LinkedShaders[stage] != NULL &&
shProg->_LinkedShaders[stage]->spirv_data != NULL"
* Sometimes you would like to do some specific to SPIR-V
independently of the stage, or for any stage. For example, "link
all the uniforms, for all stages". In that case checking for the
flag would be equivalent to iterate all the _LinkedShaders and
check if there is any spirv_data available.
The former makes readibility really worse. Both could be solved by
adding two helpers. But adding a flag seems really more simple and
readable.
v2: added justification for the flag on the commit message (Alejandro)
Signed-off-by: Eduardo Lima <[email protected]>
Signed-off-by: Alejandro Piñeiro <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/program/prog_execute.c')
0 files changed, 0 insertions, 0 deletions