Add ViewportOrientation test

This commit is contained in:
Corentin Wallez
2018-02-09 14:32:44 -05:00
committed by Corentin Wallez
parent a88ec74e60
commit 54ab71b5ce
3 changed files with 68 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ namespace backend { namespace metal {
const PipelineLayout* layout) const {
spirv_cross::CompilerMSL compiler(mSpirv);
spirv_cross::CompilerGLSL::Options options_glsl;
options_glsl.vertex.flip_vert_y = true;
compiler.spirv_cross::CompilerGLSL::set_options(options_glsl);
// By default SPIRV-Cross will give MSL resources indices in increasing order.
// To make the MSL indices match the indices chosen in the PipelineLayout, we build
// a table of MSLResourceBinding to give to SPIRV-Cross