Commit Graph

7 Commits

Author SHA1 Message Date
Bill Hollings
9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out.
Support flattening StorageOutput & StorageInput matrices and arrays.
No longer move matrix & array inputs to separate buffer.
Add separate SPIRFunction::fixup_statements_in & SPIRFunction::fixup_statements_out
instead of just  SPIRFunction::fixup_statements.
Emit SPIRFunction::fixup_statements at beginning of functions.
CompilerMSL track vars_needing_early_declaration.
Pass global output variables as variables to functions that access them.
Sort input structs by location, same as output structs.
Emit struct declarations in order output, input, uniforms.
Regenerate reference shaders to new formats defined by above.
2018-06-12 11:41:35 -04:00
Bill Hollings
192bdc9516 CompilerMSL elide unused builtins from entry function input and output structs.
Add Compiler::has_active_builtin() function.
Update test reference shaders that included unused builtins.
2017-05-24 09:31:38 -04:00
Hans-Kristian Arntzen
91379fb0d0 Implement more sophisticated check for point_size. 2017-05-23 10:15:22 +02:00
Bill Hollings
f9f87ca391 CompilerMSL output [[point_size]] attribute for BuiltInPointSize member by default.
CompilerMSL::Options::is_rendering_points defaults to true.
2017-05-05 16:13:55 -04:00
Robert Konrad
7b3d0686ef Adjust metal reference output
Y flipping is now off by default.
2017-01-26 10:32:50 +01:00
Arseny Kapoulkine
f45075b08b Validate Metal shaders on OSX with Metal compiler
If we run on a system with Xcode installed to a default path, run Xcode
Metal shader compiler to validate the generated MSL shader.

This uncovers an issue in the existing MSL test - MSL backend currently
does not auto-assign attribute locations, which means that translating
GLSL shader without location layout produces an invalid MSL which
generates "error: 'attribute' index '0' is used more than once".
2017-01-25 00:12:09 -08:00
Hans-Kristian Arntzen
1c28ec6885 Add basic setup for regression testing Metal output. 2017-01-24 14:04:55 +01:00