Граф коммитов

979 Коммитов

Автор SHA1 Сообщение Дата
Marcelo Lopez Ruiz 784173740a
adds support for specifying UI size on command line (#950) 2018-01-05 18:09:41 -08:00
Lei Zhang 2387f691e2
[spirv] Pull in bug fixes and disable CCP in optimization (#971) 2018-01-05 20:21:13 -05:00
Ehsan eeab612da9
[spirv] 16-bit and 64-bit int, uint, and float. (#966)
* [spirv] 16-bit and 64-bit int, uint, and float.

* Added Int64, Uint64, Int16, Uint16.
* Added 16-bit float constants.
* Get the -enable-16bit-types cmd option.
* Add tests for constant Int64/Uint64/Int16/etc.
2018-01-05 16:52:15 -05:00
Lei Zhang 273e2a45af
[spirv] Fix static variable init from different storage class (#969)
If the initializer is in a different storage class, we sometimes
need to decompose it and assign basic components recursively.

Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/968
2018-01-05 10:59:47 -05:00
Young Kim 1d48a06455
Add validation to check unknown function attributes (#963) 2018-01-04 17:01:10 -08:00
Xiang Li 08fbc64c2a
Insert store for incoming value of phi after insert load for phi use. (#964) 2018-01-04 16:14:01 -08:00
Lei Zhang 842749dae7
[spirv] Adjust legalization detection checks (#965)
Instead of checking whether the function signature contains
some opaque types, we check in storeValue(). Since all function
argument evaluation and value return calls storeValue().
2018-01-04 17:21:18 -05:00
Lei Zhang 7ff9ae75e8
[spirv] Refresh dependencies and fix ldexp() translation (#962)
We cannot use GLSL extended instruction Ldexp for ldexp() since
they have different type requirements on the exponent parameter.
2018-01-04 14:34:36 -05:00
Ehsan 5f0b2c7dc1
[spirv] Update the handling of literal types. (#954)
* [spirv] Update the handling of literal types.

Try to figure out what is the intended usage for a literal type (e.g.
'literal int' or 'literal float').

Provide a hint to the TypeTranslator and translateAP{Int|Float} methods
so they better reflect the usage of literal types.
2018-01-04 13:35:56 -05:00
Lei Zhang b3c7bb1a47
[spirv] Validate generated SPIR-V and support -Vd to disable (#955) 2018-01-04 11:59:03 -05:00
Lei Zhang 578b0df014
[spirv] Support embedded struct definition in cbuffer/tbuffer (#953)
Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/952
2018-01-03 11:54:03 -05:00
Lei Zhang d39c94c56f
[spirv] Emit warning for packoffset (#951)
We do not support packoffset right now. Emit warning and ignore it.
2018-01-03 10:13:04 -05:00
Lei Zhang 4bee20cac9
[spirv] Legalization: use CCP and enable on HS/DS/GS (#948) 2017-12-21 16:20:52 -05:00
Ehsan 6887b565f4
[spirv] Fix the return type of OpSelect. (#947) 2017-12-21 13:40:42 -05:00
Lei Zhang dfa66b6b9a
[spirv] Refresh SPIRV-Tools and update legalization pass recipe (#946) 2017-12-21 10:44:56 -05:00
Ehsan 5362b3597b
[spirv] Handle GetDimension methods w/ float args. (#944) 2017-12-21 10:20:46 -05:00
Lei Zhang f9b53ba663
[spirv] Emit fatal error for failing to find counter variable (#939) 2017-12-20 20:35:58 -05:00
Lei Zhang 420e638d87
[spirv] Fix ConstantBuffer/TextureBuffer assignment (#929)
Assigning a ConstantBuffer<T> to a T is indeed a copy.
2017-12-20 20:31:55 -05:00
Lei Zhang a269cf44fe
[spirv] Emit counter variables for alias structured/byte buffers (#923)
Also handled updating counter variable aliases in assignment and
function calls.
2017-12-20 20:27:57 -05:00
Lei Zhang eaa3e8e26f
[spirv] Emit alias structured/byte buffer as pointer to pointer (#918)
This is to aid legalization passes to do their work.

For non-external variables of the following types

* (RW)StructuredBuffer
* (RW)ByteAddressBuffer
* AppendStructuredBuffer
* ConsumeStructuredBuffer

An extra level of pointer is applied. We use this extra level of
pointer to indicate that they are aliases. Loads and stores of
these alias variables will get the pointers of the aliased-to-
variables.

Associated counters is not handled in this commit.
2017-12-20 20:23:10 -05:00
Lei Zhang cf39455abf
[spirv] Update doc about variable storage classes (#945) 2017-12-20 18:34:25 -05:00
Lei Zhang 9316ec211f
[spirv] Test atomic intrinsics on primitive types in CS (#943)
Interlocked*() can only be performed on int or uint typed resources
and shared memory variables.
2017-12-20 16:18:06 -05:00
Lei Zhang c1991aadc8
[spirv] Fix static function variable initialization (#942)
Static function variable should be initialized once. We were
emitting if checks to make sure that but got the branch wrongly
flipped.
2017-12-20 14:03:46 -05:00
Xiang Li b816c124f1
Support resource select for lib profile. (#940) 2017-12-20 10:47:29 -08:00
Justin Holewinski 9ebf135f7d Update NV section of README to reflect r387 (#941)
The r387 driver series is the first to support DXIL
in release mode on Win10 FCU and later.
2017-12-20 05:33:03 -08:00
Xiang Li ba844c25fe
Support local resource array which don't have dynamic indexing. (#938) 2017-12-19 15:29:11 -08:00
Ehsan fc52dbced0
[spirv] Document missing pow2 partitioning feature. (#937)
* [spirv] Document missing pow2 partitioning feature.
* Provide more accurate location for attributes.
2017-12-19 13:37:48 -05:00
Ehsan cb4e570b82
[spirv] warn {row|col}_major on standalone matrix. (#935) 2017-12-18 16:48:16 -05:00
Lei Zhang 1c498f3743
[spirv] Allow indexing into temporary struct (#934)
Also added a method for creating temporary variables.
2017-12-18 14:23:49 -05:00
Ehsan 8c5a38ba22
[spirv] Fix Memory Barrier mappings to SPIR-V. (#917) 2017-12-18 14:07:45 -05:00
Ehsan 9a502c0e10
[spirv] Fix image sample instruction return types. (#932) 2017-12-18 10:26:59 -05:00
Sebastian Tafuri 1a45ed822a [spirv] Add support for vk::offset attribute (#922)
Added support for the vk::offset attribute to manually
specify offsets for struct members.

This commit only handles non-nested structs and it
does not validate the offset provided either.
2017-12-15 14:06:42 -08:00
Lei Zhang ec8dc62320
[spirv] Fix vector casting that can be const-evaluated (#931)
For vector casting that can be const-evaluated, we need to call
tryToEvaluateAsConst(). Previously we only handled the scalar
case.
2017-12-15 13:04:21 -08:00
Xiang Li db99efe397
Support resource select inside loop. (#930)
Also fix scalarizer fail when scattered element is null.
2017-12-15 11:33:03 -08:00
Lei Zhang dfff2c0e15
[spirv] Fix wrong type when casting bool to literal int (#928) 2017-12-15 09:27:37 -08:00
Young Kim ecdde943f7
Fix microcom and build issues, add missing .rc files
- fix microcom.h macros to allow for custom constructor and other issues
- fix 32/64-bit build issues in ShaderOpTest
- add missing .rc files for dxl, dxlib_sample, and dxc_batch
2017-12-14 18:38:53 -08:00
Tex Riddell bf258eb98e
Fix ValidationTest failure when DXIL.dll present (SV_IsFrontFace type change) (#927) 2017-12-14 17:56:54 -08:00
Tex Riddell b8628000aa
type_traits.h: Support isPodLike for _MSC_VER >= 1900 (#925) 2017-12-14 14:41:00 -08:00
Xiang Li be1e6b130e
More fix for integer cbuffer variable has init val. (#924) 2017-12-14 14:02:13 -08:00
Young Kim 6c998fda25
- Add int16, uint16 execution tests (#920)
- Add enable-16-bit-types argument to half test shaders
2017-12-14 11:33:59 -08:00
Xiang Li 6539689175
Make sure default val for cbuffer element is ignored. (#921) 2017-12-14 09:24:33 -08:00
Xiang Li 4f7016af53
Support isfrontface as uint. (#919) 2017-12-13 20:41:51 -08:00
Young Kim bf911b1d22
Add 16bit integers to Any IntrinsicCompTypes and for existing UInt3264 comp types. (#913) 2017-12-13 13:44:10 -08:00
Lei Zhang 08355c1764
[spirv] Early return for non-function call (#916) 2017-12-13 10:59:59 -08:00
Ehsan 4561cb9ea1
[spirv] Temporary struct/class object method call. (#912) 2017-12-13 08:50:50 -05:00
Xiang Li 0790e03364
Remove stacksave and stackstore. (#914) 2017-12-12 18:50:01 -08:00
Young Kim ecf0307963
Half tests (#911)
- Adding half tests for unary,binary,tertiary math operations
- Add 'exec-future' option for hcttest
2017-12-12 15:12:19 -08:00
Ehsan 1d4509f35d
[spirv] Support Load methods that take Status arg. (#905) 2017-12-12 17:38:30 -05:00
Lei Zhang 674aa26115
[spirv] Refresh external dependency SPIRV-Tools (#910) 2017-12-12 13:34:32 -05:00
Tex Riddell 055cf27ac7
Fix re-emit metadata, and skip ViewID state for libs. (#908) 2017-12-11 21:57:00 -08:00