2242 Commits

Author SHA1 Message Date
John Kessenich
01de90bb1c Merge pull request #339 from steve-lunarg/intrinsics
HLSL: Implement atomic ops, bit conversions, fix minor intrinsics bugs
2016-06-14 10:56:50 -06:00
David Neto
ec1476b706 Tracking allocator must use const key
Fixes TMap template.

This is required to build with newer libc++ versions that have a static
assert on const-ness of value_type
2016-06-14 12:15:59 -04:00
LoopDawg
589107095c Implement atomic ops, bit conversions, fix fwidth stage mask, fix saturate dest modifier. 2016-06-13 20:50:36 -06:00
John Kessenich
cd784bc561 Merge pull request #337 from steve-lunarg/intrinsics
HLSL: Add decompositions for some intrinsics.
2016-06-13 08:54:45 -06:00
Nekotekina
5dd29c8a97 Compilation fix (mingw64) 2016-06-13 11:25:18 +03:00
LoopDawg
592860cae5 Add decompositions for some HLSL intrinsics. 2016-06-10 17:11:18 -06:00
Jason Ekstrand
228546a8af Types: Add an isOpaque() helper 2016-06-08 17:22:43 -07:00
John Kessenich
95d85ce0ca Merge pull request #331 from jherico/jherico-patch-1
Build: Fix Ubuntu 16.10 build
2016-06-07 18:07:12 -06:00
Brad Davis
880bf36cac Fix Ubuntu 16.10 build 2016-06-07 16:23:44 -07:00
John Kessenich
80cb324ff6 Front-end: Fix issue #146: which versions allow double in/out. 2016-06-05 18:52:05 -06:00
John Kessenich
133253b6ee Front-end: Fix issue #147: ensure layout(index=N) has N in [0,1]. 2016-06-05 17:25:34 -06:00
John Kessenich
119f8f6906 HLSL: Flesh out the loop grammar and productions. 2016-06-05 15:44:07 -06:00
LoopDawg
4b67732c13 Initial implementation of direct-mapped subset of HLSL intrinsics with type subset.
This checkin implements about half of the HLSL intrinsics for a subset of their
entire type support (but a useful subset).  The uncommented lines in
TBuiltInParseablesHlsl::identifyBuiltIns shows which are connected.
2016-06-03 08:28:29 -06:00
John Kessenich
548c3adecd Front-end: Complete GL_ARB_compute_shader, previous commit was missing new barriers.
This amends the previous commit, which ommitted barriers in version 420 for compute shader.
2016-05-30 19:38:39 -06:00
John Kessenich
d94c003fb7 Front-end: Complete GL_ARB_compute_shader implementation.
Core compute shaders were working, but the extension wasn't implemented.
2016-05-30 19:29:40 -06:00
John Kessenich
0f5e3ad23c Fix issue #313: Catch internal attempts to modify built-in symbols that don't exist.
Also beefed up support for running compute shaders is #version 420, but this
work is only partially done.
2016-05-29 18:24:31 -06:00
John Kessenich
5a7f0eff69 Merge pull request #230 from dekimir/incresconst
Make two more IncludeResult members const.
2016-05-25 17:43:54 -06:00
Thomas Perl
7bfd08d21c Check for linking multiple ES shaders to the same stage 2016-05-25 09:26:43 +02:00
Thomas Perl
b40a6d6b40 Use version/profile from first compilation stage
When linking multiple compilation units per shader stage,
the code creates a new intermediate, but fails to set its
version and profile.

