platform/upstream/SPIRV-Tools.git
8 years agoAdd operand type for extension instruction number
David Neto [Thu, 15 Oct 2015 19:22:06 +0000 (15:22 -0400)]
Add operand type for extension instruction number

This is required to support extended instructions that
have literal numbers as operands.  An example is OpenCL's
vloadn.

The previous code in the assembler assumed that *any* literal
number argument in any part of an OpExtInst must be the name
of the extended instruction.  That's true only for the first
literal number argument.

8 years agoUse literal integers for OpenCL extended instructions.
David Neto [Fri, 16 Oct 2015 18:16:00 +0000 (14:16 -0400)]
Use literal integers for OpenCL extended instructions.

8 years agoAdd OpenCL extended instructions.
David Neto [Wed, 14 Oct 2015 21:02:11 +0000 (17:02 -0400)]
Add OpenCL extended instructions.

Versions 1.2, 2.0, and 2.1 all use the same
extended instruction list.

Updated the source code patch for the SPIR-V doc generator,
so it can both generate the core syntax table, and also the
OpenCL extended instructions table.

Tested the Math and Common functions.
TODO: test the remaining entries.

8 years agoSome minor clean-ups to binary.{h,cpp}.
Andrew Woloszyn [Fri, 16 Oct 2015 14:23:42 +0000 (10:23 -0400)]
Some minor clean-ups to binary.{h,cpp}.

Removed spvBinaryDecodeOpcode and spvBinaryDecodeOperand from the public
interface since they were only ever used in binary.cpp.

Replaced the usage of spv_operand_table_t and it's ilk with the
AssemblyGrammar to reduce the number of passed parameters.

Fixed typo in comment.

8 years agoEnforce suitable literal number operands to be unsigned integers.
Lei Zhang [Wed, 14 Oct 2015 21:02:39 +0000 (17:02 -0400)]
Enforce suitable literal number operands to be unsigned integers.

Except for OpConstant and OpSpecConstant, all other literal number
operands are indeed unsigned integers. So,

* Rename all *LITERAL_NUMBER* operand types to *LITERAL_INTEGER*.
* Expect unsigned integers for *LITERAL_INTEGER* operands.
* Keep MULITPLE_WORD_LITERAL untouched since it is only used by
  OpConstant and OpSpecConstant.

And we want to provide the capability to specify floating-point
numbers after !<integer> in the alternate parsing mode. So,
OPTIONAL_LITERAL_NUMBER is reserved for OPTIONAL_CIV.

8 years agoGit ignore compile_commands.json in root directory.
David Neto [Fri, 16 Oct 2015 15:15:04 +0000 (11:15 -0400)]
Git ignore compile_commands.json in root directory.

Useful for standalone development of SPIR-V Tools with
Ninja and YouCompleteMe.

8 years agoUse normal string instead of raw string for simple strings.
Lei Zhang [Fri, 16 Oct 2015 14:05:46 +0000 (10:05 -0400)]
Use normal string instead of raw string for simple strings.

8 years agoSimplify methods for compilation failure in test framework.
Lei Zhang [Thu, 15 Oct 2015 19:20:45 +0000 (15:20 -0400)]
Simplify methods for compilation failure in test framework.

Remove  CompileWithFormatFailure() and make CompileFailure() accept
a default argument.

8 years agoUse SPIRV_PERF=1 when performance tuning.
David Neto [Thu, 15 Oct 2015 20:43:14 +0000 (16:43 -0400)]
Use SPIRV_PERF=1 when performance tuning.

It tells the compiler to keep frame pointers, so you have good
call stacks in your profiles.

8 years agoAvoid strlen in a loop, for speed.
David Neto [Thu, 15 Oct 2015 20:40:04 +0000 (16:40 -0400)]
Avoid strlen in a loop, for speed.

8 years agoFix Android build: use std::numeric_limits<T>::max and friends
David Neto [Thu, 15 Oct 2015 18:34:07 +0000 (14:34 -0400)]
Fix Android build: use std::numeric_limits<T>::max and friends

UINT32_MAX and friends are not available.

8 years agoAdd disabled tests for disassembler literal emission
David Neto [Wed, 14 Oct 2015 18:40:24 +0000 (14:40 -0400)]
Add disabled tests for disassembler literal emission

Currently, negative numbers are printed as if they were
first statically cast to unsigned.

