Commit Graph

3475 Commits

Author SHA1 Message Date
Kenneth Benzie
579c45d4a9 Merge branch 'capability-enumerant' into 'master'
Capability enumerant

See merge request !5
2015-08-27 03:58:08 -04:00
Kenneth Benzie
46c441c2ee 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
2015-08-25 04:09:08 -04:00
Lei Zhang
abafd5e674 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>..").
2015-08-24 15:05:11 -04:00
Lei Zhang
977e9bcfc6 Bugfix: report the correct location for wrong opcode.
Also add more tests for the "<result-id> = <opcode> <operand>.."
format.
2015-08-24 15:05:08 -04:00
Lei Zhang
ee87cc2a1e 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.
2015-08-24 15:05:05 -04:00
Andrew Woloszyn
2facab2d08 Added stream operators for spv_binary_t and std::vector<uint32_t> 2015-08-24 15:05:02 -04:00
Lei Zhang
dfc50086a6 Support "<result-id> = <opcode> <operand>.." format. 2015-08-24 15:04:58 -04:00
Andrew Woloszyn
0d350b5992 Make the disassembler print the Extended instruction name.
This allows the disassembled output to more closely follow the
original assembly.
2015-08-24 15:04:55 -04:00
Andrew Woloszyn
1d2a87ed1b 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.
2015-08-24 15:04:49 -04:00
Lei Zhang
fb76d81aa0 Move test fixture into a separate header file so it can be reused. 2015-08-24 15:04:45 -04:00
Christopher Gautier
01024f57cb Fix the '-p' command-line switch 2015-08-24 12:57:57 +02:00
Lei Zhang
7e75158c7f Address new enumerants in enum Capability for rev 31. 2015-08-18 09:49:04 -04:00
Kenneth Benzie
67b649fa01 Merge branch 'update-header-to-rev31' into 'master'
Update external headers to rev 31

See merge request !3
2015-08-18 05:34:27 -04:00
Kenneth Benzie
b21da82999 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
2015-08-18 05:31:23 -04:00
David Neto
f6184a8b37 Parenthesize SPV_BIT macro to avoid surprises. 2015-08-17 17:01:42 -04:00
Lei Zhang
604e5cea12 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.
2015-08-17 11:40:24 -04:00
Lei Zhang
3b10fa8255 Update OpenCLLib.h to revision 31. 2015-08-17 09:08:31 -04:00
Lei Zhang
884c833889 Substitute GLSL450Lib.h with GLSL.std.450.h of revision 31. 2015-08-17 09:08:31 -04:00
Kenneth Benzie
17f1bae331 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
2015-08-17 07:58:16 -04:00
Kenneth Benzie
67cdf9fba6 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
2015-08-17 07:58:00 -04:00
Lei Zhang
3a7315498f Fix failing tests.
The generator number is set to SPV_GENERATOR_KHRONOS in the
spvBinaryHeaderSet function, so tests should catch up.
2015-07-30 15:21:42 -04:00
Lei Zhang
e3800df71c 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.
2015-07-29 16:53:58 -04:00
Kenneth Benzie (Benie)
81d7d49a20 Change binary header generator word to Khronos 2015-06-01 09:50:46 -07:00
Kenneth Benzie (Benie)
2c83666625 Update readme file with repo maintainer. 2015-05-26 10:40:58 +01:00
Kenneth Benzie (Benie)
83e5a29b06 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.
2015-05-22 18:26:19 +01:00