- 06 Apr, 2016 2 commits
-
-
qining authored
Move SpecConstantOpModeGuard from makeSpvConstantFromConstSubTree() to visitbinary() and visitunary(). Checking if the visiting node is a spec constants, if so, turn on the SpecConstantOpMode, otherwise, stay in the normal mode.
-
qining authored
fix the wrong generated code when a non-constant array is declared with its size derived from spec constant operations
-
- 04 Apr, 2016 3 commits
-
-
John Kessenich authored
Handle built-in constants redeclared with a specialization constant id.
-
qining authored
Support declaring built-in values as spec constants. Refine the code in createSpvConstant().
-
John Kessenich authored
-
- 03 Apr, 2016 4 commits
-
-
John Kessenich authored
-
John Kessenich authored
VS2010 compile fixes
-
John Kessenich authored
Fix spelling mistakes
-
Eric Engestrom authored
-
- 02 Apr, 2016 3 commits
-
-
John Kessenich authored
-
baldurk authored
-
baldurk authored
-
- 31 Mar, 2016 5 commits
-
-
John Kessenich authored
Add Google Test as the new test framework
-
John Kessenich authored
Parser: Update array size of gl_ClipDistance/gl_CullDistance in gl_in[].
-
John Kessenich authored
SPV: Spec Constant Operations
-
qining authored
fix format; remove unnecessary parameters; rename some spec op mode guard class; remove support of float point comparison and composite type comparison; update the tests.
-
Lei Zhang authored
The existing test harness is a homemade shell script. All the tests and the expected results are written in plain text files. The harness just reads in a test, invoke the glslangValidator binary on it, and compare the result with the golden file. All tests are kinda integration tests. This patch add Google Test as an external project, which provides a new harness for reading shader source files, compile to SPIR-V, and then compare with the expected output.
-
- 30 Mar, 2016 1 commit
-
-
qining authored
Approach: Add a flag in `Builder` to indicate 'spec constant mode' and 'normal mode'. When the builder is in 'normal mode', nothing changed. When the builder is in 'spec constant mode', binary, unary and other instruction creation rountines will be redirected to `createSpecConstantOp()` to create instrution at module level with `OpSpecConstantOp <original opcode> <operands>`. 'spec constant mode' should be enabled if and only if we are creating spec constants. So a flager setter/recover guard is added when handling binary/unary nodes in `createSpvConstantsFromConstSubTree()`. Note when handling spec constants which are represented as ConstantUnion Node, we should not use `OpSpecConstantOp` to initialize the composite constant, so builder is set to 'normal mode'. Tests: Tests are added in Test/spv.specConstantOperations.vert, including: 1) Arithmetic, shift opeations for both scalar and composite type spec constants. 2) Size conversion from/to float and double for both scalar and vector. 3) Bitwise and/or/xor for both scalar and vector. 4) Unary negate/not for both scalar and vector. 5) Vector swizzles. 6) Comparisons for scalars. 7) == and != for composite type spec constants Issues: 1) To implement == and != for composite type spec constants, the Spec needs to allow OpAll, OpAny, OpFOrdEqual, OpFUnordEqual, OpOrdNotEqual, OpFUnordNotEqual. Currently none of them are allowed in the Spec.
-
- 27 Mar, 2016 1 commit
-
-
Rex Xu authored
-
- 25 Mar, 2016 1 commit
-
-
John Kessenich authored
SPV: Support specialization composite constants.
-
- 24 Mar, 2016 1 commit
-
-
qining authored
Fix issue #163, support creation and reference of composite type specialization constants. e.g.: ``` layout(constant_id = 200) const float myfloat = 1.25; layout(constant_id = 201) const int myint = 14; struct structtype { float f; int i; }; const structtype outer_struct_var = {myfloat, myint}; void main(){} ``` generated code (use glslangValidator): ``` // Module Version 10000 // Generated by (magic number): 80001 // Id's are bound by 12 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" Source GLSL 450 Name 4 "main" Name 10 "structtype" MemberName 10(structtype) 0 "f" MemberName 10(structtype) 1 "i" Decorate 7 SpecId 200 Decorate 9 SpecId 201 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: 6(float) SpecConstant 1067450368 8: TypeInt 32 1 9: 8(int) SpecConstant 14 10(structtype): TypeStruct 6(float) 8(int) 11:10(structtype) SpecConstantComposite 7 9 4(main): 2 Function None 3 5: Label Return FunctionEnd ``` Rname two function names to match their functionalities. 1) Rename `GlslangToSpvTraverser::createSpvSpecConstant()` to `createSpvConstant()`; 2) Rename `GlslangToSpvTraverser::createSpvConstant()` to `createSpvConstantFromConstUnionArray()` Add function `GlslangToSpvTraverser::createSpvConstantFromSubTree()` to handle constant creation from sub trees (e.g.: specialization constants). Related PR: #208
-
- 22 Mar, 2016 2 commits
-
-
John Kessenich authored
VS2012: Fix a build issue in parser.
-
Rex Xu authored
-
- 21 Mar, 2016 6 commits
-
-
John Kessenich authored
Fixed compilation issue introduced by my last commit
-
Andrew Woloszyn authored
-
John Kessenich authored
Updated the includer interface to allow relative includes.
-
John Kessenich authored
-
Andrew Woloszyn authored
This plumbs both the current file path and the include depth back up to the includer. This allows the includer to properly support relative paths. This also replaces the string copy that was done during include with a zero-copy method of accomplishing the same thing. This prevents extra copies of entire files.
-
John Kessenich authored
-
- 20 Mar, 2016 3 commits
-
-
John Kessenich authored
-
John Kessenich authored
Much about const or temp is mechanical, about actual declaration, while much is semantic, about something higher level. This commit checks every use everywhere, and for the high-level ones, substitutes an encapsulated version instead.
-
John Kessenich authored
-
- 18 Mar, 2016 2 commits
-
-
John Kessenich authored
Parser: Type promotion for operator modulus(%) is missing.
-
Rex Xu authored
-
- 16 Mar, 2016 2 commits
-
-
John Kessenich authored
Support Linux-to-Windows cross compile via MinGW
-
David Neto authored
Change-Id: Ie52f0b1b2b20948c6f4b3cb5474537d36a5a3385
-
- 15 Mar, 2016 2 commits
-
-
John Kessenich authored
SPV: Implement boolean selection for mix().
-
Rex Xu authored
Use OpSelect to implement boolean selection of mix(). FMix is applicable to linear blending of mix().
-
- 14 Mar, 2016 2 commits
-
-
John Kessenich authored
-
John Kessenich authored
-