8 years agoAdded proper string escaping to the disassembler.
Andrew Woloszyn [Wed, 14 Oct 2015 18:18:43 +0000 (14:18 -0400)]
Added proper string escaping to the disassembler.

The disassembler now generates correct string when encountering
quotes and slashes.

8 years agoSPV_FAILED_MATCH error mutes DiagnosticStream.
David Neto [Wed, 14 Oct 2015 15:31:51 +0000 (11:31 -0400)]
SPV_FAILED_MATCH error mutes DiagnosticStream.

The DiagnosticStream will not emit the accumulated message
text if the error is SPV_FAILED_MATCH.

Change various interfaces to accept the intended error
code instead of a boolean "is_optional".  This allows
us to avoid repeating the following type of logic deep
inside helper methods:

  if (is_optional) return SPV_FAILED_MATCH;
  return diagnostic() << " message text ";

8 years agoRemoved un-needed comments and fixed merge issue.
Andrew Woloszyn [Wed, 14 Oct 2015 17:21:50 +0000 (13:21 -0400)]
Removed un-needed comments and fixed merge issue.

8 years agoUpdated string escaping in the assembler.
Andrew Woloszyn [Wed, 14 Oct 2015 16:44:19 +0000 (12:44 -0400)]
Updated string escaping in the assembler.

Strings are now escaped correctly when assembling.
TODO dissassembler support for strange strings (newlines for example).

8 years agoUpdate readme. Long instructions, literal number encoding
David Neto [Wed, 14 Oct 2015 16:18:41 +0000 (12:18 -0400)]
Update readme. Long instructions, literal number encoding

8 years agoAdd negative-coverage location to operand-class-test-coverage.csv.
Dejan Mircevski [Tue, 13 Oct 2015 21:35:15 +0000 (17:35 -0400)]
Add negative-coverage location to operand-class-test-coverage.csv.

8 years agoParse and encode literal integers to the right width
David Neto [Mon, 5 Oct 2015 17:28:46 +0000 (13:28 -0400)]
Parse and encode literal integers to the right width

Affects OpConstant, and OpSwitch.

Adds constant libspirv::kUnknownType for readability.

Adds tests for hexadecimal number parsing.

Updates syntax.md to describe hex parsing, including
sign extension.

8 years agoAdd AssemblyContext::parseNumber
David Neto [Tue, 13 Oct 2015 19:51:12 +0000 (15:51 -0400)]
Add AssemblyContext::parseNumber

It parses a text string for a value of a given target type.

8 years agoDiagnosticStream can convert to a stored error code
David Neto [Fri, 9 Oct 2015 19:48:09 +0000 (15:48 -0400)]
DiagnosticStream can convert to a stored error code

Use this to shorten error return code in the assembler.

For example, change this:

   if (error = something()) {
      diagnostic() << " Bad integer literal " << value;
      return SPV_ERROR_INVALID_VALUE;
   }

to this:

   if (error = something())
      return diagnostic() << " Bad integer literal " << value;

Also shorten code due to the fact that binaryEncodeU32 and
binaryCodeU64 can't fail (short of failure to expand a std::vector).

8 years agoNegative test for FunctionControl.
Dejan Mircevski [Tue, 13 Oct 2015 20:00:01 +0000 (16:00 -0400)]
Negative test for FunctionControl.

8 years agoNegative test for LoopControl.
Dejan Mircevski [Tue, 13 Oct 2015 19:53:46 +0000 (15:53 -0400)]
Negative test for LoopControl.

8 years agoNegative test for SelectionControl.
Dejan Mircevski [Tue, 13 Oct 2015 19:49:53 +0000 (15:49 -0400)]
Negative test for SelectionControl.

8 years agoNegative test for GroupOperation.
Dejan Mircevski [Tue, 13 Oct 2015 20:32:38 +0000 (16:32 -0400)]
Negative test for GroupOperation.

8 years agoNegative test for LinkageType.
Dejan Mircevski [Tue, 13 Oct 2015 19:22:01 +0000 (15:22 -0400)]
Negative test for LinkageType.

8 years agoNegative test for BuiltIn.
Dejan Mircevski [Tue, 13 Oct 2015 19:39:38 +0000 (15:39 -0400)]
Negative test for BuiltIn.

