steve-lunarg
8b0227ced9
HLSL: phase 3b: Texture methods remember and return vector size.
...
Also makes a (correct) test change for global -> temp vars.
2016-10-14 18:44:32 -06:00
steve-lunarg
4f2da27aec
HLSL: phase 3a: Add sub-vec4 rwtexture formats (qualifier.layoutFormat)
...
This PR sets the TQualifier layoutFormat according to the HLSL image type.
For instance:
RWTexture1D <float2> g_tTex1df2;
becomes ElfRg32f. Similar on Buffers, e.g, Buffer<float4> mybuffer;
The return type for image and buffer loads is now taken from the storage format.
Also, the qualifier for the return type is now (properly) a temp, not a global.
2016-10-14 18:44:32 -06:00
steve-lunarg
07830e805b
HLSL: phase 2d: minor cleanup, & allow operator[] on non-rw textures
...
Improve comments.
A few tweaked lines allow [] on non-rw tx. Add test case for this.
Improve VectorTimesScalar handling.
2016-10-12 12:39:44 -06:00
steve-lunarg
90707966ea
HLSL: phase 2b: add l-value operator[] for RWTexture/RWBuffer
...
This commit adds l-value support for RW texture and buffer objects.
Supported are:
- pre and post inc/decrement
- function out parameters
- op-assignments, such as *=, +-, etc.
- result values from op-assignments. e.g, val=(MyRwTex[loc] *= 2);
Not supported are:
- Function inout parameters
- multiple post-inc/decrement operators. E.g, MyRWTex[loc]++++;
2016-10-12 12:39:44 -06:00
steve-lunarg
bb0183f817
HLSL: phase 1: add RWTexture and RWBuffer
...
There's a lot to do for RWTexture and RWBuffer, so it will be broken up into
several PRs. This is #1 .
This adds RWTexture and RWBuffer support, with the following limitations:
* Only 4 component formats supported
* No operator[] yet
Those will be added in other PRs.
This PR supports declarations and the Load & GetDimensions methods. New tests are
added.
2016-10-06 10:51:52 -06:00
John Kessenich
f571d0c037
Non-functional: Use isOpaque() instead of compare against EbtSampler.
2016-10-01 12:35:01 -06:00
John Kessenich
6dbc0a7a33
Support a uniform block to hold global uniform variables.
...
Used initially just by HLSL, for $Global. Could be an option
for GLSL -> Vulkan.
2016-09-29 10:25:15 -06:00
John Kessenich
e82061de08
HLSL: Rationalize combination of type arrayness and name arrayness.
2016-09-29 10:25:15 -06:00
steve-lunarg
265c0618b1
HLSL: allow implicit array sizing.
...
In HLSL array sizes need not be provided explicitly in all circumstances.
For example, this is valid (note no number between the [ ]):
// no explicit array size
uniform float g_array[] = { 1, 2, 3, 4, 5 };
This PR does not attempt to validate most invalid cases.
A new test is added to verify the resulting linker objects.
2016-09-27 14:28:26 -06:00
John Kessenich
10f7fc739c
HLSL: Reverse what the driver is told about row/column majorness, matching the row-column reversal.
2016-09-25 20:26:03 -06:00
John Kessenich
a1e2d4952e
HLSL: Move to correct parsing of annotations, improving all annotations and recent string grammar.
2016-09-20 13:22:58 -06:00
John Kessenich
86f7138706
HLSL: Add string basic type and recognize string declaration grammar.
...
This includes the "< decl ; decl ; >" syntax which has its own namespace.
This functionality is not implemented, just silently accepted.
2016-09-19 20:29:45 -06:00
John Kessenich
34e7ee79bb
HLSL: Improve setting and testing of interpolation qualifiers.
...
Notably, use of 'linear' on a non-input could mark it as an input.
2016-09-16 18:05:44 -06:00
John Kessenich
d21baed6bc
HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
2016-09-16 03:20:03 -06:00
steve-lunarg
297ae211f1
WIP: HLSL: Treat HLSL rows as GLSL columns.
...
WIP: HLSL: EOpGenMul arg reversal
2016-09-09 12:02:42 -06:00
John Kessenich
cfd7ce87cd
HLSL: Support register(..., spaceN) for setting the descriptor set.
...
This was suggested in issue #454 .
2016-09-05 16:03:45 -06:00
John Kessenich
e3218e270e
HLSL: Accept layout(...) also as a post-decl. Issue #454 .
2016-09-05 14:37:03 -06:00
John Kessenich
7735b94403
HLSL Non-Functional: Move to more robust capturing of postDecls into a qualifier.
...
This will prevent a possible future defect of thinking the type can be changed,
where there is a code path today that would drop that change.
2016-09-05 12:40:06 -06:00
John Kessenich
b804de605c
HLSL: Track binding numbers to struct instances; fixes issue #496 .
2016-09-05 12:19:18 -06:00
John Kessenich
841db35bb3
HLSL: Fix issue #442 , smear and truncate shape conversions for == and !=.
2016-09-02 21:12:23 -06:00
John Kessenich
9e079535a0
HLSL: Handle greater/less depth modes. Fixes issue #489 .
2016-09-02 20:05:52 -06:00
John Kessenich
a305166ea4
HLSL: Error if funcion with return type doesn't return a value.
2016-09-02 19:13:36 -06:00
John Kessenich
1a4b775cd5
HLSL: Correct line numbers for function definitions.
2016-09-02 19:05:24 -06:00
John Kessenich
81d4714908
Merge branch 'HLSL_Semantic_Mapping' of https://github.com/dankbaker/glslang into dankbaker-HLSL_Semantic_Mapping
2016-08-29 16:07:29 -06:00
John Kessenich
b9e39120b4
HLSL: Partially address issue #463 : accept GLSL layout(...).
...
This includes all "per variable" layout qualifiers, but the
key ones mattering and tested for now are:
set=
binding=
constant_id=
push_constant
2016-08-17 17:38:45 -06:00
steve-lunarg
c4a1307403
HLSL: add implicit promotions for assignments and function returns.
2016-08-09 13:48:47 -06:00
John Kessenich
267590d452
Whitespace: Nonfunctional: fix inconsistent white space, esp. no tabs.
2016-08-05 17:34:34 -06:00
Dan Baker
c7e501613a
Commenting out attempt to parse DX9 samplers, since this is imcompatible with DX10+ shaders
2016-08-05 14:52:38 -04:00
steve-lunarg
cb88de5e5e
HLSL: allow semicolons between global scope declarations.
2016-08-03 07:08:06 -06:00
steve-lunarg
fe5a3ff2f3
HLSL: allow trailing commas in initializer lists & scalar initialization
2016-07-30 10:47:33 -06:00
John Kessenich
b38f071605
HLSL: Add back in the [subcomponent] part of a 'register' decl.
2016-07-30 10:30:51 -06:00
steve-lunarg
5964c64b2a
HLSL: Fix a grammar error related to constructors in parenthetical expressions
2016-07-30 08:09:09 -06:00
John Kessenich
96e9f47cbb
HLSL: Implement the register production.
2016-07-29 14:28:39 -06:00
John Kessenich
82d6baf86f
HLSL: Implement packoffset production.
2016-07-29 13:03:50 -06:00
John Kessenich
64076ed7e9
HLSL: Fix binary-expression associativity and termination issue.
2016-07-28 21:48:25 -06:00
John Kessenich
fea226ba43
HLSL: Add shape conversions for scalar -> vector assigments.
...
Also, this allows turning on the error check for a failed assigment
when parsing.
This makes 39 HLSL tests have a working assignment that was previously
silently dropped, due to lack of this functionality.
2016-07-28 18:41:20 -06:00
John Kessenich
c552aece83
Merge pull request #417 from steve-lunarg/buffers
...
HLSL: add Buffer support for Load method
2016-07-28 16:56:39 -06:00
steve-lunarg
2de329112b
HLSL: allow uint literals, and add test for numeric suffixes
2016-07-28 14:49:48 -06:00
steve-lunarg
d53f717fd3
HLSL: add Buffer support for Load method
2016-07-27 15:57:31 -06:00
John Kessenich
00957f8110
HLSL: Implement ?: grammar productions.
...
Missing are implicit conversions between int/bool/etc.
2016-07-27 10:39:57 -06:00
John Kessenich
b783d712ab
HLSL: Report failed assignments; some were silently not happening.
...
Starting out with this turned off, so tests can be locally fixed,
then will turn it on.
2016-07-27 10:31:11 -06:00
John Kessenich
3d157c510f
HLSL: cbuffer and tbuffer grammar and production.
2016-07-25 16:05:33 -06:00
LoopDawg
a78b02941b
HLSL: Add SampleCmp and SampleCmpLevelZero texture methods
2016-07-20 09:57:03 -06:00
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
LoopDawg
9249c709b0
HLSL: add in/out/inout qualifiers.
2016-07-12 20:50:34 -06:00
LoopDawg
4886f69734
HLSL: Sampler/texture declarations, method syntax, partial Sample method
2016-07-12 15:57:46 -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