Commit Graph

8 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
b114889102 Only declare typed initializer list for non-array types.
Also, cleanup now redundant constant_expression virtualization for MSL.
2018-09-10 10:04:17 +02:00
Hans-Kristian Arntzen
5582523d9a Add some tests for LUT promotion.
Also, update other tests.
2018-07-05 14:14:18 +02:00
Hans-Kristian Arntzen
d29f48ef06 Deduce constant LUTs from read-write variables. 2018-07-05 13:25:57 +02:00
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
Hans-Kristian Arntzen
c9db3e5521 Overload on constant storage. 2018-02-08 17:58:46 +01:00
Hans-Kristian Arntzen
b2c9487b0f Attempt to deduce constant/thread storage. 2018-02-08 17:07:50 +01:00
Hans-Kristian Arntzen
1a9c960058 MSL cannot declare inline arrays except in certain cases. 2018-02-08 13:06:29 +01:00
Bill Hollings
be4cb17a14 Enhance MSL testing and add numerous MSL test cases.
Add to suite of MSL tests and references any existing GLSL tests
that successfully convert GLSL->SPIRV->MSL and compile as MSL.
test_shaders_helper() ignores hidden files that start with '.',
to avoid accidentally finding hidden OSX files such as .DS_Store.
Use xcrun to compile MSL shaders instead of hard-coded path to Metal compiler.
Wrap calls to xcrun in exception handling to ignore if Xcode not installed.
For MSL tests, move call to validate_shader_msl() to after call to
regression_check() to allow a converted MSL shader to be saved for
manual review even if it doesn't successfully compile as MSL.
2017-01-30 22:55:21 -05:00