platform/upstream/SPIRV-Tools.git
9 years agoUnify tests for GLSL std450 extended instructions.
Lei Zhang [Wed, 26 Aug 2015 21:23:35 +0000 (17:23 -0400)]
Unify tests for GLSL std450 extended instructions.

Previously we had two tests: one checks test to binary, the other
checks round trip. This patch merges the check in the former to
the latter.

9 years agoAdd GLSL std450 instructions 35-48.
Lei Zhang [Wed, 26 Aug 2015 14:28:42 +0000 (10:28 -0400)]
Add GLSL std450 instructions 35-48.

9 years agoMove tests for GLSL std450 instructions to a separate file.
Lei Zhang [Wed, 26 Aug 2015 14:52:19 +0000 (10:52 -0400)]
Move tests for GLSL std450 instructions to a separate file.

9 years agoAdd std450 instructions 25-34.
Dejan Mircevski [Tue, 25 Aug 2015 21:41:45 +0000 (17:41 -0400)]
Add std450 instructions 25-34.

9 years agoUpdate readme about the "<result-id> = <opcode> <operand>..." format.
Lei Zhang [Mon, 24 Aug 2015 18:07:37 +0000 (14:07 -0400)]
Update readme about the "<result-id> = <opcode> <operand>..." format.

9 years agoDisassemble in the format of "<result-id> = <opcode> <operand>..".
Lei Zhang [Mon, 24 Aug 2015 19:52:26 +0000 (15:52 -0400)]
Disassemble in the format of "<result-id> = <opcode> <operand>..".

9 years agoMerge branch 'google-catch-up' into 'master'
Kenneth Benzie [Wed, 2 Sep 2015 09:49:42 +0000 (05:49 -0400)]
Merge branch 'google-catch-up' into 'master'

Google changes during GitLab outage

These are the changes made by Google during the GitLab outage last week.

See merge request !9

9 years agoMerge branch 'capability-enumerant' into 'master'
Kenneth Benzie [Thu, 27 Aug 2015 07:58:08 +0000 (03:58 -0400)]
Merge branch 'capability-enumerant' into 'master'

Capability enumerant

See merge request !5

9 years agoMerge branch 'fix-p-switch' into 'master'
Kenneth Benzie [Tue, 25 Aug 2015 08:09:08 +0000 (04:09 -0400)]
Merge branch 'fix-p-switch' into 'master'

Fix the '-p' command-line switch