8 years agoNegative test for AccessQualifier.
Dejan Mircevski [Tue, 13 Oct 2015 19:25:31 +0000 (15:25 -0400)]
Negative test for AccessQualifier.

8 years agoNegative test for FuncParamAttr.
Dejan Mircevski [Tue, 13 Oct 2015 19:30:18 +0000 (15:30 -0400)]
Negative test for FuncParamAttr.

8 years agoNegative test for Decoration.
Dejan Mircevski [Tue, 13 Oct 2015 19:35:49 +0000 (15:35 -0400)]
Negative test for Decoration.

8 years agoNegative test for FPRoundingMode.
Dejan Mircevski [Tue, 13 Oct 2015 19:15:54 +0000 (15:15 -0400)]
Negative test for FPRoundingMode.

8 years agoNegative test for FPFastMathMode.
Dejan Mircevski [Tue, 13 Oct 2015 19:02:03 +0000 (15:02 -0400)]
Negative test for FPFastMathMode.

8 years agoNegative test for ImageFormat.
Dejan Mircevski [Tue, 13 Oct 2015 16:54:47 +0000 (12:54 -0400)]
Negative test for ImageFormat.

8 years agoMake compilation input strings const.
Dejan Mircevski [Tue, 13 Oct 2015 16:46:13 +0000 (12:46 -0400)]
Make compilation input strings const.

Also rerun clang-format.

8 years agoNegative test for SamplerFilterMode.
Dejan Mircevski [Tue, 13 Oct 2015 16:38:20 +0000 (12:38 -0400)]
Negative test for SamplerFilterMode.

8 years agoNegative test for SamplerAddressingMode.
Dejan Mircevski [Tue, 13 Oct 2015 15:51:11 +0000 (11:51 -0400)]
Negative test for SamplerAddressingMode.

8 years agoClarify handling of OperandImageOperands.
Dejan Mircevski [Tue, 13 Oct 2015 18:41:31 +0000 (14:41 -0400)]
Clarify handling of OperandImageOperands.

8 years agoNegative test for ImageOperands.
Dejan Mircevski [Tue, 13 Oct 2015 18:47:22 +0000 (14:47 -0400)]
Negative test for ImageOperands.

8 years agoNegative test for Dim.
Dejan Mircevski [Tue, 13 Oct 2015 15:46:09 +0000 (11:46 -0400)]
Negative test for Dim.

8 years agoTest OpTypeForwardPointer.
Dejan Mircevski [Fri, 9 Oct 2015 20:48:28 +0000 (16:48 -0400)]
Test OpTypeForwardPointer.

8 years agoAdded tracking to types and validated certain instructions.
Andrew Woloszyn [Tue, 29 Sep 2015 15:28:34 +0000 (11:28 -0400)]
Added tracking to types and validated certain instructions.

We need to know how to generate correct SPIRV for cases like
OpConstant %int64 42 since the current parser will encode the 42 as a
32-bit value incorrectly.

This change is the first of a pair. This one tracks types, and makes
sure that OpConstant and OpSpecConstant are only ever called with
Integer or Float types, and OpSwitch is only called with integer
generating values.

8 years agoRemove spv_opcode_flags_t and flags fields.
David Neto [Wed, 7 Oct 2015 20:58:38 +0000 (16:58 -0400)]
Remove spv_opcode_flags_t and flags fields.

The flags fields in both spv_opcode_desc_t and spv_operand_desc_t
are redundant with the capabilities mask field in the same
structure.

8 years agoNegative test for ExecutionMode.
Dejan Mircevski [Fri, 9 Oct 2015 18:29:07 +0000 (14:29 -0400)]
Negative test for ExecutionMode.

8 years agoNegative test for AddressingModel, MemoryModel.
Dejan Mircevski [Fri, 9 Oct 2015 18:21:03 +0000 (14:21 -0400)]
Negative test for AddressingModel, MemoryModel.

8 years agoNegative test for ExecutionModel.
Dejan Mircevski [Fri, 9 Oct 2015 17:44:22 +0000 (13:44 -0400)]
Negative test for ExecutionModel.

8 years agoNegative test for SourceLanguage.
Dejan Mircevski [Fri, 9 Oct 2015 15:06:10 +0000 (11:06 -0400)]
Negative test for SourceLanguage.

Also, use "class" instead of "type" in the coverage CSV.

