|
1d9b8d80
|
2023-01-24T16:50:32
|
|
Reland "Add support for glShaderBinary"
This is a reland of commit 228973e73135924ddf6116e0b63eff5a1ccbf232
with the following fixes -
1. Apply patch from Yuly to fix chromium build errors
2. Fix ShaderBinaryTest instantiation call
3. Add ShaderBinaryTest to expectations file for IOS
Original change's description:
> Add support for glShaderBinary
>
> This patch adds the following -
> 1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token.
> 2. Compiler support to generate shader binaries.
> 3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for
> Vulkan translator.
> 4. Support to load GL_SHADER_BINARY_ANGLE binaries.
> 5. end2end tests for glShaderBinary.
>
> Tests: ShaderBinaryTest*
> Bug: angleproject:7833
> Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: mohan maiya <m.maiya@samsung.com>
> Reviewed-by: Charlie Lao <cclao@google.com>
Bug: angleproject:7833
Change-Id: I21135c52e2bae955342a99aff5631ba0e687eff1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4195852
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0c9cbf39
|
2023-01-26T12:07:51
|
|
Revert "Add support for glShaderBinary"
This reverts commit 228973e73135924ddf6116e0b63eff5a1ccbf232.
Reason for revert: breaks compile on ANGLE into Chromium roll
https://cr-buildbucket.appspot.com/build/8790942326644064097
https://cr-buildbucket.appspot.com/build/8790942759045412865
https://cr-buildbucket.appspot.com/build/8790942417069789217
Leaks detected on ASAN
https://cr-buildbucket.appspot.com/build/8790946657703508337
Original change's description:
> Add support for glShaderBinary
>
> This patch adds the following -
> 1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token.
> 2. Compiler support to generate shader binaries.
> 3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for
> Vulkan translator.
> 4. Support to load GL_SHADER_BINARY_ANGLE binaries.
> 5. end2end tests for glShaderBinary.
>
> Tests: ShaderBinaryTest*
> Bug: angleproject:7833
> Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: mohan maiya <m.maiya@samsung.com>
> Reviewed-by: Charlie Lao <cclao@google.com>
Bug: angleproject:7833
Change-Id: Ice19576acbc1351810ff0cd769ac17ad6c0abdf3
No-Try: true
No-Presubmit: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4197375
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
228973e7
|
2023-01-24T16:50:32
|
|
Add support for glShaderBinary
This patch adds the following -
1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token.
2. Compiler support to generate shader binaries.
3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for
Vulkan translator.
4. Support to load GL_SHADER_BINARY_ANGLE binaries.
5. end2end tests for glShaderBinary.
Tests: ShaderBinaryTest*
Bug: angleproject:7833
Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
9d5d619c
|
2022-12-26T00:00:00
|
|
Adjust clip distance compiler state and validation
The internal uniform, which is used for passing GL state on
some platforms, could be removed by GL drivers when built-ins
are not accessed; this may lead to failed frontend assertions.
Refactored relevant compiler state and validation helpers to
avoid ambiguous usage.
Added ClipCullDistanceTest.Unused test.
Bug: angleproject:4452
Change-Id: I06fdf9a69e01afb2ad11fa12e0510d8b0421e4bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4143839
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
2e086405
|
2022-12-23T00:00:00
|
|
Metal: Implement ANGLE_clip_cull_distance
Emulate clip distance varyings as they are not
available in Metal fragment shaders.
Drive-by: skip rewriting unused pipelines.
Bug: angleproject:7904
Change-Id: Iabc37ffe6e8c9e2d0fb34e508ae2512a200c8351
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4124235
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
91a5635a
|
2022-12-16T00:00:00
|
|
Support arbitrary clip and cull distance array sizes
Removed limitSimultaneousClipAndCullDistanceUsage cap.
Enhanced HLSL translator to support all valid combinations
of clip and cull distances.
Validate that these arrays are sized explicitly or by using
only constant indices; adjusted link program error message.
Enhanced tests to cover all possible combinations of
implicit and explicit array sizes for both built-ins.
Bug: angleproject:4452
Change-Id: I704db6dc3c8951e5ba482a3e4dad09e5b0182f9c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4111645
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
28e7adca
|
2022-12-09T00:00:00
|
|
GL: Implement clip distance state emulation
Pass the current set of enabled clip distances
to vertex shaders via an internal uniform and
dynamically set disabled elements to zero.
Bug: angleproject:7880
Change-Id: I709d31dc7ca0606decf49adf674460a941837683
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4094314
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0103213e
|
2022-12-05T00:00:00
|
|
GL: Support clip and cull distance redeclarations
* Fixed gl_PerVertex qualifier string.
* Updated ValidateClipCullDistanceTraverser to output
redeclared array sizes and maximum constant indices.
* Made DeclarePerVertexBlocks available for non-Vulkan
outputs.
* Updated DeclarePerVertexBlocks to remove gl_ClipDistance
and gl_CullDistance redeclarations.
* Enabled DeclarePerVertexBlocks for ESSL output when
gl_ClipDistance or gl_CullDistance are redeclared.
* Updated ESSL output to use 3.10 shading language version,
when the context has GL_EXT_clip_cull_distance enabled.
* Updated ESSL output to enable GL_EXT_shader_io_blocks
when gl_ClipDistance or gl_CullDistance are redeclared.
* Updated extension exposure conditions.
* Fixed typos in ParseContext.
Bug: angleproject:7763
Change-Id: Ib87368a1953ad546a407d634d8b00f71cf92c40c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4083705
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b5514bb2
|
2022-09-21T20:47:00
|
|
Support pixel local storage on ES 3.0
Now that the application-facing API is implemented, we don't have to
rely on ES 3.1 anymore. Expose and test the extension on ES 3.0.
Bug: angleproject:7279
Change-Id: I5635620b9088201c20bafd283813092a329225d6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915327
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Chris Dalton <chris@rive.app>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
|
|
a7dc51f2
|
2022-10-01T08:49:11
|
|
Add a framebuffer fetch implementation of PLS
The framebuffer fetch implementation works by attaching PLS backing
textures to the framebuffer, and then rewriting PLS uniforms as "inout"
fragment variables. The compiler's existing machinery takes it from
there and makes it work on GL and Vulkan, and soon Metal.
EXT_shader_framebuffer_fetch is now the preferred backend for pixel
local storage, but we also use EXT_shader_framebuffer_fetch_non_coherent
if shader images can't be coherent. This is especially interesting for
Vulkan, since noncoherent framebuffer fetch is possible without any
extensions.
Bug: angleproject:7279
Bug: angleproject:7683
Bug: angleproject:7684
Bug: angleproject:7724
Change-Id: I33f3b2c6df9a5709969d9165c448ea71b096c9e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900142
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
|
|
c10326f1
|
2022-08-26T11:37:59
|
|
Make shader dump code compile after ShCompileOptions API change
Make the output directory configurable with the define
that turns on the dump feature.
Write each aggregate struct in its own block of memory, so that
if an aggregate changes, the binary format does not change
so easily.
Choose the filename based on the contents hash, so that multiple
dump sessions do not produce excessive amount of dumps.
Bug: angleproject:7612
Change-Id: Ifccd2d83e3361dc4633b601fd18f425c9ec44790
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858263
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
ba4b6913
|
2022-08-23T09:34:27
|
|
Fix data race in BlobCache
* Re-enable shader cache feature
* Improve BlobCache thread-safety test
* Improve EGLProgramCacheControlTest to not check the size
of the BlobCache, since the shader cache interferes with this.
* Include the arguments to ConstructCompiler() and Compile()
in the key hash for the shader cache.
Bug: angleproject:7036
Change-Id: Ied4e11f9160552f2f9358d99b5656315239ba856
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3851161
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
|
|
493b5aff
|
2022-08-09T14:57:24
|
|
Vulkan: Workaround ARM bug with stencil write mask
Bug: angleproject:7556
Change-Id: I0aa17c178071cc15d8ee15f700b0c4932819c72a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3821367
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
6f80f0f0
|
2022-08-06T02:29:19
|
|
Translator: Clean up the compile flag passing interface
Historically, compile flags were sent to the translator as a bitmask.
Recently, we were getting close to running out of bits. Additionally,
direct-to-metal work had started to introduce constants to be passed to
the translator, which were misplaced in ShBuiltInResources and Caps.
Recent work on Pixel Local Storage adds even more constants, aggravating
the situation.
In this change, the interface to passing compile flags is reworked. A
struct is passed (instead of a bitmask) that has one bit for each flag.
This can be indefinitely extended. Additionally, the constants needed
by metal and PLS are also placed in this struct. In turn, the backends
can set these options directly, and don't have to hack them into Caps to
further get hacked into ShBuiltInResources.
Bug: angleproject:7559
Change-Id: If93f1e1b8818ad3a0ac708ab04ab93b4b397d114
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3812562
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
91976352
|
2022-06-21T15:41:02
|
|
Use C++17 attributes instead of custom macros
Bug: angleproject:6747
Change-Id: Iad6c7cd8a18d028e01da49b647c5d01af11e0522
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3718999
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
fea19567
|
2022-05-17T17:44:06
|
|
Vulkan: Remove removeEarlyFragmentTestsOpt flag
* Removed removeEarlyFragmentTestsOptimization and the related
SPIRV transformation and variables.
* Removed mUsesEarlyFragmentTestsOptimization.
* Removed SH_EARLY_FRAGMENT_TESTS_OPTIMIZATION.
* Merged updateUsesEarlyFragmentTestsOptimization() into
updateFragmentInoutRange().
Bug: angleproject:7347
Change-Id: I7299bd4e8ab5363e5cf06eb48419d4f469106e12
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3648217
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
5113ae8e
|
2022-04-29T22:42:59
|
|
Vulkan: Explicitly enable per-sample shading if `sample` used
The Vulkan spec is not explicit about the `Sample` decoration implicitly
enabling per-sample shading. While this is being corrected in the spec,
the ARM Vulkan driver does not have this implicit behavior.
A workaround is added such that the usage of the `sample` qualifier is
reported, and used to explicitly enable per-sample shading through the
API.
Bug: angleproject:6876
Change-Id: Idb8345aacdcfa45cb37fefcd30aa5405168d21e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3615738
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e10803f7
|
2022-01-20T09:03:55
|
|
Compiler: Allow deferred array sizing in geometry shaders
Based on work by Brandon Schade <b.schade@samsung.com>.
When a shader sets an array input size in a GS after declaring input
variables, compilation would fail.
Example shader -
in vec3 normal[];
in vec3 view_dir[];
in float patch_dist[];
in float e_patch_wire_scale[];
...
layout(triangles) in;
layout(triangle_strip, max_vertices=3) out;
void main() {
...
Update translator to handle such cases.
Also add a new check that there are no remaining unsized
arrays when compilation has completed.
Test: GeometryShaderTest.DeferredSetOfArrayInputSize
Bug: angleproject:3571
Bug: angleproject:7125
Change-Id: I4853832c27f9551284bcca92b98cbf5f3a63aaf5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3564259
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
1e773db9
|
2022-02-22T10:51:15
|
|
Vulkan: Shader support for KHR_blend_equation_advanced
Translator can accept the layout qualifiers for the advanced blend
equation. No emulation code is currently generated, and ANGLE will
initially rely on the corresponding Vulkan extension.
Based on change by Brandon Schade <b.schade@samsung.com>
Bug: angleproject:3586
Test: angle_unittests --gtest_filter=*KHRBlendEquationAdvanced*
Change-Id: I3b728c5f144386d7030bbbb301ddb07daa1492b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3481309
Reviewed-by: Brandon Schade <b.schade@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
46149c0e
|
2021-09-17T15:38:47
|
|
Translator: Fix pruning functions that declare a struct
When pruning unused functions, the entire declaration of the function is
removed. If the function declares a struct as part of its return value,
the declaration of that struct was lost. This change makes sure that
declaration survives the pruning. For example:
struct S { vec4 v; } unused_func() { ... }
is now replaced with:
struct S { vec4 v; };
This change also makes struct usage validation more stringent.
Bug: chromium:1248753
Change-Id: Idd9a87fd2e785135775cfea62995fd33adaf3c09
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3169691
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
061188a7
|
2021-08-04T10:07:47
|
|
Translator: General clean up
General clean up done as part of other changes, split to simplify
review.
Bug: angleproject:4889
Bug: angleproject:6132
Change-Id: Iade9954d187a759be9edd0e3754be007f4133c56
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3071598
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
798c5200
|
2021-07-31T22:17:48
|
|
Translator: Make precise-ness a property of AST nodes
Instead of creating a "set of precise nodes", the nodes themselves are
marked precise. This change is preparation for another change that
overhauls precision propagation through the nodes, and which would also
be storing the promoted precision in the nodes.
Bug: angleproject:4889
Change-Id: Ieec8864be5cd2e95ed6fb4d90b367946d9f33fa1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3065569
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1ce78397
|
2021-07-30T16:51:45
|
|
Remove support for WEBGL_debug_shader_precision
This extension was rejected, and the implementation was hacky. This
clean up is part of an ongoing work to improve precision handling.
Bug: angleproject:6059
Change-Id: If08581ec6f19cf1698ffa3dd6d248dc5e68a1d31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3064303
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
3036e090
|
2021-07-29T15:55:39
|
|
Vulkan: Direct SPIR-V Gen: Support the precise keyword
The precise keyword is different in GLSL in that it defines what
arithmetic operations _that have led to the value being assigned to a
variable_ should be done precisely (i.e. not "contracted").
A tree traverser is implemented that detects precise access chains and
applies precise-ness to the right hand side of assignment expressions to
said access chains. This is only done if the shader uses the precise
keyword in the first place. The algorithm for this is inspired by the
implementation in glslang.
This change additionally:
- Fixes parser to allow precise on function parameters
- Fixes GLSL code generation to output precise on struct members and
function parameters.
Bug: angleproject:4889
Change-Id: Ie3808c3c8c08da308e88af20f5f90379d9d14d47
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3056369
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7c6da493
|
2021-07-26T21:24:25
|
|
Translator: Make sure built-in variables are consistent
Some transformations left the tree in an inconsistent state, for example
if it used gl_SampleMask from ES3.1+OES_sample_variables and the
transformation added a usage of gl_SampleMask from ES3.2. The offending
transformations are fixed and AST validation is improved to catch such
errors.
Bug: angleproject:4889
Change-Id: I9d9ea5bb43a9408dd4c6dc3e89ec20d60dfeff73
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3054613
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a3df80ea
|
2021-07-19T17:15:13
|
|
Translator: Validate AST consistency w.r.t function calls
This ensures that tree transformations don't create invalid function
calls. Additionally, it's validated that no raw function calls are
issued, as that's deprecated.
Bug: angleproject:4889
Change-Id: Iabbb493dcc0a5654bbb5f930e402bf3492c89979
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3040119
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
|
|
2534ee4c
|
2021-07-02T12:18:07
|
|
Limit the size of declared variables in WebGL shaders.
Add an implementation-specific limit for the sizes of variables
(specifically arrays, structs, and arrays of structs) in WebGL 1.0 and
2.0 shaders, and interface blocks in WebGL 2.0 shaders, no matter
whether they're input, output, or local variables.
It is legal in the OpenGL ES and OpenGL ES Shading Language
specifications to fail to compile shaders for implementation-specific
reasons.
Add WebGLCompatibilityTests covering the new limit.
Bug: chromium:1220237
Change-Id: I6c1d24a5d9a382ba4454c2dfbb856ab9468f5409
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3023033
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
013613ea
|
2021-06-08T01:33:30
|
|
Translator: Allow invariant on I/O block members
The GLSL ES 3.2 spec says:
> Only variables output from a shader can be candidates for invariance.
And:
> All uses of invariant must be at global scope or on block members, and
> before any use of the variables being declared as invariant.
As a result, it's possible to specify `invariant` on a member of an
output I/O block.
Bug: angleproject:4889
Change-Id: I8822ed214813db8424d6a67dfef7f069a448b19d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2946115
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
6746e5dd
|
2021-06-01T22:48:14
|
|
Vulkan: SPIR-V Gen: Basic support for compute shaders
This change enables direct SPIR-V generation for compute shaders and
enables a few tests. A handful of built-in functions are translated to
support said tests.
Bug: angleproject:4889
Change-Id: I8fd6dc50ff31559a738ba680a993fb197e29fcf9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939330
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
1b680b77
|
2021-06-02T22:04:45
|
|
Reland "Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation"
This is a reland of a474fd7de769ae817db83490d410510cdbed75b2
The integer clamp used in this transformation is not available in es100
shaders, and float clamp is used instead.
Original change's description:
> Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation
>
> This translator flag adds a clamp to non-literal indices to arrays. Two
> strategies were provisioned, using the clamp intrinsic or a hand-written
> function. The latter is ununsed in angle, chromium, firefox and
> webkit, so this change removes this option and uses the clamp intrinsic
> unconditionally.
>
> The clamp itself was added at output generation time with special flags
> set on the index node. This is changed such that a proper AST
> transformation is done and no-special handling would be necessary.
>
> Bug: angleproject:4361
> Bug: angleproject:4889
> Change-Id: Ieccfd2c1c347563fb5282e9fa66d39304e62f2ca
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2935041
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:4361
Bug: angleproject:4889
Change-Id: I9397ec7e6bdfb706c2a891b33fd3b2b79e883ccc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2940902
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
|
|
10f15011
|
2021-06-03T19:22:53
|
|
Revert "Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation"
This reverts commit a474fd7de769ae817db83490d410510cdbed75b2.
Reason for revert: breaks GLES2ConformTest, see roll into Chromium:
https://chromium-review.googlesource.com/c/chromium/src/+/2935093
Original change's description:
> Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation
>
> This translator flag adds a clamp to non-literal indices to arrays. Two
> strategies were provisioned, using the clamp intrinsic or a hand-written
> function. The latter is ununsed in angle, chromium, firefox and
> webkit, so this change removes this option and uses the clamp intrinsic
> unconditionally.
>
> The clamp itself was added at output generation time with special flags
> set on the index node. This is changed such that a proper AST
> transformation is done and no-special handling would be necessary.
>
> Bug: angleproject:4361
> Bug: angleproject:4889
> Change-Id: Ieccfd2c1c347563fb5282e9fa66d39304e62f2ca
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2935041
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:4361
Bug: angleproject:4889
Change-Id: I911cfe0199b04dbc3d6d4265775b6c2de00a9777
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2937024
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
a474fd7d
|
2021-06-02T22:04:45
|
|
Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation
This translator flag adds a clamp to non-literal indices to arrays. Two
strategies were provisioned, using the clamp intrinsic or a hand-written
function. The latter is ununsed in angle, chromium, firefox and
webkit, so this change removes this option and uses the clamp intrinsic
unconditionally.
The clamp itself was added at output generation time with special flags
set on the index node. This is changed such that a proper AST
transformation is done and no-special handling would be necessary.
Bug: angleproject:4361
Bug: angleproject:4889
Change-Id: Ieccfd2c1c347563fb5282e9fa66d39304e62f2ca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2935041
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d7aa0130
|
2021-04-26T16:56:15
|
|
Upstream Apple's direct-to-Metal backend: compile translator.
This change is meant to merge the translator changes from Apple's
direct-to-Metal backend. Taken from Kyle Piddington's CL:
https://chromium-review.googlesource.com/c/angle/angle/+/2857366/
The goal of this CL is to merge the translator code in a state that
compiles, but not to switch the Metal backend over to use this
translator backend yet.
Bug: angleproject:5505
Change-Id: I68a6354604498cd5fd1eb96c13fc56f3b38f2bd0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897536
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
|
|
58eabfd7
|
2021-04-08T23:57:04
|
|
Translator: Validate consistent variable references
Some transformations change variable declarations. This validation
ensures that all references to said variables are appropriately replaced
as well.
Bug: angleproject:2733
Change-Id: I6c2873968eeed4cba66e70069f84eb69a1f77074
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2818140
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
e670fc72
|
2021-01-18T15:51:42
|
|
Implement shader compiler changes for Tessellation.
Numerous rule changes to support validating Tessellation Control and
Evaluation shaders. New per-patch inputs and output variable support.
Includes a new traverser step that validates barrier function calls.
Functionality changes upcoming in http://crrev.com/c/2568234
Bug: angleproject:3572
Change-Id: If8da1c21d30efa12c60ed0d6c3f8cf0b27e4c86f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633936
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
|
|
173f1c94
|
2020-12-03T13:53:16
|
|
Translator: Collect gl_in as a varying.
This unifies the variable handling for IO blocks. Previously the
gl_in block we treated as an "in block" similar to an interface block.
Bug: angleproject:5423
Change-Id: Idf2db4c209055fa9ffca567dab39c89464eba156
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2571966
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
24f64249
|
2020-11-16T17:55:02
|
|
Vulkan: Track specialization constant usage bit and feedback to ctx
Right now context does not know which specialization constant is used by
the shader. Whenever a specialization constant changes, we assume shader
program is using it, we always reach into vulkan driver to ask for a new
program. Instead we can track shader's usage of specialization constant
so that context can utilize this information to avoid recompile pipeline
program if an unused specialization constant has changed.
This CL implements the plumbing the usage bits form compiler to program
object, it does not actually utilize the usage bits to avoid unnecessary
compilation yet.
Bug: b/173461931
Change-Id: Iebc9d0638c17b1a282c8b6093ce6bae154246e57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2542866
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
7a0faa82
|
2020-09-24T20:15:26
|
|
Revert "Pass #pragma optimize setting down to compilation."
This reverts commit 499173de1c91932ba272269cab6918bf7e8d7c11.
Reason for revert: Causes unexpected HLSL compiler errors in some
cases. See bug.
Bug: angleproject:5094
Original change's description:
> Pass #pragma optimize setting down to compilation.
>
> This will allow us to disable optimizations in the back-end. This can
> be useful both for developers and for ANGLE to disable very slow
> shader compilation on D3D11.
>
> Also apply this pragma to VerifyMaxVertexUniformVectorsWithSamplers.
> Reduces compilation time by half in local testing.
>
> Bug: angleproject:5076
> Change-Id: I64ad576e11b9cee5b41f8af0d3621570304d65c2
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2420749
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
TBR=geofflang@chromium.org,jonahr@google.com,jmadill@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:5076
Change-Id: I733e788fe8e9421ae0af662c0eb51af1ed79dde3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2429517
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
499173de
|
2020-09-20T10:42:56
|
|
Pass #pragma optimize setting down to compilation.
This will allow us to disable optimizations in the back-end. This can
be useful both for developers and for ANGLE to disable very slow
shader compilation on D3D11.
Also apply this pragma to VerifyMaxVertexUniformVectorsWithSamplers.
Reduces compilation time by half in local testing.
Bug: angleproject:5076
Change-Id: I64ad576e11b9cee5b41f8af0d3621570304d65c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2420749
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
dee4d7a5
|
2020-04-10T10:22:56
|
|
Vulkan: Early fragment tests optimization
Checks if early fragment tests as an optimization is feasible and enable
it if we can. In the link time, if context state diagrees with
optimization (in rare case), then remove the
ExecutionModeEarlyFragmentTests sprv op code.
Bug: angleproject:4508
Change-Id: Ifbb06c0ffb050a9f3ddb16ab50362e908b4b9cf6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2136490
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
a1ceb87b
|
2020-02-25T11:58:19
|
|
Vulkan:Refactor precision emulation code
GLSL, ESSL, and HLSL translators all had the same code to emulate
precision so migrate that code to base class.
This is a structural change to prepare for honoring precision
qualifiers in the Vulkan translator as well, which is done in a
follow-on commit.
Bug: angleproject:3078
Change-Id: Id85bba83543189e3bbc4002be92b056e63afc8de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2072644
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
230e14dd
|
2020-01-21T23:32:06
|
|
Add support for layout(early_fragment_tests) in;
Bug: angleproject:4314
Change-Id: I37b228f37201cc4188834e68459cd7294727c3ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2014240
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ffdd58f5
|
2019-12-28T15:34:41
|
|
Fixing OVR_multiview and OVR_multiview2 issues
Found two issues when native OVR_multiview and OVR_multiview2 extensions are generated.
1. OVR_multiview got replaced by the OVR_multiview2 in the translated shader (ESSL & GLSL)
2. Duplicate #extension OVR_multiview2 (for Fragment & Vertex) and 'layout (num_views=x)' (for Vertex) got generated into the translated shader.
Bug: angleproject:4247
Change-Id: I9a550883eeb326d95af4557578f8202a9493f4ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1983802
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
33a00efd
|
2019-11-27T09:21:45
|
|
Add Compute Shared Memory Size Validation
Add tracking of shared memory declarations in compute shaders.
Test:
angle_deqp_gles31_tests --gtest_filter=dEQP.GLES31/functional_debug_negative_coverage_callbacks_compute_exceed_shared_memory_size_limit
Bug: 4173
Change-Id: If2a86d467a82f73fa5b2ee0ced752701acfe1872
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1934653
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
c09ae15c
|
2019-02-01T14:16:32
|
|
Enable -Wextra-semi and -Wextra-semi-stmt.
This will prevent users from accidentally making semicolon errors in
the future.
Bug: chromium:926235
Change-Id: I79a6fa376fb1ad8f0fcf1b65b1f572a035d1f4e9
Reviewed-on: https://chromium-review.googlesource.com/c/1446493
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
19515019
|
2017-06-26T18:00:17
|
|
Refactor CollectVariables
New helper functions are added for collecting built-in variables, and
the traverser is encapsulated inside VariableInfo.cpp. The helper
functions get data for built-in variables from the symbol table, so a
duplicate copy of the data doesn't need to be maintained in
CollectVariables any more.
BUG=angleproject:2068
TEST=angle_unittests
Change-Id: I42595d0da0e5d4fb634a3d92f38db1dd6dd9efab
Reviewed-on: https://chromium-review.googlesource.com/549323
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
12b0b399
|
2017-05-30T13:22:31
|
|
Clean up ValidateOutputs
Remove the validateOutputs method from Compiler and replace it with a
static method alongside the traverser. This encapsulates the
ValidateOutputs implementation better.
TEST=angle_unittests
BUG=angleproject:2068
Change-Id: I1788cb9726db41ca35fd0e746f8d48ced7fee74f
Reviewed-on: https://chromium-review.googlesource.com/535477
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
0ffc441e
|
2017-05-19T14:18:55
|
|
Initialize uninitialized globals in GLSL output
Initializing globals is done by the DeferGlobalInitializers AST
transformation, which makes sure that the global variable init
proceeds in the correct order. This is important since some global
variables may use other uninitialized globals in their initializers.
The global variable init is only done in case the WebGL shader spec is
being followed. This avoids adding global initializers twice in case
the same shader goes through multiple translations, assuming only one
of them is a WebGL shader translation.
BUG=angleproject:1966
TEST=angle_end2end_tests, WebGL conformance tests
Change-Id: Iea701d3ae40edc906abd87303f2aa27fd23bf55a
Reviewed-on: https://chromium-review.googlesource.com/509689
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b427920e
|
2017-05-18T15:08:24
|
|
Clean up ValidateMaxParameters
It doesn't need to use a traverser, since all function definitions can
be found simply by iterating over the children of the root node.
BUG=angleproject:2040
TEST=angle_unittests
Change-Id: I18a98eff9710485c0cdce73e7fffe124f7d7afb2
Reviewed-on: https://chromium-review.googlesource.com/508791
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
5df2b9d2
|
2017-05-18T12:15:28
|
|
Clean up AddDefaultReturnStatements
It doesn't need to use a traverser, since all function definitions can
be found simply by iterating over the children of the root node.
BUG=angleproject:2040
TEST=angle_end2end_tests
Change-Id: I380942f90a0e73152f296b98d1fb027762d913b0
Reviewed-on: https://chromium-review.googlesource.com/508689
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
9cbc07c3
|
2017-05-10T18:22:01
|
|
Simplify AST transformations that need to find main
Share code for finding the main function from the AST between
InitializeVariables, DeferGlobalInitializers,
EmulateGLFragColorBroadcast and UseInterfaceBlockFields. This makes
InitializeVariables simpler in particular, as it doesn't need an AST
traverser anymore.
BUG=angleproject:2033
TEST=angle_unittests, WebGL conformance tests
Change-Id: I14c994bbde58a904f6684d2f0b72bd8004f70902
Reviewed-on: https://chromium-review.googlesource.com/501166
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
9ec79391
|
2017-03-31T23:04:23
|
|
Use TLValueTrackingTraverser in ValidateLimitations
Use TLValueTrackingTraverser to determine whether a loop index is used
as an l-value. This replaces custom logic in ValidateLimitations,
greatly simplifying the code. Also pass the symbol table to
ValidateLimitations as a parameter, which removes the need to store a
global pointer to the current ParseContext.
BUG=angleproject:1960
TEST=angle_unittests, WebGL conformance tests
Change-Id: I122c85c78bbea05833d7c787cd184de568c5c45f
Reviewed-on: https://chromium-review.googlesource.com/465606
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
09b04a2f
|
2016-12-15T13:30:26
|
|
Add shader translator support for OVR_multiview
The OVR_multiview and OVR_multiview2 extensions add gl_ViewID_OVR to
shaders. gl_ViewID_OVR can be translated either as is in GLSL output
or as a uniform by setting the SH_TRANSLATE_VIEWID_OVR_AS_UNIFORM
compiler flag.
If WebGL output is selected, the shaders will be validated according
to proposed rules in the WEBGL_multiview spec.
BUG=angleproject:1669
TEST=angle_unittests
Change-Id: I19ea3a6c8b4edb78be03f1a50a96bfef018870d0
Reviewed-on: https://chromium-review.googlesource.com/422848
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
77ba408a
|
2016-12-16T12:01:18
|
|
Unify Diagnostics interface
Use the same kind of interface for reporting preprocessor errors as
for reporting regular compiler errors, and make global errors like
having too many uniforms also go through Diagnostics. Also don't
create std::string objects unnecessarily.
Includes cleanups of some dead code related to reporting errors.
BUG=angleproject:1670
TEST=angle_unittests
Change-Id: I3ee794d32ddeec1826bdf1b76b558f35259f82c0
Reviewed-on: https://chromium-review.googlesource.com/421527
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
d7b1ab58
|
2016-12-12T14:42:19
|
|
Fix up translator style.
Using git cl format.
BUG=angleproject:650
Change-Id: I7d3f98d2b0dcfb0a8de6c35327db74e55c28d761
Reviewed-on: https://chromium-review.googlesource.com/419059
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
89dd8f37
|
2016-11-09T12:59:30
|
|
Remove invariant declaration in vertex shader for translation from ESSL 3.00 to GLSL <= 4.1
This is a follow-up patch of
https://chromium-review.googlesource.com/408569. This CL removes
invariant declaration in ESSL 3.00 vertex shader, such like:
"
out vec4 foo;
invariant foo;
"
This CL also adds the workarounds in libANGLE.
BUG=chromium:639760
TEST=webgl2_conformance
Change-Id: I568ab51a9a2f5da10d1aff0b63aae8805097e081
Reviewed-on: https://chromium-review.googlesource.com/409157
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b7bf7426
|
2016-11-08T14:44:05
|
|
Don't ouput "invarant" and "centroid" in GLSL 4.1 or older.
BUG=chromium:639760,chromium:641129
TEST=webgl2_conformance
Change-Id: I5fe87246eaea78888529d7b45b79399e6065daa9
Reviewed-on: https://chromium-review.googlesource.com/408569
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
|
|
acb4b81a
|
2016-11-07T13:50:29
|
|
translator: Put ShaderLang APIs in "sh" namespace.
Working with glslang in Vulkan means we are static linking libANGLE
with functions that have the same name as our translator APIs. We
can fix this by scoping our APIs. We don't need to scope the types
of the file, since they don't conflict.
This will require a follow-up patch to remove the unscoped APIs
once we switch over Chromium.
We also scope TCompiler and some related classes to avoid multiply
defined link errors with glslang.
BUG=angleproject:1576
Change-Id: I729b19467d2ff7d374a82044b16dbebdf2dc8f16
Reviewed-on: https://chromium-review.googlesource.com/408337
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
1df16022
|
2016-10-27T08:16:56
|
|
TranslatorGLSL: collect variables when flattening pramga invariant all
BUG=chromium:659472
Change-Id: Icfeada9f09fff5d28eb3f4fafb2c94d57598af1f
Reviewed-on: https://chromium-review.googlesource.com/403849
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
705a9194
|
2016-08-29T10:05:27
|
|
Reland "Remove invariant qualifier for input in fragment shader"
This relands https://chromium-review.googlesource.com/#/c/400005/.
ESSL and GLSL are not consistent on invariant matching in vertex shader
and fragment shader. See the following rules:
ESSL 1.00 - input and output must match
ESSL 3.00 - only output, inputs cannot be declared as invariant.
GLSL 1.10.59 - does not exist
GLSL 1.20.8 - input and output must match
GLSL 1.30.10 - input and output must match
GLSL 1.40.8 - input and output must match
GLSL 1.50.11 - input and output must match
GLSL 3.30.6 - input and output must match
GLSL 4.00.9 - input and output must match
GLSL 4.10.6 - input and output must match
GLSL 4.20.11 - input can omit invariant
GLSL 4.30.8 - input can omit invariant
GLSL 4.40.9 - input can omit invariant
GLSL 4.50.5 - input can omit invariant
Since GLSL 4.20, invariant qualifier description were changed to:
"
Only variables output from a shader (including those that are then input
to a subsequent shader) can be candidates for invariance. This includes
user-defined output variables and the built-in output variables. As only
outputs need be declared with invariant, an output from one shader stage
will still match an input of a subsequent stage without the input being
declared as invariant.
"
It's not very clear if input in fragment can be declared as invariant.
Mesa driver disallows use of input declared as invariant in fragment
shader, while other drivers may allow it. This CL removes invariant
declaration for input in fragment shader except AMD driver in Linux.
AMD's driver obviously contradicts the spec by forcing invariance to
match between vertex and fragment shaders.
BUG=chromium:639760, chromium:659326
TEST=conformance/glsl/misc/shaders-with-invariance.html and
conformance/glsl/bugs/invariant-does-not-leak-across-shaders.html
Change-Id: I0aa9be14f0cee7a11a249c91fba27c570c52ca1b
Reviewed-on: https://chromium-review.googlesource.com/404228
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
c5fa0ad5
|
2016-10-25T21:36:54
|
|
Revert "Remove invariant qualifier for input in fragment shader"
This reverts commit d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a.
Because of WebglConformance_conformance_glsl_bugs_invariant_does_not_leak_across_shaders failure
BUG=chromium:659326
Change-Id: I0602e24f3d34ccf852cda865f673c5c7634f82a6
Reviewed-on: https://chromium-review.googlesource.com/403230
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
d842a6b2
|
2016-08-29T10:05:27
|
|
Remove invariant qualifier for input in fragment shader
ESSL and GLSL are not consistent on invariant matching in vertex shader
and fragment shader. See the following rules:
ESSL 1.00 - input and output must match
ESSL 3.00 - only output, inputs cannot be declared as invariant.
GLSL 1.10.59 - does not exist
GLSL 1.20.8 - input and output must match
GLSL 1.30.10 - input and output must match
GLSL 1.40.8 - input and output must match
GLSL 1.50.11 - input and output must match
GLSL 3.30.6 - input and output must match
GLSL 4.00.9 - input and output must match
GLSL 4.10.6 - input and output must match
GLSL 4.20.11 - input can omit invariant
GLSL 4.30.8 - input can omit invariant
GLSL 4.40.9 - input can omit invariant
GLSL 4.50.5 - input can omit invariant
Since GLSL 4.20, invariant qualifier description were changed to:
"
Only variables output from a shader (including those that are then input
to a subsequent shader) can be candidates for invariance. This includes
user-defined output variables and the built-in output variables. As only
outputs need be declared with invariant, an output from one shader stage
will still match an input of a subsequent stage without the input being
declared as invariant.
"
It's not very clear if input in fragment can be declared as invariant.
Mesa driver disallows use of input declared as invariant in fragment
shader, while other drivers may allow it.
In ESSL 3.00, inputs cannot be declared as invariant. ANGLE should
follow this rule for GLSL >= 4.20.
BUG=chromium:639760
Change-Id: I7f7a07401381ac970488b69752f6d50d4f19d31f
Reviewed-on: https://chromium-review.googlesource.com/400005
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
7835b525
|
2016-10-08T11:20:17
|
|
Reland "Add workaround for unused std140 and shared uniform blocks on MacOS"
On some Mac drivers with shader version 4.1, they will
treat unused std140 and shared uniform blocks' members as inactive. However,
WebGL2.0 based on OpenGL ES3.0.4 requires all members of a named uniform block
declared with a shared or std140 layout qualifier to be considered active.
The uniform block itself is also considered active.
This workaround is to reference all members of unused std140 and shared uniform blocks
at the beginning of the vertex/fragment shader's main().
BUG=chromium:618464
TEST=UniformBufferTest.ActiveUniformBlockNumber
Change-Id: I18da4e2b61b0170068bf5ea38ce54667b0737780
Reviewed-on: https://chromium-review.googlesource.com/395648
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
6d40bbdd
|
2016-09-30T13:49:38
|
|
Split TIntermBlock from TIntermAggregate
The new TIntermBlock node class replaces TIntermAggregate nodes with
the EOpSequence op. It represents the root node of the tree which is
a list of declarations and function definitions, and any code blocks
that can be denoted by curly braces. These include function and loop
bodies, and if-else branches.
This change enables a bunch of more compile-time type checking, and
makes the AST code easier to understand and less error-prone.
The PostProcess step that used to be done to ensure that the root node
is TIntermAggregate is removed in favor of making sure that the root
node is a TIntermBlock in the glslang.y parsing code.
Intermediate output formatting is improved to print the EOpNull error
in a clearer way.
After this patch, TIntermAggregate is still used for function
definitions, function prototypes, function parameter lists, function
calls, variable and invariant declarations and the comma (sequence)
operator.
BUG=angleproject:1490
TEST=angle_unittests, angle_end2end_tests
Change-Id: I04044affff979a11577bc1fe75d747e538b799c8
Reviewed-on: https://chromium-review.googlesource.com/393726
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
c9e6026c
|
2016-09-30T17:15:07
|
|
Revert "Add workaround for unused std140 and shared uniform blocks on MacOS"
This reverts commit 9aa83fe302578d226f195fff5fb3f0e2fb723a4c.
The new test UniformBufferTest.ActiveUniformNumberAndName/ES3_OPENGL is failing on multiple platforms. Examples:
https://build.chromium.org/p/chromium.gpu.fyi/builders/Mac%2010.10%20Release%20%28ATI%29/builds/12285
https://build.chromium.org/p/chromium.gpu.fyi/builders/Linux%20Release%20(ATI)
Change-Id: I78b1a4d58e9a291e40ad304eb32f990e0518f7ee
Reviewed-on: https://chromium-review.googlesource.com/391049
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
9aa83fe3
|
2016-09-29T08:42:42
|
|
Add workaround for unused std140 and shared uniform blocks on MacOS
On some Mac drivers with shader version 4.1, they will
treat unused std140 and shared uniform blocks' members as inactive. However,
WebGL2.0 based on OpenGL ES3.0.4 requires all members of a named uniform block
declared with a shared or std140 layout qualifier to be considered active.
The uniform block itself is also considered active.
This workaround is to reference all members of unused std140 and shared uniform blocks
at the beginning of the vertex/fragment shader's main().
BUG=chromium:618464
TEST=UniformBufferTest.ActiveUniformBlockNumber
Change-Id: I1d2c5e3e8da04786ac6a37fd26f7bb9c14cd76ed
Reviewed-on: https://chromium-review.googlesource.com/387169
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
7ebb97fc
|
2016-09-08T18:01:50
|
|
Use 64-bits compile options
BUG=chromium:645071
Change-Id: I31825123bf4cb45fb37a93f538e8936487beb5ff
Reviewed-on: https://chromium-review.googlesource.com/382712
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
966456de
|
2016-09-12T11:42:44
|
|
Remove SH_TIMING_RESTRICTIONS compiler flag
The timing restrictions code is not in use and not updated for ESSL3,
so it is better to remove it to make refactoring the AST easier.
It can also be argued that perfect prevention of shader timing attacks
is not feasible due to factors that are not under control of ANGLE,
such as fixed function color compression in GPUs. Such color
compression may make the use of texture bandwidth and thus performance
dependent on the content of a texture regardless of whether a
compressed format is chosen through the API.
SH_DEPENDENCY_GRAPH flag that could only be active together with the
timing restrictions flag is also removed, along with all the code that
was supporting it. The newer CallDAG code is used for different
purposes and is kept.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I2cd10e18df366e8e43f7c3af1ca12d2a4bfb2007
Reviewed-on: https://chromium-review.googlesource.com/384511
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
c2c5fc48
|
2016-08-31T15:24:22
|
|
Remove CSS Shader related code
CSS shader has been removed from spec and chrome code base. Remove the
code in ANGLE.
BUG=chromium:233383
Change-Id: I93a35437f540e51ce7af9d49f21ca60d7c0b156a
Reviewed-on: https://chromium-review.googlesource.com/378739
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
4c4c8e72
|
2016-08-04T12:25:34
|
|
Add compute program compilation and linking support
Compute shaders can be now compiled and linked to create programs.
Some tests are added to verify successful and unsuccessful compute
shader linking.
The patch also replaces std::array<int, 3> with a custom struct
WorkGroupSize.
BUG=angleproject:1442
TEST=angle_end2end_tests
TEST=angle_unittests
Change-Id: I4ab0ac05755d0167a6d2a798f8d7f1516cf54d84
Reviewed-on: https://chromium-review.googlesource.com/366740
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
bccc65d3
|
2016-07-19T16:48:43
|
|
Flatten "#pragma STDGL invariant(all)" into varying variables.
This is implemented as a compiler option which is enabled by default
when outputting to desktop GLSL version 130 and greater, which does
not support this #pragma in fragment shaders. As a workaround, and for
better compatibility on desktop OpenGL drivers, this pragma is also
flattened into the outputs of vertex shaders, and the inputs of ESSL
1.00 fragment shaders.
TEST=conformance/glsl/misc/shaders-with-invariance.html with --enable-unsafe-es3-apis
BUG=629622, angleproject:1293
Change-Id: Ib040230915e639971505ed496d26e804c9d64e68
Reviewed-on: https://chromium-review.googlesource.com/361792
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
|
|
802abe01
|
2016-08-04T17:48:32
|
|
Add compute shader compilation support in the glsl compiler
Support is added for compute shader compilation. There is a small
extension to the parser so that 'local_size_x = ', 'local_size_y = '
and 'local_size_z = ' are supported as layout qualifiers.
A few shader compilation tests are added and one which checks the AST
whether the layout qualifiers are properly parsed.
BUG=angleproject:1442
TEST=angle_unittests
TEST=angle_end2end_tests
Change-Id: I67283797d1cf13fa4ac47faa2a6e66d93a2db867
Reviewed-on: https://chromium-review.googlesource.com/362300
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
27776e33
|
2016-07-22T14:00:56
|
|
Fix member variable masking warning in standalone MSVS build
The patch for initializing output variables introduced a warning that
broke MSVS 2015 standalone build. The "shaderType" variable passed to
TCompiler::initializeOutputVariables was unnecessary and had the same
name as a member variable of TCompiler that stores the shader type.
TEST=MSVS 2015 build
Change-Id: I9e01f5eae77a88babde21d4864a02c8731a220de
Reviewed-on: https://chromium-review.googlesource.com/362550
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
72111915
|
2016-07-20T17:45:56
|
|
Initialize all output variables.
BUG=angleproject:1441
TEST=bots
Change-Id: Ia4cf415d8346c3234bf0f548a178ee3ea8cd35c4
Reviewed-on: https://chromium-review.googlesource.com/362110
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
|
|
19d1dc99
|
2016-03-08T17:18:46
|
|
Add option to limit the number of function parameters
Trying to compile user-defined functions that have thousands of
parameters introduces some instability in native compilers, so it is
better to reject shaders with large numbers of function parameters
in ANGLE.
The check is only enabled if the SH_LIMIT_EXPRESSION_COMPLEXITY flag
is turned on. The default limit for the number of parameters is 1024,
but it can also be configured.
BUG=angleproject:1338
TEST=angle_unittests
Change-Id: I5c9b7a4e97e67f36e77f969368336fa8fffba1c3
Reviewed-on: https://chromium-review.googlesource.com/331970
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|