(Fix for issue #1)

The -p option of the SPIR-V disassembler does not print anything to stdout, contrarily to what the usage help says.

See merge request !8

9 years agoOnly use '%' as variable name prefix.
Lei Zhang [Fri, 21 Aug 2015 15:52:29 +0000 (11:52 -0400)]
Only use '%' as variable name prefix.

Since now we can distinguish between def and use according to
the variable's location, there is no need to keep two variable
prefixes.

Also reformat tests to use the value generating instruction
format ("<result-id> = <opcode> <operand>..").

9 years agoBugfix: report the correct location for wrong opcode.
Lei Zhang [Fri, 21 Aug 2015 15:52:03 +0000 (11:52 -0400)]
Bugfix: report the correct location for wrong opcode.

Also add more tests for the "<result-id> = <opcode> <operand>.."
format.

9 years agoFix TextAdvance() problems involving whitespace around comment lines.
Lei Zhang [Fri, 21 Aug 2015 15:51:28 +0000 (11:51 -0400)]
Fix TextAdvance() problems involving whitespace around comment lines.

Fix the bug that TextAdvance() forgot to skip whitespace at the
beginning of the next line after a comment line.

Fix the bug that TextAdvanceLine() increase line number after going
over a character.

9 years agoAdded stream operators for spv_binary_t and std::vector<uint32_t>
Andrew Woloszyn [Fri, 21 Aug 2015 19:40:02 +0000 (15:40 -0400)]
Added stream operators for spv_binary_t and std::vector<uint32_t>

9 years agoSupport "<result-id> = <opcode> <operand>.." format.
Lei Zhang [Fri, 21 Aug 2015 15:50:55 +0000 (11:50 -0400)]
Support "<result-id> = <opcode> <operand>.." format.

9 years agoMake the disassembler print the Extended instruction name.
Andrew Woloszyn [Fri, 21 Aug 2015 18:23:42 +0000 (14:23 -0400)]
Make the disassembler print the Extended instruction name.

This allows the disassembled output to more closely follow the
original assembly.

9 years agoAdded the initial set of glsl450 instructions.
Andrew Woloszyn [Fri, 21 Aug 2015 17:39:34 +0000 (13:39 -0400)]
Added the initial set of glsl450 instructions.

Also rewrote the extended-instruction tests so that they would actually
make sure that the instruction actually appears in the output.

9 years agoMove test fixture into a separate header file so it can be reused.
Lei Zhang [Fri, 21 Aug 2015 15:50:09 +0000 (11:50 -0400)]
Move test fixture into a separate header file so it can be reused.

9 years agoFix the '-p' command-line switch
Christopher Gautier [Sun, 21 Jun 2015 15:20:05 +0000 (17:20 +0200)]
Fix the '-p' command-line switch

9 years agoAddress new enumerants in enum Capability for rev 31.
Lei Zhang [Tue, 18 Aug 2015 13:49:04 +0000 (09:49 -0400)]
Address new enumerants in enum Capability for rev 31.

9 years agoMerge branch 'update-header-to-rev31' into 'master'
Kenneth Benzie [Tue, 18 Aug 2015 09:34:27 +0000 (05:34 -0400)]
Merge branch 'update-header-to-rev31' into 'master'

Update external headers to rev 31

See merge request !3

9 years agoMerge branch 'bitshift-parens' into 'master'
Kenneth Benzie [Tue, 18 Aug 2015 09:31:23 +0000 (05:31 -0400)]
Merge branch 'bitshift-parens' into 'master'

Bitshift parens

Parenthesize SPV_BIT macro to avoid surprises.

Adds LibspirvMacros.cpp unit test file.

See merge request !4

9 years agoParenthesize SPV_BIT macro to avoid surprises.
David Neto [Fri, 14 Aug 2015 17:57:02 +0000 (13:57 -0400)]
Parenthesize SPV_BIT macro to avoid surprises.

9 years agoUpdate spirv.h to revision 31.
Lei Zhang [Fri, 14 Aug 2015 18:46:43 +0000 (14:46 -0400)]
Update spirv.h to revision 31.

For enum Capability and enum Op, not all newly added enumerants are
registered into capabilityInfoEntries and opcodeTableEntries yet.
That will come in following commits.

9 years agoUpdate OpenCLLib.h to revision 31.
Lei Zhang [Fri, 14 Aug 2015 18:44:38 +0000 (14:44 -0400)]
Update OpenCLLib.h to revision 31.

9 years agoSubstitute GLSL450Lib.h with GLSL.std.450.h of revision 31.
Lei Zhang [Fri, 14 Aug 2015 18:42:30 +0000 (14:42 -0400)]
Substitute GLSL450Lib.h with GLSL.std.450.h of revision 31.

9 years agoMerge branch 'avoid-cmake-target-conflicts' into 'master'
Kenneth Benzie [Mon, 17 Aug 2015 11:58:16 +0000 (07:58 -0400)]
Merge branch 'avoid-cmake-target-conflicts' into 'master'

Avoid cmake target conflicts

This makes it easier to include spirv-tools into larger cmake-based
projects, which may already include glslang or googletest. It is
currently difficult to do this because of target clashes and a
hardcoded googletest path.

glslang defines a target named SPIRV, so rename ours to SPIRV-TOOLS.

A googletest subdirectory may already be added somewhere else, so if
the external/googletest directory does not exist, probe whether there
is a gtest target defined already. This makes spirv-tools work
out-of-the-box when plopped into a larger project already containing
googletest; otherwise the README.md procedure still works as before.

See merge request !1

9 years agoMerge branch 'fix-failing-test' into 'master'
Kenneth Benzie [Mon, 17 Aug 2015 11:58:00 +0000 (07:58 -0400)]
Merge branch 'fix-failing-test' into 'master'

Fix failing test

The generator number is set to `SPV_GENERATOR_KHRONOS` in the
`spvBinaryHeaderSet` function, so tests should catch up.

See merge request !2

9 years agoFix failing tests.
Lei Zhang [Thu, 30 Jul 2015 14:30:28 +0000 (10:30 -0400)]
Fix failing tests.

The generator number is set to SPV_GENERATOR_KHRONOS in the
spvBinaryHeaderSet function, so tests should catch up.

9 years agoAvoid target conflicts with glslang and googletest.
Lei Zhang [Wed, 29 Jul 2015 19:22:09 +0000 (15:22 -0400)]
Avoid target conflicts with glslang and googletest.

This makes it easier to include spirv-tools into larger cmake-based
projects, which may already include glslang or googletest. It is
currently difficult to do this because of target clashes and a
hardcoded googletest path.

glslang defines a target named SPIRV, so rename ours to SPIRV-TOOLS.

A googletest subdirectory may already be added somewhere else, so if
the external/googletest directory does not exist, probe whether there
is a gtest target defined already. This makes spirv-tools work
out-of-the-box when plopped into a larger project already containing
googletest; otherwise the README.md procedure still works as before.

9 years agoChange binary header generator word to Khronos
Kenneth Benzie (Benie) [Mon, 1 Jun 2015 16:50:46 +0000 (09:50 -0700)]
Change binary header generator word to Khronos

9 years agoUpdate readme file with repo maintainer.
Kenneth Benzie (Benie) [Tue, 26 May 2015 09:40:58 +0000 (10:40 +0100)]
Update readme file with repo maintainer.

9 years agoCode drop of the Codeplay spirv-tools source.
Kenneth Benzie (Benie) [Fri, 22 May 2015 17:26:19 +0000 (18:26 +0100)]
Code drop of the Codeplay spirv-tools source.

This commit contains the source for the SPIRV static library, spirv-as,
spirv-dis, and spirv-val tools.