|
b3070102
|
2019-10-18T16:01:34
|
|
Add SH_REMOVE_DYNAMIC_INDEXING_OF_SWIZZLED_VECTOR
This is a workaround for the webgl2 conformance test case
WebglConformance_conformance2_glsl3_vector_dynamic_indexing_swizzled_lvalue.
Dynamic indexing of swizzled lvalue like "v.zyx[i] = 0.0" is problematic on
various platforms. This removes the indexing by translating it this way:
void dyn_index_write_vec3(inout vec3 base, in int index, in float value){
switch (index) {
case (0):
(base[0] = value);
return ;
case (1):
(base[1] = value);
return ;
case (2):
(base[2] = value);
return ;
default:
break;
}
if ((index < 0))
{
(base[0] = value);
return ;
}
{
(base[2] = value);
}
}
...
dyn_index_write_vec3(v.zyx, i, 0.0);
...
Bug: chromium:709351
Change-Id: I971b38eb404209b56e6764af1063878c078a7e88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869109
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
1d02157e
|
2019-09-24T10:54:40
|
|
Only enable shader array size restrictions for HLSL
Shader arrays are currently restricted to 64K entries for all translator
back ends. This is being changed to just HLSL, since the other back
ends appear to have support for larger sizes.
Bug: angleproject:3865
Test: dEQP-GLES31.functional.compute.basic.copy_image_to_ssbo_large
Test: dEQP-GLES31.functional.compute.basic.copy_ssbo_to_image_large
Test: ComputeShaderTest.VeryLargeArrayInsideFunction/*
Change-Id: I9a9d1322e24b3206debdea6a3fd517b4d6869ed9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821943
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
90a58622
|
2019-09-04T15:39:58
|
|
Refactor ShaderVariable to Remove Specializations
The following structs are being refactored and moved into the parent
struct ShaderVariable:
VariableWithLocation
Uniform
Attribute
OutputVariable
InterfaceBlockField
Varying
Bug: angleproject:3899
Test: CQ
Change-Id: I389eb3ab4ed44a360e09fca75ecc78d64a277f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1785877
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
cd31f286
|
2019-06-25T14:22:41
|
|
Implement Draw base vertex and base instance functions
This patch implements functionality of glDrawArraysInstancedBaseInstanceANGLE,
glDrawElementsInstancedBaseVertexBaseInstanceANGLE,
glMultiDrawArraysInstancedBaseInstanceANGLE,
and glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE
Workaround for OpenGL driver on Mac:
gl_VertexID on Mac with AMD GPU doesn't include baseVertex value.
So replace gl_VertexID with (gl_VertexID + angle_BaseVertex) if any.
Workaround for Vulkan GLSL:
gl_InstanceIndex on Vulkan includes baseInstance. So replace
gl_InstanceIndex with (gl_InstanceIndex - angle_BaseInstance) when
angle_BaseInstance is declared.
Bug: chromium:891861, angleproject:3402
Change-Id: Ia1d94b5d4d7da7e635468c05c962c4f7eb1b1919
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1750126
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d7d42540
|
2019-08-21T15:22:49
|
|
Don't build symbol table for GLSL built-ins if on Android
The GLSL + ESSL autogenerated symbol table is too large for
android, and android also doesn't need desktop GL functionality
If on android, compile the ESSL only symbol table
Bug: chromium:996286
Change-Id: I14dfc7748dae389e78c35f82a390c67962665356
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1757372
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
472c74c6
|
2019-08-19T16:32:13
|
|
Translator: Allow tree validation in children of TCompiler
This is to be able to perform validation inside TranslatorVulkan, even
if it's through ASSERTs.
Additionally, every transformation is changed such that they do their
validation themselves. TIntermTraverser::updateTree() performs the
validation, which indirectly validates many of three tree
transformations. Some of the more ancient transformations that don't
use this function directly call TCompiler::validateAST.
Bug: angleproject:2733
Change-Id: Ie4af029d34e053c5ad1dc8c2c2568eecd625d344
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1761149
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9d737966
|
2019-08-14T12:25:12
|
|
Standardize copyright notices to project style
For all "ANGLE Project" copyrights, standardize to the format specified
by the style guide. Changes:
- "Copyright (c)" and "Copyright(c)" changed to just "Copyright".
- Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1").
- Fixed a small number of files that had no copyright date using the
initial commit year from the version control history.
- Fixed one instance of copyright being "The ANGLE Project" rather than
"The ANGLE Project Authors"
These changes are applied both to the copyright of source file, and
where applicable to copyright statements that are generated by
templates.
BUG=angleproject:3811
Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f2412bca
|
2019-07-16T15:47:34
|
|
Get rendering to texture working
Other small fixes for desktop compatibility
Bug: angleproject:3620
Change-Id: I8e75bce1f850fb891c8bb6e16f79302a6d59276c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707932
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f92fc916
|
2019-07-15T22:39:23
|
|
Vulkan: Compute shader support
A DispatchHelper class is created as the equivalent of FramebufferHelper
as a command graph resource. There's currently a single dispatcher and
all dispatch calls are recorded on that. Context dirty bits are set up
in such a way that graphics and compute workloads are independently
handled, so that issuing a dispatch call wouldn't cause a framebuffer's
render pass to rebind resources.
Bug: angleproject:3562
Change-Id: Ib96db48297074d99b04324e44b067cfbfd43e333
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688504
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
1d672749
|
2019-07-08T15:42:05
|
|
WGL implemetation for OpenGL tutorial
Fixes to make WGL implementation work with OpenGL tutorial
- Give directive parser the correct shader spec when on Desktop GL
- Minor changes to parse Desktop GL shaders
- Moved clientType parameter from Context to Context->mState
- Minor fixes to WGL functions
Bug: angleproject:3666
Change-Id: I01ddb828f6d581ad445f49942589436849eae5d9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1693244
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
cdab03aa
|
2019-06-18T17:24:54
|
|
Add flags to shader translator to emulate gl_BaseVertex and gl_BaseInstance
Adds support for translating gl_BaseVertex and gl_BaseInstance for implementation of
GL_ANGLE_base_vertex_base_instance.
They will only be available in WebGL 2. Since there's no gl_VertexID and
gl_InstanceID in WebGL 1. It won't be very useful to add them to WebGL
1.
Mostly follow pattern of gl_DrawID of GL_multi_draw
BUG=angleproject:3402,chromium:891861
Change-Id: Ifcd990c52d12f6814127b904e61a779b8d382e0c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1666361
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b7418a17
|
2019-07-03T13:53:11
|
|
Restore flatten invariant behavior
This was removed with a previous commit to fix behavior of invariant
pragma overall, however, the flattening is still needed for the initial
translation step of webGL VSs.
This change restores the flattening as it previously existed, however it
is now only applied to VS outputs. FS inputs are no longer flattened as
the previous fixes preclude the need for that workaround any longer.
Bug: 980675
Change-Id: Ia3c0471e24cae2905eb0d7bde153091e4d3829b4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1687788
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
4fbbdb15
|
2019-06-28T14:17:13
|
|
texture3D: Compiler changes for sampler3D
Bug: angleproject:3188
Change-Id: Iac1408f8b91c6a6610a63cef236205b7dcdbd2c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1682781
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
d9fa0744
|
2019-04-25T14:57:26
|
|
Emit OVR_multiview2 on ESSL/GLSL outputs.
Add ARB_shader_viewport_layer_array support to
SH_SELECT_VIEW_IN_NV_GLSL_VERTEX_SHADER.
Bug: angleproject:3404
Change-Id: Ia89517d0cc92400ce47c9118e8c1abf8285aec41
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1585452
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
38ff3c70
|
2019-05-15T10:07:09
|
|
Vulkan:Allow same-named var in nested scope
ESSL 1.00 spec allows for variable with same name to override outer variable
inside of a nested scope. This change adds new scope to symbol table inside
of a function defintion, but after function parameters for ESSL 1.00
shaders (but not webGL). This prevents an error while parsing.
This also includes some new code in translator to rename any vars that are
redefined between the function body and the function parameters. This
prevents an error later on when the translated shader is then parsed as
a desktop GLSL version.
Bug: angleproject:3287
Change-Id: I3f025805cf8d65bf912283bb15e6dad6e5e9b967
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601553
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9d519ab1
|
2019-05-09T23:09:46
|
|
Vulkan: Rework layout block storage conversion
Previously, a pass over the shader was made, converting shared and
packed interface blocks with block storage to std140. This resulted in
link success between interface blocks with different storage as they
were all translated to std140.
With this change, this pass is removed. The link step proceeds with the
block storage specifiers as seen by GLES, and only upon Vulkan GLSL
shader generation "shared" and "packed" are converted to std140.
Bug: angleproject:3199
Change-Id: I069415ab9c9b4e1034bc00f64cd2d9e2d73f5956
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1605262
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
ebab670c
|
2019-04-19T14:36:45
|
|
Adding new extension GL_OVR_multiview
GL_OVR_multiview functions exactly the same as GL_OVR_multiview2.
All GL_OVR_multiview2 tests now also repeat the same test using GL_OVR_multiview
Bug: angleproject:3341
Change-Id: I7e5294fb6bbf7692535174a15da6a42e1b5fc4e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575904
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
e9421b2c
|
2019-04-08T15:16:56
|
|
Vulkan:Only apply invariant pragma to output vars
The "#pragma STDGL invariant(all)" directive should only be applied to
shader output vars. This change also removes the workaround
SH_DONT_REMOVE_INVARIANT_FOR_FRAGMENT_INPUT which is no longer needed.
This change fixes two tests that were incorrectly assuming that the
pragma would be applied to inputs: GLSLTest.InvariantAll[Both|In].
Bug: angleproject:1293
Bug: angleproject:3285
Change-Id: I4eb03fa89fbc7c560150ee0cc32382024b0cb3e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558678
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
216f73d0
|
2019-04-12T13:32:30
|
|
Vulkan: add uniform buffer object support
Support for layout qualifiers in interface blocks are added. All
interface blocks are adjusted to either be in std140 or std430.
In the Vulkan backend, a new descriptor set is added for UBOs. A dirty
bit is added for UBO updating and pipeline layouts and descriptor
bindings are updated.
Bug: angleproject:3199, angleproject:3220
Change-Id: I271fc34ac2e1e8b76dee75e54a7cff0fe15fe4ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565061
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
7d64c486
|
2019-03-12T14:27:40
|
|
GL_ANGLE_multiview has been renamed to GL_OVR_multiview2.
changes include:
1) GL_OVR_multiview to GL_OVR_multiview2 extension directive change
2) Removal of all references to side by side. We no longer support multiple views in a single 2DTexture. Only 2DTextureArray's are supported
3) WebGL 2 (ES3) is required for multiview
Bug: angleproject:3341
Change-Id: Ie0c1d21d7610f8feebdb2e4d01c6947f57e69328
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552023
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
f563fdc9
|
2019-01-31T13:53:59
|
|
Reland "Fix unit test for setting locale creating malformed HLSL shader code
Fix malformed HLSL shader code in other locales than classic"
This is a reland of 5f662c0042703344eb0eef6d1c123e902e3aefbf
Original change's description:
> Fix unit test for setting locale creating malformed HLSL shader code
> Fix malformed HLSL shader code in other locales than classic
>
> Bug: angleproject:1433
> Change-Id: I30bad0bd0cfda465ec7200e48e12800d7d8efd26
> Reviewed-on: https://chromium-review.googlesource.com/c/1447862
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Bug: angleproject:1433
Change-Id: I94caf7b4c7179119e5a5567c3014d7232df45a13
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1516192
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
|
|
5546fb4f
|
2019-01-17T12:25:54
|
|
Vulkan:Adding custom pool allocator
Migrated pool allocator used by compiler to common.
Planning to use this for ANGLE custom command buffers so this some
refactoring in preparation for that work.
Added a unit test to check PoolAllocator functionality.
Bug: angleproject:2951
Reviewed-on: https://chromium-review.googlesource.com/c/1476953
Reviewed-by: Jamie Madill <jmadill@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
Change-Id: I0b4f3d55ea1799e35c9799c221f7129233f30b24
Reviewed-on: https://chromium-review.googlesource.com/c/1492972
|
|
0546b538
|
2019-02-25T22:47:17
|
|
Revert "Vulkan:Adding custom pool allocator"
This reverts commit 941717496141b96f1d5817f31c2bb4a4e19847b9.
Reason for revert: crashes on Debug bots
Original change's description:
> Vulkan:Adding custom pool allocator
>
> Migrated pool allocator used by compiler to common.
>
> Planning to use this for ANGLE custom command buffers so this some
> refactoring in preparation for that work.
>
> Added a unit test to check PoolAllocator functionality.
>
> Bug: angleproject:2951
> Change-Id: I29618cfdb065b8a5fefd40719a35d27b1f6e99ef
> Reviewed-on: https://chromium-review.googlesource.com/c/1476953
> Reviewed-by: Jamie Madill <jmadill@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Tobin Ehlis <tobine@google.com>
TBR=ynovikov@chromium.org,jmadill@google.com,tobine@google.com,syoussefi@chromium.org
Change-Id: Id8c522bd1d94154e871211d975e801a55cc9c257
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2951, angleproject:3169
Reviewed-on: https://chromium-review.googlesource.com/c/1487977
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
94171749
|
2019-01-17T12:25:54
|
|
Vulkan:Adding custom pool allocator
Migrated pool allocator used by compiler to common.
Planning to use this for ANGLE custom command buffers so this some
refactoring in preparation for that work.
Added a unit test to check PoolAllocator functionality.
Bug: angleproject:2951
Change-Id: I29618cfdb065b8a5fefd40719a35d27b1f6e99ef
Reviewed-on: https://chromium-review.googlesource.com/c/1476953
Reviewed-by: Jamie Madill <jmadill@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
1d35d511
|
2019-02-15T15:39:27
|
|
Revert "Fix unit test for setting locale creating malformed HLSL shader code"
This reverts commit 5f662c0042703344eb0eef6d1c123e902e3aefbf.
Reason for revert: Some recent crashes related to streams, could be
related to this change.
https://bugs.chromium.org/p/chromium/issues/detail?id=932359
Original change's description:
> Fix unit test for setting locale creating malformed HLSL shader code
> Fix malformed HLSL shader code in other locales than classic
>
> Bug: angleproject:1433
> Change-Id: I30bad0bd0cfda465ec7200e48e12800d7d8efd26
> Reviewed-on: https://chromium-review.googlesource.com/c/1447862
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
TBR=geofflang@chromium.org,jmadill@chromium.org,jonahr@google.com
Bug: angleproject:1433
Change-Id: I28caa073b3996a95f3f233bed9dc91dc44263835
Reviewed-on: https://chromium-review.googlesource.com/c/1474624
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
5f662c00
|
2019-01-31T13:53:59
|
|
Fix unit test for setting locale creating malformed HLSL shader code
Fix malformed HLSL shader code in other locales than classic
Bug: angleproject:1433
Change-Id: I30bad0bd0cfda465ec7200e48e12800d7d8efd26
Reviewed-on: https://chromium-review.googlesource.com/c/1447862
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
|
|
d4c09dd3
|
2019-01-29T11:22:54
|
|
Fix unnecessary copy of for loop variables in ANGLE
Bug: angleproject:3075
Change-Id: I34dd5d4ecded6def5a2b46369277312af0de7c8c
Reviewed-on: https://chromium-review.googlesource.com/c/1443572
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
|
|
91d469aa
|
2018-08-27T10:47:25
|
|
Initial support for compiler AST validation
This is to be able to catch issues introduced through AST manipulation
earlier than shader compilation time, improving debuggability.
Bug: angleproject:2733
Change-Id: Ic57bc72f2ab438e60f32553d602074f3d72cc4f5
Reviewed-on: https://chromium-review.googlesource.com/c/1199922
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
47ca1b2f
|
2019-01-23T16:11:41
|
|
Revert "Vulkan: Adding custom pool allocator"
This reverts commit 05459e06fde5047ae8f5f90fe091c3255e6bc88e.
Reason for revert: Clusterfuzz bugs flagged this commit
Original change's description:
> Vulkan: Adding custom pool allocator
>
> Copied pool allocator used by compiler to common and hooking it up as
> custom allocator for CommandPools. Modified it to support reallocation.
>
> RendererVk now has a private poolAllocator and VkAllocationCallbacks
> struct. The allocation callbacks are initialized to static functions
> in RendererVk::initializeDevice() and then passed to CommandPool init()
> and destroy() functions.
>
> Using the pool allocator saves Command Pool/Buffer clean-up time which
> was showing us as a bottleneck is some cases.
>
> Bug: angleproject:2951
> Change-Id: I81aa8a7ec60397676fa722d6435029db27947ef4
> Reviewed-on: https://chromium-review.googlesource.com/c/1409867
> Commit-Queue: Tobin Ehlis <tobine@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=jmadill@chromium.org,tobine@google.com,ianelliott@google.com,syoussefi@chromium.org
Change-Id: I363a351667c4dddef79833061790da90de477e70
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2951
Reviewed-on: https://chromium-review.googlesource.com/c/1430679
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
05459e06
|
2019-01-17T12:25:54
|
|
Vulkan: Adding custom pool allocator
Copied pool allocator used by compiler to common and hooking it up as
custom allocator for CommandPools. Modified it to support reallocation.
RendererVk now has a private poolAllocator and VkAllocationCallbacks
struct. The allocation callbacks are initialized to static functions
in RendererVk::initializeDevice() and then passed to CommandPool init()
and destroy() functions.
Using the pool allocator saves Command Pool/Buffer clean-up time which
was showing us as a bottleneck is some cases.
Bug: angleproject:2951
Change-Id: I81aa8a7ec60397676fa722d6435029db27947ef4
Reviewed-on: https://chromium-review.googlesource.com/c/1409867
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b980c563
|
2018-11-27T11:34:27
|
|
Reformat all cpp and h files.
This applies git cl format --full to all ANGLE sources.
Bug: angleproject:2986
Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f
Reviewed-on: https://chromium-review.googlesource.com/c/1351367
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7cf9cd24
|
2018-10-09T15:27:32
|
|
Add flags to shader translator to emulate gl_DrawID
Adds support for translating gl_DrawID for implementation of
GL_ANGLE_multi_draw.
Currently the change only supports and allows emulation of the
draw id using a uniform variable named `gl_DrawID`. This uniform is
mapped in the translated shader to a hashed name that does not
use the gl_ namespace
Bug: chromium:890539
Change-Id: I08a246ca911e88e733ccdf22f1ed69dcae948e05
Reviewed-on: https://chromium-review.googlesource.com/c/1271957
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
|
|
6f591c97
|
2018-09-21T11:20:47
|
|
Clean up TCompiler members and style
Some dead code and duplicate data are cleaned up from the compiler.
Several parameters can be accessed directly from ShBuiltInResources
instead of creating a copy in TCompiler.
This also encapsulates some TCompiler member functions as private and
changes the remaining unprefixed TCompiler member variable names to
start with the m prefix.
BUG=angleproject:2068
TEST=angle_unittests
Change-Id: I6690aaf538b17e0f45460660272a21f82f1808a0
Reviewed-on: https://chromium-review.googlesource.com/c/1267503
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
c3bef3e7
|
2018-10-03T07:35:09
|
|
Allow 'defined' in define in non-WebGL.
This is needed to pass dEQP conformance. Several of the harder dEQP
tests around this behaviour are excluded from the mustpass list. This
is presumably because the behaviours weren't implemented portably.
Nevertheless we need to support conformant behaviour for GLES 2.0
Contexts for the most simple uses.
This also leaves the error behaviour intact for WebGL specs.
Bug: angleproject:1335
Change-Id: Ia80b4f71475efa928488ee6c2ee35c566d4602d4
Reviewed-on: https://chromium-review.googlesource.com/c/1242013
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
017bda42
|
2018-09-14T18:11:50
|
|
Fix the ASSERT error
This change adds shader type checking before entering
initializeOutputVariables.
BUG: angleproject:2821
Change-Id: Ib931031f2fc187f1f2a1821a09664bbe172a5e90
Reviewed-on: https://chromium-review.googlesource.com/1226229
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
983460e6
|
2018-05-02T17:57:39
|
|
Rewrite repeated assignments to swizzled vectors on NVIDIA
This works around the most common instances of a bug that reproduces
on some NVIDIA OpenGL drivers prior to version 397.31.
BUG=chromium:798117
TEST=angle_end2end_tests
Change-Id: Iafc6a9a64e56fa98b42117149fe6867040e932e5
Reviewed-on: https://chromium-review.googlesource.com/1042190
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5fec7ab2
|
2018-04-04T11:58:33
|
|
Identify functions by unique id in BuiltInFunctionEmulator
Now that unique ids of all builtins are compile-time constants, we can
use them to look up functions in BuiltInFunctionEmulator. This is
simpler than using a custom struct with the name and parameters for
identifying functions.
This requires that we store a reference to a TFunction in those
TIntermUnary nodes that were created based on a function.
This decreases shader_translator binary size by about 6 KB on Windows.
BUG=angleproject:2267
BUG=chromium:823856
TEST=angle_unittests
Change-Id: Idd5a00c772c6f26dd36fdbbfbe161d22ab27c2fe
Reviewed-on: https://chromium-review.googlesource.com/995372
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
59c5b897
|
2018-04-03T11:44:50
|
|
Validate gl_FragData and gl_FragColor access after parsing
After this simply declaring both variables invariant is not treated as
static use.
This simplifies ParseContext a bit, but the effect on compiler
performance tests seems marginal.
BUG=angleproject:2450
TEST=angle_unittests
Change-Id: Ib90cb1d2bd1331542d1cd37732f24efb7833036a
Reviewed-on: https://chromium-review.googlesource.com/992112
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
822a84b1
|
2018-03-23T12:30:18
|
|
Get builtin symbol info from the node in CollectVariables
Since we now have a TVariable pointer in TIntermSymbol, we don't need
to look up variables from the symbol table.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Id09610ccec5898eb56dcc5e9112e173edcf7ac97
Reviewed-on: https://chromium-review.googlesource.com/977828
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
a07b4213
|
2018-03-22T16:13:13
|
|
Move AST transformations to a subdirectory
Move AST transformations to compiler/translator/tree_ops.
BUG=angleproject:2409
TEST=angle_unittests
Change-Id: I9c620e98707d22d005da6192fe7d1b4e8030aadd
Reviewed-on: https://chromium-review.googlesource.com/975550
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
c26214de
|
2018-03-16T10:43:11
|
|
Move AST utilities to a subdirectory
Move AST related utilities to compiler/translator/tree_util.
BUG=angleproject:2409
TEST=angle_unittests
Change-Id: I7567c2f6f2710292029263257c7ac26e2a144ac8
Reviewed-on: https://chromium-review.googlesource.com/966032
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
4121799f
|
2018-03-15T11:15:33
|
|
Clean up switch/case pruning code
There was some duplicate switch/case pruning in the code in
PruneEmptyCases and RemoveNoOpStatementsFromTheEndOfSwitchStatements.
Combine the functionality of both AST transformations into
PruneEmptyCases and remove the other transformation.
The tests are improved to better cover the full functionality.
BUG=angleproject:2402
TEST=angle_unittests, angle_end2end_tests --gtest_filter=*Switch*
Change-Id: Ib74b6b9b455769ea15650e9653a9c53635342c49
Reviewed-on: https://chromium-review.googlesource.com/964081
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
0b0dcbc1
|
2018-03-14T11:33:22
|
|
Prune empty cases and switch statements
The translator already prunes no-ops and unreferenced variables, and
this may result in case statements that are followed by nothing.
Since the last case statement in as switch statement must always
contain a statement to be valid GLSL, the translator must not leave
empty case statements in place. They're now being pruned by the
PruneEmptyCases AST transformation. This improves on the earlier
RemoveEmptySwitchStatements AST transformation that did address
empty switch statements but could not remove them if they had a
case statement inside.
BUG=angleproject:2402
TEST=angle_unittests
Change-Id: Ieb9598a744078e45226d8fb7266d877f7835cf0c
Reviewed-on: https://chromium-review.googlesource.com/962181
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
437664b4
|
2018-02-28T15:38:14
|
|
Clean up TSymbolTable entry points
TSymbolTable API can be cleaned up further now that we have separate
logic for inserting builtins and user-defined symbols.
BUG=angleprojec:2267
TEST=angle_unittests
Change-Id: I7a228891ecdf4696e50868b9e7dfc2a50b5d8e92
Reviewed-on: https://chromium-review.googlesource.com/941301
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
e41df655
|
2018-02-09T14:31:39
|
|
ES31: Add shader version check for CS and GS
This patch adds the missing check on the shader version for compute
and geometry shaders, which can fix a bug that ANGLE GLSL compiler
doesn't report a compile error when compiling an empty compute or
geometry shader in version 100 or 300.
This patch also updates the original compiler tests on the check of
shader version. In these tests, the compile errors are all caused by
illegal layouts instead of shader versions, which is against the
purpose of the tests.
This patch also fixes an incorrect case that used an empty compute
shader in version 300.
BUG=angleproject:1442, angleproject:1941
TEST=angle_unittests
Change-Id: Ic26bb8eb312dbc0cec6a879997d0ae7a2e625a0f
Reviewed-on: https://chromium-review.googlesource.com/910715
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
e5fe7aad
|
2018-01-29T12:06:11
|
|
Store builtin symbols as const pointers
To do this we need two types of symbol table levels: A level for
built-ins and a level for user-defined symbols. User-defined symbols
are non-const because function symbols created based on function
prototypes are changed when the function definition is parsed. On the
other hand, we want to make built-in symbols constexpr, so we should
only handle them through const pointers.
This also gets rid of extra empty precision stack levels. Only one
level is needed to store predefined precisions.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I9f14b24c2cfce272f22c16e7a8dfb653b849cbeb
Reviewed-on: https://chromium-review.googlesource.com/892879
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
29bda815
|
2018-01-26T17:37:36
|
|
Move symbol table initialization to SymbolTable.cpp
This is needed in order to make symbol table symbols statically
allocated.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Ia2d44fb30d49dc5d5c67643fe01280c89127a3c3
Reviewed-on: https://chromium-review.googlesource.com/889299
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
1776fd08
|
2018-01-31T11:46:52
|
|
Make use of CreateBoolNode in traversers
This is just refactoring to clean up some duplicate code. A new test
is added to make sure this doesn't break UnfoldShortCircuitAST.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I108e646f71ba631cbd5dad2055b64e6a30159742
Reviewed-on: https://chromium-review.googlesource.com/894207
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
68981eb5
|
2018-01-23T17:46:12
|
|
Track parameter qualifiers of functions in call nodes
We now add a reference to TFunction to all TIntermAggregate nodes
where it is possible, including built-in ops. We also make sure
that internal TFunctions added in traversers have correct parameter
qualifiers.
This makes TLValueTrackingTraverser much simpler. Instead of storing
traversed functions or looking up builtin functions from the symbol
table, determining which function parameters are out parameters can
now be done simply by looking it up from the function symbol
associated with the aggregate node.
Symbol instances are no longer deleted when a symbol table level goes
out of scope, and TFunction destructor no longer clears the
parameters. They're all either statically allocated or pool allocated,
so this does not result in leaks.
TEST=angle_unittests
BUG=angleproject:2267
Change-Id: I57e5570da5b5a69a98a8778da3c2dc82b6284738
Reviewed-on: https://chromium-review.googlesource.com/881324
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
0690e1aa
|
2017-12-21T20:51:38
|
|
Add a workaround to clamp gl_FragDepth
NVIDIA OpenGL drivers at least up to version 388.59 don't clamp
gl_FragDepth when it is written to a floating point depth buffer.
This bug is now worked around by clamping gl_FragDepth in the shader
if it is statically used.
BUG=angleproject:2299
TEST=angle_end2end_tests on NVIDIA
Change-Id: I61589b2b0dd2813c4901a157c8d37e470063773c
Reviewed-on: https://chromium-review.googlesource.com/840842
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
b38dfde0
|
2018-01-04T15:49:03
|
|
Keep TIntermSymbol nodes consistent in PruneNoOps
Create new TVariables to change struct declaration qualifiers in
PruneNoOps so that the node doesn't end up with an inconsistent
qualifier from the variable.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I7f6cd557eb3e46f4ead4ffbe37d8960ff7776d10
Reviewed-on: https://chromium-review.googlesource.com/850673
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
765924f0
|
2018-01-04T12:48:36
|
|
Fold ternary and comma ops only after parsing is done
In case folding a ternary op or a comma op would change the qualifier
of the expression, the folding is deferred to a separate traversal
step.
After this there are no more cases where the type of a TIntermSymbol
node needs to differ from the type of the variable it is referring to.
There are still some cases where some parts of TIntermSymbol type are
changed while keeping the TVariable type the same though, like when
assigning array size to gl_PerVertex nodes or sanitizing qualifiers of
struct declarations.
BUG=angleproject:2267
TEST=angle_unittests, angle_end2end_tests
Change-Id: I1501c8d361f5f765f43ca810d1b7248d9e2c5986
Reviewed-on: https://chromium-review.googlesource.com/850672
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
c33f1e8c
|
2017-12-29T16:55:29
|
|
Simplify creating the call DAG
Don't copy function name strings unnecessarily and traverse function
body nodes manually to avoid some extra traversal steps.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Ie010aabcb8bc78fa6abce397ea2bdd9092e74187
Reviewed-on: https://chromium-review.googlesource.com/847552
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
beb6dc74
|
2017-12-14T16:03:03
|
|
Always use TFunction instead of TFunctionSymbolInfo
This reduces unnecessary memory allocations and conversions between
different objects containing the same data.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I87316509ab1cd6d36756ff6af7fa2b5c5a76a8ea
Reviewed-on: https://chromium-review.googlesource.com/827134
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
1bb8528c
|
2017-12-14T13:39:53
|
|
Remove TFunctionSymbolInfo from TIntermAggregate
All the information stored in TFunctionSymbolInfo was duplicated from
the TFunction that the aggregate node pointed to.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I1f5574ab0416e5cae00c3dae6fc11d2fe1fa128c
Reviewed-on: https://chromium-review.googlesource.com/827065
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
bd924af1
|
2017-11-16T15:28:04
|
|
ES31: Remove support of GL_OES_geometry_shader in compiler
This patch intends to remove the support of GL_OES_geometry_shader
in ANGLE compiler.
To make the implementation simpler, currently we decide to only
support "GL_EXT_geometry_shader" as the extension string of geometry
shader in ANGLE.
This patch also updates all the related shaders in angle_unittests
into R"()" format.
BUG=angleproject:1941
TEST=angle_unittests
Change-Id: Ife9858abeedfb46b02c5c2fb1cda16fa27198511
Reviewed-on: https://chromium-review.googlesource.com/773451
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
9d4d7f06
|
2017-12-07T17:11:41
|
|
Classify TSymbols using an enum
Symbols can be either built-ins, user-defined, nameless, or for
ANGLE's internal use. In addition we currently use TFunction symbols
that are not yet resolved - they might later resolve to either a
built-in or a user-defined function. Record this information in each
TSymbol so that TSymbol contains sufficient information for deciding
how to format symbol names in output.
The goal is to eventually replace current uses of TName with pointers
to different TSymbol objects. So far only built-ins and user-defined
symbols have associated TSymbol objects, but that will be expanded to
cover ANGLE's internal symbols as well.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I927ce023fe257cc236da82c127700f3bd72bfe96
Reviewed-on: https://chromium-review.googlesource.com/816952
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
87cc90df
|
2017-12-12T15:28:06
|
|
Set proper precision on loop index for variable init
Previously the index variable was missing a precision. This may have
been behind loop-based init failing on some Android platforms.
BUG=chromium:735497
TEST=angle_unittests
Change-Id: I0307891dfb2edf6c52efd5b495f602b380263d65
Reviewed-on: https://chromium-review.googlesource.com/822413
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
614dd0f5
|
2017-11-22T14:04:48
|
|
Replace TCache with static TType instances
Replaces TCache with (static generation + static/dynamic lookups) of
TType instances, using compile-time template and constexpr magic.
Work started by jmadill here: https://crrev.com/c/776280
With more contributions from jmadill here: https://crrev.com/c/801494
Bug: angleproject:1432
Change-Id: I07181543f8fee4b2606cdd2d0738351e83d4ce57
Reviewed-on: https://chromium-review.googlesource.com/786317
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5d69db12
|
2017-11-24T16:51:15
|
|
Reset symbol unique id counter between compilations
This guarantees identical compilation results on different
compilations using the same compiler instance, guards against
overflow, and is useful as a building block for tracking more symbol
information in the symbol table.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Ib5a7cec2fff6712ead969d935d238d28a87fd4a7
Reviewed-on: https://chromium-review.googlesource.com/796795
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
ae04e1e4
|
2017-11-27T16:00:39
|
|
Fix scalarizing vec and mat constructor args
Scalarizing vec and mat constructor args can generate new statements
in the parent block of the constructor. To preserve the correct
execution order of expressions, scalarized vector and matrix
constructors need to be first moved out from inside loop conditions
and sequence operators. This is done whenever the compiler flag to
scalarize args is on.
BUG=chromium:772653
TEST=angle_unittests
Change-Id: Id40f8d848a9d087e186ef2e680c8e4cd440221d9
Reviewed-on: https://chromium-review.googlesource.com/790412
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2f294c9a
|
2017-11-20T14:47:26
|
|
Add constructors for TMemoryQualifier and TLayoutQualifier.
These replace the ::create methods, to facilitate constexpr versions.
Also adds a constructor of WorkGroupSize that can be made to be
constexpr.
Bug: angleproject:1432
Change-Id: I413d1a56102c94d6a383775110a2b850a7532ea0
Reviewed-on: https://chromium-review.googlesource.com/776279
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
|
|
3d70ca9c
|
2017-11-10T16:53:26
|
|
Remove unreferenced variables from the AST
Unreferenced local and global variables are now pruned from the AST.
They will be removed unless their initializer has side effects.
The CollectVariables step needs to be run after the pruning, as the
pruning may affect which interface variables are statically used.
It's also good to gather built-ins that need to be emulated after the
pruning, so unnecessary built-in emulation functions are not added to
the translator output.
This will help handle some dEQP tests for arrays of arrays that have
extremely large local arrays that are only used in an array length
query. By constant folding the length and pruning unused variables we
will avoid adding a large amount of array initialization code to the
generated shaders.
BUG=angleproject:2166
TEST=angle_unittests, angle_end2end_tests
Change-Id: Ic918bfe8f16460bcd6101d73a7a674145f5aeecd
Reviewed-on: https://chromium-review.googlesource.com/766434
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
2c7f34c8
|
2017-10-09T17:18:02
|
|
Initialize uninitialized GLSL arrays in a for loop
Previously, creating nodes for initializing each single array element
could result in memory bloat during translation when dealing with
large arrays. The resulting shader could also end up very long.
Initialize most arrays using a simple for loop instead. The loop is
compatible with ESSL 1.00 Appendix A limitations.
An exception is made for fragment outputs, so that they are not
indexed by non-constant values.
On some platforms using the a loop to initialize variables can cause
problems, so we also have a compiler flag for turning this behavior
off. The flag was already added earlier for a staggered rollout of
this functionality.
BUG=chromium:735497
TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests
Change-Id: Iec727821d8137db56b440ddbe007879b1b55f61f
Reviewed-on: https://chromium-review.googlesource.com/707195
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b5601eb6
|
2017-11-15T18:08:04
|
|
Only initialize globals if initialization flag is set
This avoids the possibility of initializing globals twice in Chromium.
Now we also never initialize variables redundantly in case we're
writing HLSL output. This was already the intent of the code before,
but a mistake had slipped in and the code didn't actually check the
output type properly.
This also simplifies DeferGlobalInitializers by running it after
SeparateDeclarations.
BUG=chromium:735497
TEST=WebGL conformance tests
Change-Id: I95036a24ac8cf18113755510376a2fca286b3ee6
Reviewed-on: https://chromium-review.googlesource.com/771555
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
661fc487
|
2017-10-16T12:17:05
|
|
Work around NVIDIA GLSL vector-scalar op bug
This adds a new AST transform VectorizeVectorScalarArithmetic. The AST
transform works around incorrect handling of certain types of GLSL
arithmetic operations by NVIDIA's GL driver. It works around only the
most common cases where the bug reproduces, since detecting all the
cases would take more sophisticated analysis of the code than what
is currently easily implementable in ANGLE.
When a float add operator has both vector and scalar operands, the AST
transform turns the scalar operand into a vector operand. Example:
vec4 f;
f += 1.0;
gets turned into:
vec4 f;
f += vec4(1.0);
When a vector constructor contains a binary scalar float
multiplication or division operation as its only argument, the AST
transform turns both operands of the binary operation into vector
operands. Example:
float f, g;
vec4(f * g);
gets turned into:
float f, g;
vec4(vec4(f) * vec4(g));
Another example with compound assignment:
float f, g;
vec4(f *= g);
gets turned into:
float f, g;
vec4 s0 = vec4(f);
(s0 *= g, f = s0.x), s0;
This latter transformation only works in case the compound assignment
left hand expression doesn't have side effects.
BUG=chromium:772651
TEST=angle_end2end_tests
Change-Id: I84ec04287793c56a94845a725785439565debdaf
Reviewed-on: https://chromium-review.googlesource.com/721321
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
d10cf69e
|
2017-11-02T11:06:14
|
|
Remove repeated "success" check from compileTreeImpl
This refactoring simplifies the compilation code by putting AST checks
and simplification into a separate function. This function will
immediately return false when an error is encountered. This is easier
to maintain than repeated checking of a "success" boolean.
BUG=angleproject:2068
TEST=WebGL conformance tests, angle_unittests, angle_end2end_tests
Change-Id: I1ae1c8def3625ada1482104a6babe605405229ef
Reviewed-on: https://chromium-review.googlesource.com/750085
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
640d597d
|
2017-11-02T10:37:31
|
|
Add missing check in Compiler
Further AST traversals should not be run in case the expression
complexity check failed and set success=false. Otherwise traversal
can result in stack overflow.
BUG=chromium:780545
TEST=WebGL conformance tests
Change-Id: Icfde8c051038c691563e199a6d3a17b1e8e5ebf5
Reviewed-on: https://chromium-review.googlesource.com/750781
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c1f14fbe
|
2017-10-28T19:17:23
|
|
Remove empty switch statements from translated shaders
The native HLSL compiler does not accept switch statements with an
empty statement list. The simplest way to accommodate this is to
simply remove them from the AST after parsing and some initial
pruning.
This is done by the new RemoveEmptySwitchStatements traverser. It
preserves init statements of switch statements in case they have side
effects. So for example
switch(++i) {}
gets translated to
++i;
BUG=angleproject:2206
TEST=angle_end2end_tests
Change-Id: I550a3c9b010a3566016bdfd93344ac30fd860604
Reviewed-on: https://chromium-review.googlesource.com/742922
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
87c35883
|
2017-10-19T15:19:38
|
|
Prune no-op statements with a single traverser
We put pruning literal statements and pruning empty declarations in
the same traverser, as some of the required logic is the same. This
pruning of no-ops is always done as one of the first processing steps
after parsing, so further processing of the AST is simpler.
Since we now prune pure literals before removing no-op cases from the
end of switch statements, we also don't need any sort of special
handling for switch statements in pruning pure literals.
BUG=angleproject:2181
TEST=angle_unittests
Change-Id: I2d86efaeb80baab63ac3cc803f3fd9e7ec02908a
Reviewed-on: https://chromium-review.googlesource.com/727803
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
ca68d988
|
2017-09-18T16:41:56
|
|
ES31: Add std430 support for OpenGL backend
BUG=angleproject:1920
TEST=angle_unittests
Change-Id: Ie8e171abec053c2c5dca93d6e79db534f74520e7
Reviewed-on: https://chromium-review.googlesource.com/737532
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
8e4b355b
|
2017-08-30T14:20:58
|
|
ES31: Implement Geometry Shader inputs and outputs
This patch intends to implement Geometry Shader inputs and
outputs in ANGLE GLSL compiler.
1. Only accept arrays as the inputs of a Geometry Shader.
2. Allow unsized arrays as the inputs of a Geometry Shader after a
valid input primitive declaration and assign size to them.
3. Implement Geometry Shader outputs.
4. Allow Geometry Shader inputs and outputs using interpolation
qualifiers ('flat', 'smooth', 'centroid').
5. Allow using 'location' layout qualifier on Geometry Shader inputs
and outputs.
BUG=angleproject:1941
TEST=angle_unittests
Change-Id: Ia7e250277c61f45c8479437b567c2831ff26b433
Reviewed-on: https://chromium-review.googlesource.com/650211
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
e7c2857d
|
2017-10-23T16:29:33
|
|
Clean up direct access of ShaderVariable::arraySize
This change is pure refactoring. It's intended to help with adding
support for arrays of arrays.
BUG=angleproject:2125
TEST=angle_unittests
Change-Id: I82881a98c3c476fd6666a551ce6be255ae0de4cf
Reviewed-on: https://chromium-review.googlesource.com/733127
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
89a69a03
|
2017-10-23T12:20:45
|
|
Generate performance warnings in HLSL translation
Generate performance warnings for some code that undergoes heavy
emulation when translated to HLSL:
1. Dynamic indexing of vectors and matrices.
2. Non-empty fall-through cases in switch/case.
The warnings are generated only when code is translated to HLSL.
Generating them in the parsing stage would add too much maintenance
burden.
Improves switch statement fall-through handling in cases where an
empty fall-through case follows a non-empty one so that extra
performance warnings are not generated.
BUG=angleproject:1116
Change-Id: I7c85d78fe7c4f8e6042bda72ceaaf6e37dadfe6c
Reviewed-on: https://chromium-review.googlesource.com/732986
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
923ecef6
|
2017-10-11T12:01:38
|
|
Fix switch statement validation corner cases
The grammar needs to generate AST nodes even for no-op statements,
since they might be the last statement in a switch statement that is
required for switch statement validity. Change the grammar to generate
nodes from empty blocks and empty declarations.
We also need to do some further processing of the AST. This is because
PruneEmptyDeclarations will still remove empty declarations, and at
least the NVIDIA driver GLSL compiler doesn't accept some types of
no-op statements as the last statement inside a switch statement. So
after parsing has finished we do rudimentary dead code elimination to
remove dead cases from the end of switch statements.
BUG=angleproject:2181
TEST=angle_unittests
Change-Id: I586f2e4a3ac2171e65f1f0ccb7a7de220e3cc225
Reviewed-on: https://chromium-review.googlesource.com/712574
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
4cc89e2b
|
2017-08-31T14:25:54
|
|
ES31: Enable 'location' layout qualifier on shader interfaces in compiler
This patch enables 'location' layout qualifier for vertex outputs and
fragment shader inputs when the shader version is 3.1 in ANGLE GLSL
compiler and adds the check on location conflicts for these varyings.
According to GLSL ES 3.1 SPEC (Chapter 4.4.1 and Chapter 4.4.2),
'location' layout qualifier is allowed on both inputs and outputs of
vertex and fragment shaders.
'location' layout qualifier on shader interfaces is only valid on shaders
whose version is 3.1 and above. According to GLSL ES 3.0 SPEC, vertex shader
cannot have output layout qualifiers (Chapter 4.3.8.2) and fragment shader
cannot have input layout qualifiers (Chapter 4.3.8.1).
The 'location' qualifier on varyings is used in the shader interface
matching defined in OpenGL ES 3.1. (OpenGL ES 3.1 SPEC Chapter 7.4.1). This
new link rule will be added to Program.cpp in another patch.
For the OpenGL ES 3.1 extension GL_OES_geometry_shader, according to
GL_OES_shader_io_blocks SPEC (Chapter 4.4.1 and Chapter 4.4.2), 'location'
layout qualifier is both valid on geometry shader inputs and outputs. This
feature will be implemented together with other rules on geometry shader
inputs and outputs.
BUG=angleproject:2144
TEST=angle_unittests
Change-Id: I62d85f7144c177448321c2db36ed7aaeaa1fb205
Reviewed-on: https://chromium-review.googlesource.com/645366
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
84aa2dcf
|
2017-09-11T15:51:02
|
|
Add textureGather and textureGatherOffset
The patch adds new built-ins and extends the semantic parser to add
support for textureGather and textureGatherOffset.
BUG=angleproject:1442
TEST=angle_unittests
TEST=angle_deqp_gles31_tests.exe
--deqp-case=dEQP-GLES31.functional.texture.gather*
--deqp-egl-display-type=angle-gl
Change-Id: Iaf98c3420fbd61193072fdec8f5a61ac4c574101
Reviewed-on: https://chromium-review.googlesource.com/660124
Commit-Queue: Martin Radev <mradev@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
bb5a7e29
|
2017-08-30T13:03:12
|
|
Allow length() on arbitrary array expressions
This is required to pass some dEQP GLES 3.1 tests for arrays of
arrays, and WebGL conformance tests were also recently fixed to
require this behavior. The intent of the GLSL ES spec was not to
restrict usage of length().
In practice GL drivers don't implement array length() on expressions
with side effects correctly in all cases. HLSL doesn't have an array
length operator either. Because of this we always remove array length
ops from the AST before output.
BUG=angleproject:2142
TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests
Change-Id: I863a92e83ac5315b013af9a5626348482bad72b3
Reviewed-on: https://chromium-review.googlesource.com/643190
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a16a84f3
|
2017-09-12T13:49:18
|
|
GLSL: Fix initializing globals declared after main()
Initialize globals in a separate function instead of a block in the
beginning of main(). This way it works also for globals declared after
main().
BUG=chromium:764036
TEST=angle_end2end_tests
Change-Id: I2fcbb97d046589301287757dc3dde5471172a3f6
Reviewed-on: https://chromium-review.googlesource.com/663158
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
2a1e8f95
|
2017-07-14T11:49:36
|
|
Refer to GLSL extensions through TExtension enum
Extensions are now referred to by enum values instead of strings most
of the time. This gets rid of unnecessary copying of strings. The code
is easier to work with than before as typoing the extension enum names
will be caught by the compiler.
BUG=angleproject:2147
TEST=angle_unittests
Change-Id: Ifa61b9f86ef03211188fc23bc23a5ce4e4d8c390
Reviewed-on: https://chromium-review.googlesource.com/571002
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
ec3a9cbb
|
2017-09-07T12:18:01
|
|
Only support GL_OVR_multiview extension variant
The WebGL spec proposal was changed so that only GL_OVR_multiview
extension name is supported, instead of having two variants
OVR_multiview and OVR_multiview2. We're only supporting the WebGL
version of the shader extension, so we drop compiler support for
GL_OVR_multiview2. Shader restrictions were also removed from the
WebGL spec, so no special validation for how ViewID_OVR gets used is
needed.
Tests that were testing for the shader restrictions are either removed
or changed from negative tests to positive tests.
BUG=angleproject:1669
TEST=angle_unittests
Change-Id: I83f92b879376d41b727b5aca419fd75fb6f53477
Reviewed-on: https://chromium-review.googlesource.com/654608
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
d27f5c8d
|
2017-08-23T09:38:08
|
|
ES31: Implement GL_OES_geometry_shader built-ins in GLSL compiler
This patch intends to implement all built-in constants, variables and
functions defined in OpenGL ES 3.1 extension GL_OES_geometry_shader
in ANGLE GLSL compiler.
1. Add all built-in constants defined in GL_OES_geometry_shader.
2. Add built-in functions EmitVertex() and EndPrimitive() required
in Geometry Shader.
3. Add built-in variables gl_PrimitiveIDIn and gl_InvocationID to
Geometry Shader.
4. Add built-in variables gl_PrimitiveID and gl_Layer to both
Geometry Shader and Fragment Shader when GL_OES_geometry_shader
is enabled.
BUG=angleproject:1941
TEST=angle_unittests
Change-Id: I92821553ed0efee2ccb77fead6e065e7799819d0
Reviewed-on: https://chromium-review.googlesource.com/627670
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
d8105a03
|
2017-08-08T09:54:36
|
|
ES31: Implement gl_in in Geometry Shader
This patch intends to implement geometry shader built-in interface
block instance gl_in defined in GL_OES_geometry_shader.
1. Add the definition of gl_in and its interface block gl_PerVertex
into the symbol table.
2. Support gl_Position as a member of gl_in.
3. Set the array size of gl_in when a valid input primitive type is
known.
4. Add check that it should be a compile error to index gl_in or
call length() on gl_in without a valid input primitive declaration.
This patch also adds unit tests to cover all these new features.
BUG=angleproject:1941
TEST=angle_unittests
Change-Id: I8da20c943b29c9ce904834625b396aab6302e1e1
Reviewed-on: https://chromium-review.googlesource.com/605059
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
977ee7eb
|
2017-07-21T11:38:27
|
|
Add gl_ViewportIndex to the symbol table
gl_ViewportIndex is a GLSL built-in that's needed to implement
instanced multiview. It is a bit of a special case: it only exists in
desktop GLSL and not ESSL, and it shouldn't be exposed to the parser.
We add a new level to the symbol table that's hidden from the parser
to make adding this kind of builtins in AST transforms consistent with
the way ESSL builtins are supported.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I51b2d983950b38c8e85e4b6ed00c6b39f9b3cb03
Reviewed-on: https://chromium-review.googlesource.com/580953
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
78ed6cd9
|
2017-08-09T16:19:00
|
|
Rename VariableInfo files to CollectVariables
Files that only have a single function should be named consistently
with the function. Unnecessary include in CallDAG.h is removed.
BUG=angleproject:2068
TEST=angle_unittests
Change-Id: I27d55a766b9eb66fcfd1e0a2341a2843bb9dc5bb
Reviewed-on: https://chromium-review.googlesource.com/608368
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d7487b13
|
2017-08-09T15:45:13
|
|
Clean up checking variable packing limits
This encapsulates expanding struct variables inside the VariablePacker
class that packs variables according to the GLSL ES spec.
The variable expansion step is no longer run twice when checking
uniforms against the max uniforms limit.
BUG=angleproject:2068
TEST=angle_unittests
Change-Id: I012ddaa249f71c0a78d937c98007c61352e64888
Reviewed-on: https://chromium-review.googlesource.com/608367
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
9b11ea4f
|
2017-07-11T16:50:08
|
|
Gather UniformBlock and ShaderStorageBlock separately
Refactor InterfaceBlocks since it only stands for UniformBlock before
ES31. But for ES31, uniform block and shader storage block both belong
to interface block.
This CL will add GetUniformBlocks and GetShaderStorageBlocks in
ShaderLang.h. Meanwhile, keep GetInterfaceBlocks which can return all
the interface blocks together.
BUG=angleproject:1951
Change-Id: I3036e201aadfbd490575ed03538c81bcc3793ff3
Reviewed-on: https://chromium-review.googlesource.com/582546
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
df7d7c9e
|
2017-07-31T09:34:04
|
|
Split varyings into input and output varyings in compiler
This patch intends to split all vector<Varying> into two vectors
to store input and output varyings separately in the compiler.
This patch is a base of implementing the built-ins, inputs and
outputs of a geometry shader to ANGLE GLSL compiler. Unlike the
vertex shaders (their outputs are varyings) and fragment shaders
(their inputs are varyings), the inputs and outputs of geometry
shaders are all varyings, so we need two vector<Varying> to store
them correctly.
BUG=angleproject:1941
Change-Id: I9e8cc16045d5e29e9a80a09dc31b33a7ae39b345
Reviewed-on: https://chromium-review.googlesource.com/593347
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
b5cc1198
|
2017-07-06T10:47:20
|
|
ES31: Add Geometry Shader layout qualifiers in GLSL compiler
This patch intends to implement Geometry Shader layout qualifiers
required in OpenGL ES 3.1 extension GL_OES_geometry_shader in ANGLE
GLSL compiler.
1. Add support to the shader type GL_GEOMETRY_SHADER_OES.
2. Implement Geometry Shader layout qualifiers in the GLSL compiler:
(1) Add support to OpenGL ES 3.1 extension "GL_OES_geometry_shader".
(2) Add validations of the input and output primitive declarations
in the Geometry Shader layout declarations.
(3) Add 'invocations' and 'max_vertices' support in the Geometry
Shader layout declarations
3. Add unit tests to cover all the new features added in this patch.
BUG=angleproject:1941
TEST=angle_unittests
Change-Id: Ie693e11f8a00dab3552626ed63e9336c7fbd3cb8
Reviewed-on: https://chromium-review.googlesource.com/560647
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
ab918821
|
2017-07-14T17:03:42
|
|
Clamp point size to maximum point size from the API on NVIDIA
NVIDIA OpenGL drivers have a bug where the point size range is being
reported incorrectly - it appears the core GL driver incorrectly gives
the range for smooth points, when it should be giving the range for
aliased points. Clamp the actual point size to the maximum point size
reported from the API so that the GLES spec is followed.
The same workaround seems to be necessary also on Android. The issue
was revealed by the trybots, and has not been fully diagnosed though.
The newly added test fails on AMD OpenGL.
As a part of this change, the existing tests in PointSpritesTest are
refactored to use gl_raii.
BUG=chromium:740560
TEST=angle_end2end_tests
Change-Id: Ic4a66c9ea16f5ae76beb3bb6577716d10c3b226e
Reviewed-on: https://chromium-review.googlesource.com/574598
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
a5e693af
|
2017-07-13T16:07:26
|
|
Make unique id counter a member of TSymbolTable
This makes unique id counting thread-safe.
BUG=angleproject:624
TEST=angle_unittests
Change-Id: Ie0f2c7e574470b39750d37d2181c790bc874b275
Reviewed-on: https://chromium-review.googlesource.com/570419
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
daaff1cc
|
2017-07-05T18:03:26
|
|
Set correct symbol ids when referring to GLSL built-ins
The symbol ids are fetched from the symbol table. A new utility
function is added to make this more convenient.
BUG=angleproject:1490
TEST=angle_unittests, angle_end2end_tests
Change-Id: I780430e3386f6599503d8290c568ca9bc9cad147
Reviewed-on: https://chromium-review.googlesource.com/559535
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
318f9aa5
|
2017-05-17T17:47:28
|
|
Initialize ANGLE_multiview caps and workaround state
The patch checks whether ANGLE_multiview can be supported in the OpenGL
renderer, updates the caps and adds a workaround field to enable
multiview support through the NV_viewport_array2 extension.
BUG=angleproject:2062
TEST=angle_end2end_tests
Change-Id: I99dae10564db7bcca41d7624f8de272c1d996e09
Reviewed-on: https://chromium-review.googlesource.com/567934
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
c39a19aa
|
2017-07-07T18:52:09
|
|
Select viewport index in the GLSL/ESSL vertex shader
The patch enables viewport selection for multiview rendering in the
GLSL/ESSL vertex shader through the use of the GL_NV_viewport_array2
extension. The AST is modified only for GLSL and ESSL to include the
viewport selection expression after ViewID_OVR's initialization.
BUG=angleproject:2062
TEST=angle_unittests
Change-Id: Iee05bb5a4b687ed53ddbdd466f1572227b1f0cde
|
|
7ef89a42
|
2017-07-05T14:23:06
|
|
Expose ViewID_OVR impostor in the fragment shader
The OVR_multiview specification states that gl_ViewID_OVR is visible
at each pipeline stage. Previously to this patch the ViewID_OVR
impostor was declared only in the vertex shader and occurrences of
gl_ViewID_OVR in the fragment shader were not being handled. The
patch addresses the issue by declaring the ViewID_OVR variable as
a vertex output in the vertex shader and as a fragment input
in the fragment shader.
BUG=angleproject:2062
TEST=angle_unittests
Change-Id: I895953e81d3632d9bb873e8ac081fdf36f63f6b7
Reviewed-on: https://chromium-review.googlesource.com/559337
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
cccf2b00
|
2017-07-05T14:50:54
|
|
Reorganize AST traversal utility code
Define TIntermTraverser and TIntermLValueTrackingTraverser in a
separate header file. hash() function is moved out from
TIntermTraverser as it is not related to the core functionality
of traversing and transforming ASTs.
Also reorganize some traversers to follow common conventions:
- Intermediate output is now in OutputTree.h/.cpp
- Max tree depth check is now in IsASTDepthBelowLimit.h/.cpp
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: Id4968aa9d4e24d0c5bac90dc147fc9f310de0184
Reviewed-on: https://chromium-review.googlesource.com/559531
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
4dd06d5d
|
2017-07-05T12:41:06
|
|
Set proper symbol ids on temporary symbol nodes
Temporary symbols used to all have symbol id 0. Now they get assigned
unique symbol ids. This makes it possible to keep track of them
according to the symbol id instead of their name, paving way to more
robust AST handling in the future.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I292e2e483cc39173524fd30a30b48c4c808442e5
Reviewed-on: https://chromium-review.googlesource.com/559335
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
b12040c4
|
2017-06-27T14:20:45
|
|
Clean up redundant initialization of gl_Position
In case gl_Position is statically used in the input shader, setting
the INIT_OUTPUT_VARIABLES flag will initialize gl_Position. Avoid
redundant initialization of gl_Position in this case.
Includes cleaning up memory management in InitOutputVariables_test:
all the pool-allocated variables will be freed at the end of each test
when the memory pool is cleared, so manual memory management is not
needed.
Also includes making the zero node check used in unit tests stricter
so that the tests are more reliable and moving it to
ShaderCompileTreeTest.h so that it can be reused in the future.
BUG=angleproject:2092
TEST=angle_unittests
Change-Id: I323a0a094afa6cea95c8a64e681d9fc485137423
Reviewed-on: https://chromium-review.googlesource.com/549418
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e145def0
|
2017-06-22T12:49:12
|
|
Propagate correct type to the lvalue in an output variable initializer
With the SH_INIT_OUTPUT_VARIABLES option enabled, vertex and fragment
shader outputs get initialized with zeros at the beginning of main.
However, previous to this patch the lvalues in the binary expression did
not receive the correct type. This can lead to incorrect modifications
of the AST in subsequent stages or incorrect output code from the
translator. The patch addresses the issue by copying the type
information from the symbol table.
BUG=angleproject:2081
TEST=angle_unittests
TEST=angle_end2end_tests
Change-Id: I9e062376bcfad7d57b637a5248caebce1c9a0688
Reviewed-on: https://chromium-review.googlesource.com/544982
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
77891c0a
|
2017-06-23T16:30:17
|
|
Fix wrong assignment of maxUniformVectors in GLSL compiler
This patch intends to fix a bug in ANGLE GLSL compiler.
In TCompiler::Init(resources), we should initialize maxUniformVectors by
resource.maxComputeUniformComponents / 4 when we attempt to initialize a
compiler for compute shader instead of resource.maxFragmentUniformVectors.
BUG=angleproject:2083
Change-Id: I4901f71ef5ac4f5770e2d5f8ee21786fcf19fbca
Reviewed-on: https://chromium-review.googlesource.com/545190
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|