David Neto
8bed0cea13
Add a .csv showing test coverage for operand class
...
It shows which spv::OperandClass values are used in
the syntax table in source/opcode.inc, and what tests
exercise those operand types.
2015-10-26 12:55:33 -04:00
Dejan Mircevski
897bff924a
Simplify (and test) the alternate-parsing pattern.
2015-10-26 12:55:33 -04:00
David Neto
42bfd4bfab
Assembly test for OpSwitch
...
Removes old weak and fragile tests for OpSwitch.
Adds spvtest::TextToBinaryTest::CompileWithFormatFailure
2015-10-26 12:55:33 -04:00
David Neto
e77a7dd821
Assembly failure cases for OpMemoryBarrier
...
Fully tests OperandMemorySemantics from the syntax table.
2015-10-26 12:55:33 -04:00
David Neto
cb3db4327d
Assembler failing cases for OpCapability
2015-10-26 12:55:33 -04:00
David Neto
7cefb23ddb
Document non-use of certain operand types
...
Operand class enum values not used in the syntax table:
- Image channel order: only used to describe a return value
- Image channel type: only used to describe a return value
- "Image operands": used to make a section in the spec
to describe values used to construct an optional image id,
but does not itself appear in the syntax table.
Removes some TODOs from opcode.cpp.
2015-10-26 12:55:33 -04:00
Andrew Woloszyn
71fc05587b
Refactored dynamic and static state out of text processing.
...
This reduces the number of arguments required to be passed
to every single function. This is in preparation for adding
id tracking.
2015-10-26 12:55:33 -04:00
Dejan Mircevski
50babb2d00
Run clang-format.
2015-10-26 12:55:33 -04:00
Dejan Mircevski
903f9d6b70
Implement alternate-parsing mode for !<integer>.
2015-10-26 12:55:33 -04:00
David Neto
e3940ab166
Readme: capabilities for instructions are ok
...
Capabilities for enumerants may be out of date.
2015-10-26 12:55:33 -04:00
Andrew Woloszyn
38acba2c3c
Updated syntax.md to remove references to % numerical ids.
2015-10-26 12:55:33 -04:00
Dejan Mircevski
9672ad39cf
Remove isIdType(), which is now dead code.
2015-10-26 12:55:33 -04:00
David Neto
c348d18486
Test bad 2nd target to OpGroupMemberDecorate
2015-10-26 12:55:33 -04:00
David Neto
454f51fa4d
Assembly test for OpGroupMemberDecorate
...
Provides test coverage for OperandVariableIdLiteral
from the syntax table in the file 'opcode.inc'.
2015-10-26 12:55:33 -04:00
Dejan Mircevski
1b6f1960a8
Uncomment some !<integer> tests.
2015-10-26 12:55:33 -04:00
David Neto
d83179af7e
Cleanup: Use EnumCase in OpDecorateSimpleTest
2015-10-26 12:55:33 -04:00
David Neto
ab778dc1dc
Cleanup: Use EnumCase for ExecutionMode test
2015-10-26 12:55:33 -04:00
David Neto
54b2ea1088
Assembler test for optional operands of OpSource
...
These are the first tests to cover OperandOptionalId
and OperandOptionalLiteralString from the grammar in
opcode.inc
2015-10-26 12:55:33 -04:00
David Neto
561dc4e975
Remove SPV_OPERAND_TYPE_LITERAL
...
All uses of OptionalLiteral by the SPIR-V spec are used
for literal numbers.
Also rename:
- SPV_OPERAND_TYPE_OPTIONAL_LITERAL to
SPV_OPERAND_TYPE_OPTIONAL_LITERAL_NUMBER.
- SPV_OPERAND_TYPE_VARIABLE_LITERAL to
SPV_OPERAND_TYPE_VARIABLE_LITERAL_NUMBER.
- SPV_OPERAND_TYPE_VARIABLE_LITERAL_ID to
SPV_OPERAND_TYPE_VARIABLE_LITERAL_NUMBER_ID.
- SPV_OPERAND_TYPE_VARIABLE_ID_LITERAL to
SPV_OPERAND_TYPE_VARIABLE_ID_LITERAL_NUMBER.
- SPV_OPERAND_TYPE_LITERAL_IN_OPTIONAL_TUPLE to
SPV_OPERAND_TYPE_LITERAL_NUMBER_IN_OPTIONAL_TUPLE.
2015-10-26 12:55:33 -04:00
David Neto
f1b6471670
Dissasembler test showing reordering of masks
2015-10-26 12:55:33 -04:00
David Neto
b14a727a30
Execution scope, memory semantics operands are IDs
...
They shouldn't be parsed or printed as masks.
2015-10-26 12:55:33 -04:00
David Neto
619db2612e
Disassembler support for mask expressions.
2015-10-26 12:55:33 -04:00
David Neto
e4eba63932
Update Readme: Support Rev32; IDs never alias
2015-10-26 12:55:33 -04:00
David Neto
bfa3d86f7b
Memory semantics Relaxed is a synonym for None
...
The disassembler should prefer to print Relaxed,
I think. (Untested.)
2015-10-26 12:55:33 -04:00
David Neto
212bafe4da
Assembler tests for remaining Debug instructions
...
OpString, OpName, OpMemberName, OpLine, OpNoLine,
OpSourceContinued.
2015-10-26 12:55:33 -04:00
David Neto
e0890da603
Update core instruction syntax to Rev32
...
Many instructions added and a few changed structure.
Workarounds:
- Some operands can be enabled by either one of two
capabilities. The spv_operand_desc_t does not handle that
now. For now just select the first one.
Fixes to tests:
- OpLoopMerge now takes a mandatory continue target.
- OpTypePipe drops the type argument. Pipes are opaque.
- OpLine no longer takes a target ID argument.
The ID validator was fixed the OpLine and OpTypePipe
changes. Those were the only ID validator tests affected.
The patch to the spec doc generator was updated so it handles
the two-capability case, even if in an hacky way.
2015-10-26 12:55:33 -04:00
David Neto
6b31ce4d50
Assembler test TODOs for image instructions.
2015-10-26 12:55:33 -04:00
David Neto
d768798d48
Assembler supports new decorations in Rev32
...
They are:
- NoContraction
- InputTargetIndex
- Alignment
2015-10-26 12:55:33 -04:00
Lei Zhang
863ddbeeaa
Rev32: Remove DepthAny and mark Xfb as requiring TransformFeedback.
2015-10-26 12:55:33 -04:00
David Neto
d30b2331a3
Fix Capability dependencies on capabilities, Rev32
2015-10-26 12:55:33 -04:00
David Neto
c66f5074e2
Assembler support for new capabilities in Rev32
2015-10-26 12:55:33 -04:00
David Neto
8576c9c327
Support Image operand MinLod
2015-10-26 12:55:33 -04:00
David Neto
2d1b5e5bba
Assembler supports new builtins in Rev32
...
They are VertexIndex and InstanceIndex.
2015-10-26 12:55:33 -04:00
David Neto
49c299b094
Assembler support for Nontemporal memory access
2015-10-26 12:55:33 -04:00
Lei Zhang
85c6f79081
Define two macros to simplify code for ExecutionMode operands.
2015-10-26 12:55:33 -04:00
David Neto
c09d3857ff
Fix permissions on test/TextToBinary.Barrier.cpp
2015-10-26 12:55:33 -04:00
David Neto
aa0c3a5c07
Support Dim InputTarget
2015-10-26 12:55:33 -04:00
David Neto
9819adf4cb
Support StorageClass PushConstant
2015-10-26 12:55:33 -04:00
David Neto
3e52dd915d
Support ExecutionMode IndependentForwardProgress
2015-10-26 12:55:33 -04:00
David Neto
16df562ad3
Assembler test for Memory Semantics enum
...
Enables mask expression parsing for Memory Semantics arguments,
e.g. on OpMemoryBarrier.
2015-10-26 12:55:33 -04:00
Andrew Woloszyn
13804e5d63
All values now represent symbolic names instead of mixed with numeric.
...
Also removed un-necessary heap-allocation of spv_named_id_table.
This removed the necessity to expose a function to create/destroy it
and simplified the interface.
2015-10-26 12:55:33 -04:00
Lei Zhang
a66952d38c
Remove executable file mode bits on source files.
2015-10-26 12:55:33 -04:00
David Neto
dbaf40718a
Update to Rev32 headers. Part 1.
...
Just enough fixes to code make it build and pass tests.
Core changes:
- Fix spelling for: NoPerspective, NonWritable, NonReadable,
- Remove NoStaticUse, RelaxedMask
GLSL changes:
- Fixed spelling for: InverseSqrt, FaceForward, MatrixInverse,
SmoothStep, FindILsb, FindSMsb, FindUMsb
- Replace Mix with IMix and FMix
- Remove AddCarry, SubBorrow, MulExtended
Replace header OpenCLLib.h with OpenCL.std.h
TODO:
- Regenerate the core instruction syntax table (source/opcode.inc)
- Add test coverage for new enums and instructions.
2015-10-26 12:55:33 -04:00
Andrew Woloszyn
e0d351b3ad
Switched VecTypeHint to take a LiteralNumber instead of an ID
2015-10-26 12:55:33 -04:00
Andrew Woloszyn
fabeeb863b
Removed duplicate code due to what looks like a merge issue
2015-10-26 12:55:33 -04:00
David Neto
74af05f012
Cleanups for EnumCase
...
Make it a class, since it has non-trivial behaviour for converting
the enumerated value to a uint32_t value. (Comply with style guide.)
Merge EnumCaseWithOperands into EnumCase.
2015-10-26 12:55:33 -04:00
David Neto
1b5fd4962e
Put the test fixture into spvtest namespace.
...
All test utility code should go into the spvtest namespace.
2015-10-26 12:55:33 -04:00
Andrew Woloszyn
815cb95247
Fix MSVC build for boolean opeartions on enums.
2015-10-26 12:55:33 -04:00
David Neto
cde47431bd
Fix the Supported Features section.
2015-10-26 12:55:33 -04:00
David Neto
a570570e17
Readme: Assembler supports all of Rev31, for 32-bit code
...
Also say that we have fixed problems building with MSVC 2013.
Also document other recent changes.
2015-10-26 12:55:33 -04:00