This change makes it so that the new intermediate inherits
the version and profile of the first compilation unit, so
that two ES SL compilation units can be combined.
2016-05-24 13:24:24 +02:00
John Kessenich
0c968f9d0e Merge pull request #306 from johnkslang/finish-spec-const-semantics
Vulkan: Finish semantics for what creates spec-const-semantics.
2016-05-23 23:37:39 -06:00
John Kessenich
d82c906378 Vulkan: Finish semantics for what creates spec-const-semantics.
Note: This required adding a new test mode to see the AST for vulkan tests.
This also required reworking some deeper parts of type creation, regarding
when storage qualification and constness is deduced bottom-up or dictated
top-down.
2016-05-23 23:10:18 -06:00
LoopDawg
0ae28ea647 Add base class TParseables for intrinsic / builtin generation.
Add stubbed HLSL derivation.  GLSL derivation is still called TBuiltIns,
for historical compatibility.
2016-05-23 15:44:53 -06:00
John Kessenich
2921e0c54a KHR_vulkan_glsl: name mangle distinguish pure textures.
Fixes issue #252.
2016-05-20 16:59:27 -06:00
John Kessenich
393d74f068 Merge pull request #300 from Qining/fix-slow-down-in-no-contraction-propagation
Fix the slow down in noContraction propagation
2016-05-20 13:44:07 -06:00
qining
507308b26d remove redundant 'return false' 2016-05-20 14:30:38 -04:00
John Kessenich
8d72f1a2c4 Full stack: distinguish between a scalar and a vector of size 1.
There have been GLSL extensions considering this, and HLSL does it.
This is a fully backward compatible change that allows this distinction.
2016-05-20 12:14:39 -06:00
qining
e5712a2549 Fix the slow down in noContraction propagation 2016-05-20 14:11:28 -04:00
Thomas Perl
00852b12d9 Remove declaration for ShGetPhysicalAttributeBindings
The function ShGetPhysicalAttributeBindings() is declared in the
header, but not defined (or referenced) anywhere in the codebase.
2016-05-19 22:19:58 +02:00
John Kessenich
b5cfd79f0a Merge pull request #288 from thp/attribute-reflection
Reflection: Add support for querying vertex attributes in reflection API
2016-05-19 10:13:08 -06:00
Thomas Perl
d6e1a5b1f8 Add support for querying vertex attributes in reflection API 2016-05-19 09:16:19 +02:00
Rex Xu
3d9165fde4 Parser: Redeclaration of gl_CullDistance is disallowed mistakenly. 2016-05-19 12:26:27 +08:00
John Kessenich
9af54c3337 Non-functional: Fix some comments English and brace formatting in recent merges. 2016-05-17 10:24:00 -06:00
baldurk
6b32ae18fa Compile fix - if _MSC_VER is undefined, _MSC_VER < 1700 is true! 2016-05-17 01:38:56 +02:00
baldurk
a8018b8ee5 [VS2010] Define strtoll() and atoll() functions 2016-05-17 01:28:44 +02:00
baldurk
bf2c88b6d1 [VS2010] Locally define std::to_string on VS2010 as well as android 2016-05-17 01:24:04 +02:00
baldurk
786cf4dc48 [VS2010] Change "using X = Y;" to "typedef Y X;" 2016-05-17 01:20:12 +02:00
John Kessenich
7fde8bc2a9 Merge pull request #281 from amdrexu/bugfix
Parser: Add missing vector relational functions for double type.
2016-05-16 16:47:51 -06:00
baldurk
f2d75f76e5 Use DetachThreadLinux wrapper on android
* Fixes a warning - static function being defined but not used.
* Just in case any more code is added to DetachThreadLinux, this will go
  through the same path on both platforms.
2016-05-14 14:57:41 +02:00
Rex Xu
62dda787c7 Parser: Add missing vector relational functions for double type. 2016-05-14 14:21:16 +08:00
John Kessenich
9db3117e38 Merge pull request #278 from greg-lunarg/greg-mr3
Build: fix for -Werror=non-virtual-dtor for Android system builds
2016-05-12 16:51:15 -06:00
John Kessenich
36962c7ab7 Merge pull request #276 from amdrexu/bugfix
Parser: Redeclare gl_ClipDistance/gl_CullDistance should update their array sizes.
2016-05-12 14:22:56 -06:00
GregF
2713ed735d fix for -Werror=non-virtual-dtor for Android system builds 2016-05-11 14:46:48 -06:00
Rex Xu
827b23b8a1 Parser: Redeclare gl_ClipDistance/gl_CullDistance should update their array sizes. 2016-05-11 15:50:41 +08:00
Lei Zhang
20daa7f64a Use strtoul instead of stoul for Android. 2016-05-10 13:38:08 -04:00
John Kessenich
3357d870e4 Merge pull request #222 from Qining/support-precise
Full stack: Support *precise* qualifier
2016-05-09 20:18:33 -06:00
John Kessenich
7b3096a93d Merge pull request #270 from scyganINTEL/bitfield_buildins
Use proper precision qualifiers for bitfield build-in functions on ES
2016-05-09 20:17:40 -06:00
qining
e543cc35e9 remove double underscore 2016-05-09 21:38:42 -04:00
qining
bb0ac54660 Rebase to d3d3ce7160001846ede74978954e67f4f9fd84e4,update comments, rename a member variable name, fix format issue 2016-05-09 21:19:39 -04:00
GregF
5bdf49cdc8 fix check for non-positive array size 2016-05-09 17:07:04 -06:00
scygan
9c56d84b73 Use proper precision qualifiers for bitfield build-in functions on ES
This change causes ES shaders to precision qualifiers for build-in functions as defined in ESSL spec. It especially mattersfor functions that are defined as highp or taking a highp.

Fixes vulkanCTS dEQP-VK.glsl.builtin.function.integer.bitfieldreverse.*, where bitfieldReverse() retval was wrongly marked as RelaxedPrecision.

Note: floatBitsToInt/floatBitsToUInt precision is also broken, but in different way - so it is not addressed here.
2016-05-09 17:51:25 +02:00