Commit Graph

1317 Commits

Author SHA1 Message Date
LoopDawg
5d58faecc0 HLSL: Add tx.GetDimensions method (uint returns only) 2016-07-18 16:40:21 -06:00
John Kessenich
e4821e43c8 Build: Fix three new warnings in HLSL code. 2016-07-16 10:19:43 -06:00
John Kessenich
35dcbbef8e Merge pull request #390 from steve-lunarg/samplers
HLSL: Add SampleBias and SampleGrad methods, + associated tests
2016-07-15 12:11:47 -06:00
John Kessenich
4016e38bea Build: Switch to Rev. 6 of headers, removing "BadValue" enum stuff.
Note: Technically, this is glslang's modified private copy of official headers.
Official headers will appear in other places, like
https://github.com/KhronosGroup/SPIRV-Headers.
2016-07-15 11:55:34 -06:00
LoopDawg
a2b7991497 HLSL: Add SampleBias and SampleGrad, and associated tests 2016-07-15 11:38:49 -06:00
John Kessenich
efb89a3d2e Merge pull request #392 from antiagainst/order
Build: Reorder fields to avoid compiler initialization order error.
2016-07-15 10:58:37 -06:00
Lei Zhang
b1165f49d5 Reorder fields to avoid compiler initialization order error. 2016-07-15 11:25:28 -04:00
John Kessenich
51e74b17bf Merge pull request #385 from steve-lunarg/inout-qualifiers
HLSL: add in/out/inout qualifiers
2016-07-13 15:42:48 -06:00
John Kessenich
83f05a06d0 Merge pull request #387 from steve-lunarg/samplers
HLSL: add offset Sample() form and arrayed texture support
2016-07-13 15:39:02 -06:00
LoopDawg
92aff54632 HLSL: add offset Sample() form and arrayed texture support 2016-07-13 11:58:56 -06:00
LoopDawg
9249c709b0 HLSL: add in/out/inout qualifiers. 2016-07-12 20:50:34 -06:00
John Kessenich
f02bea288f Merge pull request #380 from steve-lunarg/samplers
HLSL: Sampler/texture declarations, method syntax, partial Sample method
2016-07-12 19:47:14 -06:00
LoopDawg
4886f69734 HLSL: Sampler/texture declarations, method syntax, partial Sample method 2016-07-12 15:57:46 -06:00
John Kessenich
d8509b3367 Front-end: Implement compile-time constant folding for any() and all(). 2016-07-12 01:27:48 -06:00
John Kessenich
91b7533d70 README: remove reference to todo.txt, it is obsolete. 2016-07-11 16:30:45 -06:00
John Kessenich
a86836ede2 Front-end: Fix known crashes by early exit on error (issue #29, issue #34, issue #35).
Added -C option to request cascading errors.  By default, will exit early,
to avoid all error-recovery-based crashes.

This works by simulating end-of-file in input on first error, so no
need for exception handling, or stack unwinding, or any complex error
checking/handling to get out of the stack.
2016-07-09 14:53:11 -06:00
John Kessenich
75b0316f6a Build: Add missing string.h include. 2016-07-08 23:13:38 -06:00
John Kessenich
7f349c73db Build: Remove causes of pedantic warnings. Addresses issue #352 and PR #242. 2016-07-08 22:09:10 -06:00
John Kessenich
c45dddae5f Merge pull request #314 from mre4ce/master
Added -x option to save SPIR-V as 32-bit hexadecimal numbers to a text file.
2016-07-08 15:26:27 -06:00
John Kessenich
b501a7501c Front end: Fix issue #374: put a limit on how big a type name can get. 2016-07-08 14:49:48 -06:00
John Kessenich
78a4557621 SPV: Fix issue #376; declare Geometry capability for fragment use of gl_Layer. 2016-07-08 14:05:15 -06:00
John Kessenich
91e4aa5900 SPV: Further refine OpenGL vs. Vulkan differences for SPIR-V.
Includes adding test cases to verify the differences.
2016-07-07 19:27:15 -06:00
John Kessenich
2d0cc786f3 SPV: Turn on atomic-storage functionality for SPIR-V.
This is used by OpenGL, but not Vulkan.
Includes:
 - atomicCounter, atomicIncrement, atomicCounterDecrement
 - atomic_uint layout-offset checking
 - AtomicStorage capability
2016-07-07 17:40:35 -06:00
John Kessenich
5e69ec683d HLSL: Add typedef grammar and production. 2016-07-05 00:02:40 -06:00
John Kessenich
d5ed0b6982 HLSL: Mostly non-functional: simplify, rationalize, and generalize the declaration grammar. 2016-07-04 18:35:51 -06:00
John Kessenich
073542416c HLSL: Grammar: Recognize { } style initializers for composites. 2016-07-01 19:58:06 -06:00
John Kessenich
b0a63f578a HLSL: Correctly identify which variables are global storage class. 2016-07-01 19:35:53 -06:00
John Kessenich
532543c1c4 HLSL: Grammar: Make comma-separated declaration lists work. 2016-07-01 19:10:01 -06:00
John Kessenich
92d44b1bb2 Merge pull request #367 from steve-lunarg/templatetypes
HLSL: Add template style constructors for vector & matrix types
2016-07-01 14:15:58 -06:00
LoopDawg
6daaa4fadf HLSL: Add template style constructors for vector & matrix types 2016-07-01 13:59:36 -06:00
John Kessenich
d02dc5d05a HLSL: Implement switch/case/default. 2016-07-01 00:04:11 -06:00
John Kessenich
2f47bc9781 SPV: Don't decorate locations within an array, it doesn't make sense.
This fixes issue #360.
2016-06-30 22:00:09 -06:00
John Kessenich
6090df0fa3 SPV: Non-functional: break up big function into three smaller ones.
Also, improve variable names. This grew to be overly hard to understand.
2016-06-30 21:28:33 -06:00
John Kessenich
266b1d3e84 Merge pull request #363 from cdwfs/vertex_instance_id
Suggest gl_[Vertex,Instance]Index when gl_[Vertex,Instance]ID is encountered in Vulkan GLSL
2016-06-30 18:15:24 -06:00
John Kessenich
f5dcdf0123 Front-end: Don't lower precision of bit operations taking highp inputs.
See issue #350 for detail.  This may be an ESSL specification issue.
2016-06-30 16:46:24 -06:00
John Kessenich
ae3e77308c Merge pull request #364 from steve-lunarg/test-entrypoints
HLSL: Change intrinsics tests to not use overloaded entry points
2016-06-30 15:41:25 -06:00
LoopDawg
e903ab5f04 HLSL: Change intrinsics tests to not use overloaded entry points 2016-06-30 14:13:03 -06:00
Cort Stratton
85028e1469 When parsing Vulkan GLSL, suggest gl_VertexIndex/gl_InstanceIndex instead of gl_VertexID/gl_InstanceID. 2016-06-30 12:51:10 -07:00
John Kessenich
af151f964f Merge pull request #358 from amdrexu/bugfix
SPV: Certain decorations are missing for structure-typed in/out variables
2016-06-30 11:08:17 -06:00
Rex Xu
c884b4a47f SPV: Certain decorations are missing for structure-typed in/out variables. 2016-06-30 13:11:36 +08:00
John Kessenich
187254b92c Merge pull request #357 from steve-lunarg/intrinsics
HLSL: Add asdouble, fma, & mad intrinsics
2016-06-29 10:50:33 -06:00
John Kessenich
7c8b743599 Merge pull request #267 from antiagainst/rm-test-dup
Remove duplicated tests from the runtests script.
2016-06-29 10:47:47 -06:00
John Kessenich
bc17b0a96a Front-end: Add missing rule for function-return implicit type conversion check.
Basic (component) type conversion was done, but checking that the composite
was correct was not being done.

Fixes issue #353.
2016-06-28 23:56:31 -06:00
John Kessenich
b10feabc95 Front-end: Non-functional: Move return-value handling from .y to .cpp.
This is to make the real change needed in the next commit easier.
2016-06-28 23:54:36 -06:00
John Kessenich
1011971981 Front-end: Handle simultaneous use of SPIR-V or non-SPIR-V.
Symbol table sharing has different sets of symbols for different
versions. This needs to take into account that SPIR-V has different
symbols than non-SPIR-V.
2016-06-28 16:16:43 -06:00
Lei Zhang
48e296b18c Remove duplicated tests from the runtests script. 2016-06-28 17:54:07 -04:00
LoopDawg
1b7fd0f7b7 Add asdouble, fma, & mad intrinsics and change profile to allow doubles when parsing prototypes 2016-06-28 15:38:38 -06:00
John Kessenich
e5a807276f Merge pull request #349 from steve-lunarg/intrinsics
HLSL: Add lerp, fix sincos ret, add ret type tests, non-square mats, tx semantics
2016-06-28 15:34:11 -06:00
John Kessenich
22bca551a8 Merge pull request #354 from yavn/fix_off_by_one_limit_check
Front-end: allow max size built-in arrays like gl_ClipDistance
2016-06-28 13:24:18 -06:00
John Kessenich
5bc4d9a26f HLSL: Airplane work: break/continue/discard grammar, and decls for for/if/while. 2016-06-27 21:12:07 -06:00