Skip to content

glsl: refactor spirv compilation

Niklas Haas requested to merge spirv into master

Rather than fixing/determining the pl_glsl_version at compiler creation time, this is now taken dynamically as a compilation parameter. In addition to this, the exact API / target version to compile against will be inferred from the GLSL description, rather than set explicitly. This allows us to take into account some of these limits during shader compilation.

Move stuff into the common glsl/ subdir, mostly to allow the creation of glsl/utils.h which contains shared helpers between C and C++ that can't be placed into spirv.h directly due to C99/C++ incompatibility.

Finally, rename some usage sites for consistency, enabling stage to always refer to the shader stage, shader to refer to the shader itself, and glsl to refer to the pl_glsl_version struct.

Merge request reports

Loading