8 years agoAccept long UTF-8 Literal Strings
David Neto [Thu, 8 Oct 2015 19:20:25 +0000 (15:20 -0400)]
Accept long UTF-8 Literal Strings

8 years agoSupport strings with up to 65535 chars, and null.
David Neto [Tue, 6 Oct 2015 20:22:00 +0000 (16:22 -0400)]
Support strings with up to 65535 chars, and null.

Move the definition of spv_instruction_t to an internal
header file, since it now depends on C++ and is not
used by the external interface.

Use a std::vector<uint32_t> in spv_instruction_t
instead of a fixed size array.

8 years agoRemove stale TODO. Fix use of OpCode to 'instruction'
David Neto [Wed, 7 Oct 2015 14:11:39 +0000 (10:11 -0400)]
Remove stale TODO. Fix use of OpCode to 'instruction'

8 years agoUpdate readme: capabilities are up to date
David Neto [Tue, 6 Oct 2015 18:35:43 +0000 (14:35 -0400)]
Update readme: capabilities are up to date

8 years agoDefine spv_capability_mask_t for readability.
David Neto [Fri, 2 Oct 2015 20:09:43 +0000 (16:09 -0400)]
Define spv_capability_mask_t for readability.

8 years agoTest capabilities for enums sections 3.21-3.31
David Neto [Mon, 5 Oct 2015 13:55:23 +0000 (09:55 -0400)]
Test capabilities for enums sections 3.21-3.31

Fixes dependencies among capabilities.  (The table should store
the mask of capabilites, not the capability enum.)

Remove the old spot check test for capabilities of enums.

8 years agoFix capabilities for enums in Rev32, sec 3.3-3.20
David Neto [Fri, 2 Oct 2015 21:10:10 +0000 (17:10 -0400)]
Fix capabilities for enums in Rev32, sec 3.3-3.20

8 years agoMove AutoText and EnumCase into spvtest namespace
David Neto [Thu, 1 Oct 2015 20:58:17 +0000 (16:58 -0400)]
Move AutoText and EnumCase into spvtest namespace

Also fix using declaration order.
Also put a few tests into the anonymous namespace.

8 years agoUpdate readme: Finish assembler !<integer> support
David Neto [Thu, 1 Oct 2015 21:28:56 +0000 (17:28 -0400)]
Update readme: Finish assembler !<integer> support

Also internal cleanups and additional tests.

8 years agoTest operand-table capabilities.
Dejan Mircevski [Fri, 2 Oct 2015 05:35:19 +0000 (01:35 -0400)]
Test operand-table capabilities.

8 years agoAdd TODO for fixing endianness testing.
David Neto [Thu, 1 Oct 2015 20:43:08 +0000 (16:43 -0400)]
Add TODO for fixing endianness testing.

Currently it uses a union, a write to one field, and read from
another of a different type.

Moves the endianness-determining macro close to the variable
it references.

8 years agoTest SPV_CAPABILITY_AS_MASK macro
David Neto [Thu, 1 Oct 2015 17:46:38 +0000 (13:46 -0400)]
Test SPV_CAPABILITY_AS_MASK macro

8 years agoUse 3-arg MakeInstruction to reduce logic in tests
David Neto [Thu, 1 Oct 2015 15:24:11 +0000 (11:24 -0400)]
Use 3-arg MakeInstruction to reduce logic in tests

Avoids open-coded vector inserts and two variables in various
tests.  Should improve readability.

8 years agoTest opcode table capability entries.
Dejan Mircevski [Thu, 1 Oct 2015 13:43:05 +0000 (09:43 -0400)]
Test opcode table capability entries.

8 years agoMake capabilities a bitfield in opcode/operand tables.
Dejan Mircevski [Wed, 30 Sep 2015 20:42:34 +0000 (16:42 -0400)]
Make capabilities a bitfield in opcode/operand tables.

8 years agoCreate spv_language_capabilities_t and widen capabilities fields.
Dejan Mircevski [Wed, 30 Sep 2015 14:35:26 +0000 (10:35 -0400)]
Create spv_language_capabilities_t and widen capabilities fields.

If this is acceptable, I'll do a wholesale switch of operand and opcode
definitions to capability bitfields.

8 years agoAdd assembler test for OpEnqueueKernel.
David Neto [Wed, 30 Sep 2015 15:44:34 +0000 (11:44 -0400)]
Add assembler test for OpEnqueueKernel.

