Commit Graph

422 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
18c37bcdab Update license headers for 2017. 2017-01-28 09:00:40 +01:00
Hans-Kristian Arntzen
56df3bf5fe Add HLSL testing to ctest. 2017-01-28 08:58:39 +01:00
Hans-Kristian Arntzen
d0cc4fe3ad Fix Wshadow warning. 2017-01-28 08:58:25 +01:00
Hans-Kristian Arntzen
1850457b28 Merge pull request #107 from Kode/hlsl
HLSL Support
2017-01-28 08:53:24 +01:00
Robert Konrad
f7eecd7b82 Correct HLSL vector types properly 2017-01-27 17:02:59 +01:00
Robert Konrad
2da32f717d Remove obsolete transpose op functions for HLSL 2017-01-27 16:51:50 +01:00
Robert Konrad
757d5dd65a Correct vector type names in HLSL 2017-01-27 16:49:13 +01:00
Robert Konrad
4358b2f788 Format the other HLSL copyright comment 2017-01-27 16:45:43 +01:00
Robert Konrad
e49cff5055 Update HLSL reference shader 2017-01-27 16:34:52 +01:00
Robert Konrad
3c3abbf788 Avoid transposing matrices in HLSL 2017-01-27 16:29:59 +01:00
Robert Konrad
048293198b Add optional y vertex flip for HLSL 2017-01-27 15:55:39 +01:00
Robert Konrad
532877f6f5 Make clipspace fixing in HLSL optional 2017-01-27 15:52:47 +01:00
Robert Konrad
bfa635af16 Mention HLSL in readme 2017-01-27 15:21:38 +01:00
Robert Konrad
245fb9bc20 Minimize changes to msvc files 2017-01-27 11:13:24 +01:00
Hans-Kristian Arntzen
ca353da490 Merge pull request #97 from Kode/metalcat
Metal additions/fixes
2017-01-27 08:07:06 +01:00
Polona Caserman
a9fb150faa Improved loop 2017-01-26 20:05:43 +01:00
Robert Konrad
41cd852845 Update (c) and msvc project 2017-01-26 15:33:49 +01:00
Robert Konrad
0a1054e71a Add optional fxc HLSL test 2017-01-26 13:28:36 +01:00
Robert Konrad
82959c86bb Use \n line endings in HLSL reference shaders 2017-01-26 13:22:52 +01:00
Robert Konrad
a52846b045 Fix warnings in spirv_hlsl.cpp 2017-01-26 12:02:31 +01:00
Robert Konrad
ddbeea2e38 Use glslangValidator to test HLSL output 2017-01-26 11:46:29 +01:00
Robert Konrad
d6b3efaaaf Add HLSL reference shader outputs 2017-01-26 11:41:22 +01:00
Robert Konrad
7b3d0686ef Adjust metal reference output
Y flipping is now off by default.
2017-01-26 10:32:50 +01:00
Robert Konrad
bbc1e0c0cc Format code 2017-01-26 10:20:42 +01:00
Robert Konrad
4846e081a7 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross into metalcat
# Conflicts:
#	spirv_msl.cpp
2017-01-26 10:19:26 +01:00
Robert Konrad
e717953004 Fix var names in cross_compile_hlsl 2017-01-26 10:06:05 +01:00
Robert Konrad
107a162f17 Run HLSL tests on Travis 2017-01-26 10:00:24 +01:00
Robert Konrad
9ebc93a820 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross into hlsl
# Conflicts:
#	test_shaders.py
2017-01-26 09:49:52 +01:00
Robert Konrad
cec9c70ff8 Add HLSL support to test_shaders script 2017-01-26 09:45:17 +01:00
Hans-Kristian Arntzen
20f149a9aa Merge pull request #110 from zeux/metal-validate
Validate Metal shaders on OSX with Metal compiler
2017-01-26 07:33:55 +01:00
Robert Konrad
216a6816cd Add --hlsl command line option 2017-01-25 17:30:52 +01:00
Robert Konrad
98eadc086e Add HLSL to cmake file 2017-01-25 17:20:43 +01:00
Robert Konrad
c53646a670 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross into hlsl 2017-01-25 17:03:57 +01:00
Arseny Kapoulkine
49baf41990 Print Metal compiler version before running Metal tests
This helps pinpoint the issues due to differences in the Metal compiler
version and also indicates whether we are actually using the compiler to
validate MSL output.
2017-01-25 00:12:09 -08: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
7daba19223 Merge pull request #108 from zeux/flatten-row-major-matrix-index
Implement flattening of row major matrix indexing
2017-01-24 18:47:00 +01:00
Arseny Kapoulkine
32a561a6c3 Remove redundant constructor calls for scalar types 2017-01-24 08:09:58 -08:00
Arseny Kapoulkine
ed04c95b08 Implement flattening of row major matrix indexing
To extract a column from row-major matrix, we need to do a strided load one
component at a time. In this case flattened_access_chain_offset still returns
the offset to the first element, but the stride is equal to matrix stride
instead of vector stride.

For this to work, we need to pass matrix stride (and transpose flag) through,
similar to how matrix flattening works.

Additionally slightly clean up recursive flattened_access_chain structure -
specifically, instead of deciding mid-traversal that we need matrix stride
information, we can just pass the matrix stride through - for access chains
that end in matrix/vector this gets us what we need, and for access chains
that end in structs the flattened_access_chain_struct code will recompute
correct stride/transposition data to pass through further.
2017-01-24 07:42:19 -08:00
Hans-Kristian Arntzen
11df227adf Merge pull request #100 from KhronosGroup/metal-testing
Add basic setup for regression testing Metal output.
2017-01-24 14:52:02 +01:00
Hans-Kristian Arntzen
1c28ec6885 Add basic setup for regression testing Metal output. 2017-01-24 14:04:55 +01:00
Robert Konrad
9ec45fae51 Format code 2017-01-24 09:25:38 +01:00
Robert Konrad
c3268c9410 Do not output layouts for uniforms in HLSL 2017-01-24 09:23:22 +01:00
Robert Konrad
99469f0690 Convert uniform buffer blocks to cbuffers 2017-01-24 09:17:43 +01:00
Robert Konrad
bb763f3984 Fix merge 2017-01-23 14:52:02 +01:00
Robert Konrad
40e5d1e7f7 Format code 2017-01-23 14:49:32 +01:00
Robert Konrad
429b8cb25f Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross into hlsl
# Conflicts:
#	spirv_glsl.hpp
2017-01-23 14:44:41 +01:00
Robert Konrad
51835af124 Fix HLSL fragment shaders 2017-01-23 14:41:34 +01:00
Robert Konrad
d3a8ea33b8 Support modern GLSL->HLSL for vertex shaders 2017-01-23 14:41:20 +01:00
Robert Konrad
beebcbd1aa Splat even less in HLSL 2017-01-23 14:40:56 +01:00
Robert Konrad
451bdeeeff Fix HLSL binding numbers 2017-01-23 14:40:25 +01:00