Adds a form of spvtest::MakeInstruction which takes two vectors
of operands.  That leads to simpler test code.
We can clean up some other test code, in another CL.

8 years agoClarify !<integer> parsing.
Dejan Mircevski [Wed, 30 Sep 2015 13:49:00 +0000 (09:49 -0400)]
Clarify !<integer> parsing.

Implement some outstanding feedback from
Ic29c5a4a8178a62a5a1acad13d02f19cc1307097:

 - use "token" instead of "word" when referring to assembly text

 - specify how the numbers are parsed

Add a test for negative numbers.

8 years agoTry to fix the Android build.
Dejan Mircevski [Tue, 29 Sep 2015 21:58:37 +0000 (17:58 -0400)]
Try to fix the Android build.

8 years agoDetect overflow in !<integer>.
Dejan Mircevski [Tue, 29 Sep 2015 21:07:21 +0000 (17:07 -0400)]
Detect overflow in !<integer>.

8 years agoAdd a .csv showing test coverage for operand class
David Neto [Tue, 29 Sep 2015 18:22:02 +0000 (14:22 -0400)]
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.

8 years agoSimplify (and test) the alternate-parsing pattern.
Dejan Mircevski [Tue, 29 Sep 2015 14:38:18 +0000 (10:38 -0400)]
Simplify (and test) the alternate-parsing pattern.

8 years agoAssembly test for OpSwitch
David Neto [Mon, 28 Sep 2015 19:02:21 +0000 (15:02 -0400)]
Assembly test for OpSwitch

Removes old weak and fragile tests for OpSwitch.

Adds spvtest::TextToBinaryTest::CompileWithFormatFailure

8 years agoAssembly failure cases for OpMemoryBarrier
David Neto [Mon, 28 Sep 2015 20:00:42 +0000 (16:00 -0400)]
Assembly failure cases for OpMemoryBarrier

Fully tests OperandMemorySemantics from the syntax table.

8 years agoAssembler failing cases for OpCapability
David Neto [Mon, 28 Sep 2015 20:14:28 +0000 (16:14 -0400)]
Assembler failing cases for OpCapability

8 years agoDocument non-use of certain operand types
David Neto [Mon, 28 Sep 2015 19:33:49 +0000 (15:33 -0400)]
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.

8 years agoRefactored dynamic and static state out of text processing.
Andrew Woloszyn [Thu, 24 Sep 2015 14:26:51 +0000 (10:26 -0400)]
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.

8 years agoRun clang-format.
Dejan Mircevski [Tue, 29 Sep 2015 14:56:32 +0000 (10:56 -0400)]
Run clang-format.

8 years agoImplement alternate-parsing mode for !<integer>.
Dejan Mircevski [Mon, 28 Sep 2015 21:04:39 +0000 (17:04 -0400)]
Implement alternate-parsing mode for !<integer>.

8 years agoReadme: capabilities for instructions are ok
David Neto [Mon, 28 Sep 2015 20:47:21 +0000 (16:47 -0400)]
Readme: capabilities for instructions are ok

Capabilities for enumerants may be out of date.

8 years agoUpdated syntax.md to remove references to % numerical ids.
Andrew Woloszyn [Mon, 28 Sep 2015 15:09:23 +0000 (11:09 -0400)]
Updated syntax.md to remove references to % numerical ids.

8 years agoRemove isIdType(), which is now dead code.
Dejan Mircevski [Mon, 28 Sep 2015 19:13:15 +0000 (15:13 -0400)]
Remove isIdType(), which is now dead code.

8 years agoTest bad 2nd target to OpGroupMemberDecorate
David Neto [Mon, 28 Sep 2015 18:40:10 +0000 (14:40 -0400)]
Test bad 2nd target to OpGroupMemberDecorate

8 years agoAssembly test for OpGroupMemberDecorate
David Neto [Mon, 28 Sep 2015 18:09:29 +0000 (14:09 -0400)]
Assembly test for OpGroupMemberDecorate

Provides test coverage for OperandVariableIdLiteral
from the syntax table in the file 'opcode.inc'.

8 years agoUncomment some !<integer> tests.
Dejan Mircevski [Mon, 28 Sep 2015 15:51:32 +0000 (11:51 -0400)]
Uncomment some !<integer> tests.

8 years agoCleanup: Use EnumCase in OpDecorateSimpleTest
David Neto [Mon, 28 Sep 2015 15:37:57 +0000 (11:37 -0400)]
Cleanup: Use EnumCase in OpDecorateSimpleTest

8 years agoCleanup: Use EnumCase for ExecutionMode test
David Neto [Mon, 28 Sep 2015 15:22:23 +0000 (11:22 -0400)]
Cleanup: Use EnumCase for ExecutionMode test

8 years agoAssembler test for optional operands of OpSource
David Neto [Mon, 28 Sep 2015 14:56:16 +0000 (10:56 -0400)]
Assembler test for optional operands of OpSource

These are the first tests to cover OperandOptionalId
and OperandOptionalLiteralString from the grammar in
opcode.inc

8 years agoRemove SPV_OPERAND_TYPE_LITERAL
David Neto [Fri, 25 Sep 2015 18:23:29 +0000 (14:23 -0400)]
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.

8 years agoDissasembler test showing reordering of masks
David Neto [Fri, 25 Sep 2015 18:52:17 +0000 (14:52 -0400)]
Dissasembler test showing reordering of masks

8 years agoExecution scope, memory semantics operands are IDs
David Neto [Fri, 25 Sep 2015 17:56:09 +0000 (13:56 -0400)]
Execution scope, memory semantics operands are IDs

They shouldn't be parsed or printed as masks.

8 years agoDisassembler support for mask expressions.
David Neto [Fri, 25 Sep 2015 16:43:37 +0000 (12:43 -0400)]
Disassembler support for mask expressions.

8 years agoUpdate Readme: Support Rev32; IDs never alias
David Neto [Thu, 24 Sep 2015 14:47:08 +0000 (10:47 -0400)]
Update Readme: Support Rev32; IDs never alias

8 years agoMemory semantics Relaxed is a synonym for None
David Neto [Fri, 25 Sep 2015 14:30:27 +0000 (10:30 -0400)]
Memory semantics Relaxed is a synonym for None

The disassembler should prefer to print Relaxed,
I think. (Untested.)

8 years agoAssembler tests for remaining Debug instructions
David Neto [Thu, 24 Sep 2015 21:11:15 +0000 (17:11 -0400)]
Assembler tests for remaining Debug instructions

OpString, OpName, OpMemberName, OpLine, OpNoLine,
OpSourceContinued.

8 years agoUpdate core instruction syntax to Rev32
David Neto [Thu, 24 Sep 2015 19:45:59 +0000 (15:45 -0400)]
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.

8 years agoAssembler test TODOs for image instructions.
David Neto [Thu, 24 Sep 2015 21:10:35 +0000 (17:10 -0400)]
Assembler test TODOs for image instructions.

8 years agoAssembler supports new decorations in Rev32
David Neto [Wed, 23 Sep 2015 18:59:27 +0000 (14:59 -0400)]
Assembler supports new decorations in Rev32

They are:
 - NoContraction
 - InputTargetIndex
 - Alignment

8 years agoRev32: Remove DepthAny and mark Xfb as requiring TransformFeedback.
Lei Zhang [Wed, 23 Sep 2015 21:09:01 +0000 (17:09 -0400)]
Rev32: Remove DepthAny and mark Xfb as requiring TransformFeedback.

8 years agoFix Capability dependencies on capabilities, Rev32
David Neto [Wed, 23 Sep 2015 20:04:24 +0000 (16:04 -0400)]
Fix Capability dependencies on capabilities, Rev32

8 years agoAssembler support for new capabilities in Rev32
David Neto [Wed, 23 Sep 2015 19:44:02 +0000 (15:44 -0400)]
Assembler support for new capabilities in Rev32

8 years agoSupport Image operand MinLod
David Neto [Wed, 23 Sep 2015 18:32:37 +0000 (14:32 -0400)]
Support Image operand MinLod

8 years agoAssembler supports new builtins in Rev32
David Neto [Wed, 23 Sep 2015 19:35:27 +0000 (15:35 -0400)]
Assembler supports new builtins in Rev32

They are VertexIndex and InstanceIndex.

8 years agoAssembler support for Nontemporal memory access
David Neto [Wed, 23 Sep 2015 19:38:59 +0000 (15:38 -0400)]
Assembler support for Nontemporal memory access