|
daeac238
|
2021-05-08T22:09:38
|
|
Translator: Ensure structs and blocks are uniquely defined
A new AST validation is added to ensure that the same TStructure or
TInterfaceBlock is not redundantly defined. This helps with SPIR-V
generation by allowing the id to be used as key in a hash map that looks
up the corresponding SPIR-V type id.
A bug is fixed where the Vulkan driver uniform declaration created two
identical declarations for ANGLEDepthRangeParams.
A number of other bugs are also fixed in this change, where if a
variable declaration is eliminated (for example due to constant folding,
or inactive interface variable removal) and it contained a struct
specifier, the struct declaration was also removed. OutputGLSLBase had
a hack where structs were declared on first encounter, which was
incorrect as the scope of the declaration could change. Those bugs are
fixed and this hack is removed.
Bug: angleproject:2733
Bug: angleproject:4889
Bug: angleproject:5936
Change-Id: I8e13748c0bf552ae8b052249282769a1f0775603
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2881942
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
cc56e1aa
|
2021-04-09T23:35:07
|
|
Vulkan: Remove special output of structs and keep them in AST
The code that separated out declaration of nameless structs from uniform
variable declarations is generalized to separate out declaration of all
structs from uniform variable declarations.
As a result, a pass that outputs the struct types at the top of the
shader is no longer necessary. The struct declarations are kept in the
AST to be output to GLSL as they normally would when not used in
conjunction with uniform variables.
After this change, the Vulkan and Metal translators no longer intermix
transformations and code generation; transformations are done first
entirely in AST, and code generation is done at the end.
Bug: angleproject:2461
Bug: angleproject:4889
Change-Id: Ieb4d3f7091845e50c3dc399603ab01182692521d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2818153
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@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>
|
|
776c6015
|
2021-02-26T00:00:57
|
|
Vulkan: Call glslang at compile time
With this change, the ANGLE translator immediately compiles the
generated GLSL into SPIR-V with glslang and discards the source. This
is in preparation for generating SPIR-V directly, by making the frontend
and backend already able to digest it.
This change also allows the expensive glslang calls to be parallelized,
improving the following perf test by about 20%:
LinkProgramBenchmark.Run/vulkan_compile_and_link_multi_thread
Previously, the test was run as such in the Vulkan backend:
Main Thread 1 Thread 2
Compile1 --->
Compile2 --------------------->
Translator Translator
<---
<---------------------
Link
glslang
for
shader1
glslang
for
shader2
Done
With this change, it is run as such:
Main Thread 1 Thread 2
Compile1 --->
Compile2 --------------------->
Translator Translator
glslang glslang
<---
<---------------------
Link
Done
glslang_wrapper_utils no longer interacts with glslang! A rename will
follow.
Bug: angleproject:4889
Change-Id: If4303e8ba0ba43b1a2f47f8c0a9133d0bee1a19a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2721195
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2f737c25
|
2021-02-25T16:55:14
|
|
Translator: Rename GLSL to SPIR-V in Vulkan and Metal output
Preparation for actual SPIR-V output instead of GLSL.
Bug: angleproject:4889
Change-Id: Ic279b23d3a817bd5dca66a844905378207afdbac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2721194
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
4a782eaf
|
2021-02-11T16:13:33
|
|
Remove redundant (c) from license headers.
According to the Chromium C++ style guide, there must be no `(c)` after
`Copyright`.
Bug: angleproject:5516
Change-Id: Id5b170b99a1aaf95ab7fabb35ed644b99b756ce1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2690948
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
b1deba2f
|
2021-01-28T16:06:51
|
|
Vulkan: Don't emit spec const declaration in compute shaders
Bug: angleproject:5070
Change-Id: I74becfeac88b4a8ff66dd36670792082d0b941cd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2658882
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f0286e63
|
2021-01-19T12:38:46
|
|
Translator: Stop allocating TIntermSequence
The functions that take a TIntermSequence always copy out / Swap the
contents away. This change makes all TIntermSequences live on the stack
instead of being newed.
Bug: angleproject:5535
Change-Id: I942f1c5e57b00199d5308183f71bd9e18b0608bd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2636679
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
bd2954a9
|
2021-01-16T11:33:12
|
|
Reland "Cleanup translator option checks"
This reverts commit 9173e01730923823846348e513bb8cbe7eddbbe5.
Reason for revert: This was in a chain of reverts, but is unrelated to the issue.
Original change's description:
> Revert "Cleanup translator option checks"
>
> This reverts commit 9710c4e473c88a38f11eb10c600717181d6e24df.
>
> Reason for revert:
> Earlier CL breaks pre-rotation:
> https://chromium-review.googlesource.com/c/angle/angle/+/2598584
>
> Original change's description:
> > Cleanup translator option checks
> >
> > Use comparison with 0 for explicit conversion to bool.
> >
> > Bug: angleproject:3606
> > Change-Id: Ie0a76d7df829227c1376894535813b54e13491b4
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2631689
> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Charlie Lao <cclao@google.com>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
>
> TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
>
> Change-Id: Ib597a62f3c7078d28f7f5b79d1cc9f8d9e469c31
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:3606
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2634047
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tim Van Patten <timvp@google.com>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Bug: angleproject:3606
Change-Id: I10ecca63a3db6dbc3ddedf5bb7e5319a82a80a30
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633712
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9173e017
|
2021-01-16T00:10:34
|
|
Revert "Cleanup translator option checks"
This reverts commit 9710c4e473c88a38f11eb10c600717181d6e24df.
Reason for revert:
Earlier CL breaks pre-rotation:
https://chromium-review.googlesource.com/c/angle/angle/+/2598584
Original change's description:
> Cleanup translator option checks
>
> Use comparison with 0 for explicit conversion to bool.
>
> Bug: angleproject:3606
> Change-Id: Ie0a76d7df829227c1376894535813b54e13491b4
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2631689
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: Ib597a62f3c7078d28f7f5b79d1cc9f8d9e469c31
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3606
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2634047
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
9710c4e4
|
2021-01-14T22:41:48
|
|
Cleanup translator option checks
Use comparison with 0 for explicit conversion to bool.
Bug: angleproject:3606
Change-Id: Ie0a76d7df829227c1376894535813b54e13491b4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2631689
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
64508f44
|
2020-12-12T18:00:10
|
|
Vulkan: Reduce driver uniform data to minimum if specConst is used
If specialization constant is used, driver uniform data structure should
be reduced to minimum to increase cache locality.
Bug: b/175479076
Change-Id: I1fc50666542c6763c60bfe011cde5bc77ccc08e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2588549
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
c75473c2
|
2020-11-23T14:26:32
|
|
Vulkan: Generalize FlipRotationSpecConst to SpecializationConstant
Specialization constant are used not just for flip/rotation. It also
used for other things. This CL merges all specialization constant usage
(lineRasterEmulation, flip, rotation, halfRenderArea) into one class and
rename FlipRotationSpecConst to SpecConst.
Bug: b/173800146
Change-Id: I8dc3354b6caedbb183cec29855fc1c301ec8872a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2555812
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
995493cc
|
2020-11-18T20:33:33
|
|
Revert "Vulkan: Remove rotation related data from driver uniform"
This reverts commit fd97c3343e9ff23677124b7528ec945bca65796a.
Reason for revert: The specialization constant for rotation causes
performance regression with older qualcomm driver. We need to keep the
driver uniform code path for the older driver.
Original change's description:
> Vulkan: Remove rotation related data from driver uniform
>
> Rotation is now handled in the shader compiler with specialization
> constant, it should be removed from driver uniforms. Since Metal is
> using the flipXY, flipXY/negFlipXY are still kept in the shader side
> implementation, but have moved to TranslatorMetal in this CL.
>
> Bug: b/171750979
> Change-Id: Ie8d15ef227cb52a6e19e4319ecc9f09bda42e667
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519863
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
TBR=ianelliott@google.com,timvp@google.com,jmadill@chromium.org,cclao@google.com
Bug: b/171750979
Change-Id: Iff9cffb28851ade1d9c5cd23fde73910a19867ce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2547808
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
fd97c334
|
2020-11-12T11:05:40
|
|
Vulkan: Remove rotation related data from driver uniform
Rotation is now handled in the shader compiler with specialization
constant, it should be removed from driver uniforms. Since Metal is
using the flipXY, flipXY/negFlipXY are still kept in the shader side
implementation, but have moved to TranslatorMetal in this CL.
Bug: b/171750979
Change-Id: Ie8d15ef227cb52a6e19e4319ecc9f09bda42e667
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519863
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
15ead5d5
|
2020-11-02T12:25:32
|
|
Reland "Vulkan: Let shader use rotation specialized constant"
This is a reland of 47b3db22be33213eea4ad58f2453ee1088324ceb
Original change's description:
> Vulkan: Let shader use rotation specialized constant
>
> If use rotation specialized constant is enabled via compiler options,
> this CL will use rotation specialized constant to generate flipXY,
> rotation matrix and negFlipXY. This allows the driver to optimize for
> the minimum instructions for rotation.
>
> Bug: b/171750979
> Change-Id: I9851ac999d4d35b9f230f796e5445bca0dcb1e77
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514773
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
Bug: b/171750979
Change-Id: I9efde40eb138bacb161cce483a30ec01fee0983b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2533933
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3f18ad09
|
2020-11-11T14:12:18
|
|
Vulkan: Factor out DriverUniform code to tree_utils/DriverUniform.cpp
The driver uniform code is used by various tree_ops functions. But all
driver uniform code are defined and implemented in the
TranslatorVulkan.cpp file. There is dependency rule that tree_ops code
can not call into vulkan specific function. Right now we are working
around this problem by always having TranslatorVulkan creates uniform
and pass it down to tree_ops. This creates inefficiency for cases that
dFdy/dFdx where we don't know if we will need the driver uniform or not,
until we walk the tree and see the dFdx node. This CL refactors driver
uniform code into its own file and class under tree_utils so that
everybody can use. Mean time we can also make it much easier for metal
to expand it to have its own uniform structure.
Bug: b/173047182
Change-Id: I06bd9a005ccd6dc0a21321a3010dda1eab9d6fdb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2533443
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
c3607098
|
2020-11-11T16:06:51
|
|
Revert "Vulkan: Let shader use rotation specialized constant"
This reverts commit 47b3db22be33213eea4ad58f2453ee1088324ceb.
Reason for revert:
Broke the ANGLE roll into Chromium:
https://chromium-review.googlesource.com/c/chromium/src/+/2531069
[1875/27343] SOLINK ./libGLESv2.so
FAILED: libGLESv2.so libGLESv2.so.TOC
/b/s/w/ir/cipd_bin_packages/cpython/bin/python "../../build/toolchain/gcc_solink_wrapper.py" --readelf="readelf" --nm="nm" --sofile="./libGLESv2.so" --tocfile="./libGLESv2.so.TOC" --output="./libGLESv2.so" -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-soname="libGLESv2.so" -Wl,--fatal-warnings -Wl,--build-id -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=lld -Wl,--color-diagnostics -Wl,--no-call-graph-profile-sort -m64 -Werror -nostdlib++ --sysroot=../../build/linux/debian_sid_amd64-sysroot -L../../build/linux/debian_sid_amd64-sysroot/usr/local/lib/x86_64-linux-gnu -L../../build/linux/debian_sid_amd64-sysroot/lib/x86_64-linux-gnu -L../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu -Wl,-rpath=\$ORIGIN -Wl,--export-dynamic -Wl,-rpath=\$ORIGIN -o "./libGLESv2.so" @"./libGLESv2.so.rsp"
ld.lld: error: undefined symbol: sh::TranslatorVulkan::GetDriverUniformFlipXYRef(sh::TVariable const*)
>>> referenced by RewriteDfdy.cpp:134 (../../third_party/angle/src/compiler/translator/tree_ops/RewriteDfdy.cpp:134)
>>> translator/RewriteDfdy.o:(sh::(anonymous namespace)::Traverser::visitUnaryWithRotation(sh::Visit, sh::TIntermUnary*)) in archive obj/third_party/angle/libtranslator.a
>>> referenced by RewriteDfdy.cpp:200 (../../third_party/angle/src/compiler/translator/tree_ops/RewriteDfdy.cpp:200)
>>> translator/RewriteDfdy.o:(sh::(anonymous namespace)::Traverser::visitUnaryWithoutRotation(sh::Visit, sh::TIntermUnary*)) in archive obj/third_party/angle/libtranslator.a
ld.lld: error: undefined symbol: sh::TranslatorVulkan::GetDriverUniformFragRotationMatrixRef(sh::TVariable const*)
>>> referenced by RewriteDfdy.cpp:136 (../../third_party/angle/src/compiler/translator/tree_ops/RewriteDfdy.cpp:136)
>>> translator/RewriteDfdy.o:(sh::(anonymous namespace)::Traverser::visitUnaryWithRotation(sh::Visit, sh::TIntermUnary*)) in archive obj/third_party/angle/libtranslator.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Original change's description:
> Vulkan: Let shader use rotation specialized constant
>
> If use rotation specialized constant is enabled via compiler options,
> this CL will use rotation specialized constant to generate flipXY,
> rotation matrix and negFlipXY. This allows the driver to optimize for
> the minimum instructions for rotation.
>
> Bug: b/171750979
> Change-Id: I9851ac999d4d35b9f230f796e5445bca0dcb1e77
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514773
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
TBR=ianelliott@google.com,timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: Id3976259d1f4049aa62b679ad5b25c2ac337c92b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/171750979
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2532702
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
47b3db22
|
2020-11-02T12:25:32
|
|
Vulkan: Let shader use rotation specialized constant
If use rotation specialized constant is enabled via compiler options,
this CL will use rotation specialized constant to generate flipXY,
rotation matrix and negFlipXY. This allows the driver to optimize for
the minimum instructions for rotation.
Bug: b/171750979
Change-Id: I9851ac999d4d35b9f230f796e5445bca0dcb1e77
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514773
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
6136cbcb
|
2020-09-23T21:31:05
|
|
Metal: Implement transform feedback
- XFB is currently emulated by writing to storage buffers.
- Metal doesn't allow vertex shader to both write to storage buffers and
to stage output (i.e clip position). So if GL_RASTERIZER_DISCARD is
NOT enabled, the draw with XFB enabled will have 2 passes:
+ First pass: vertex shader writes to XFB buffers + not write to stage
output + disable rasterizer.
+ Second pass: vertex shader writes to stage output (i.e.
[[position]]) + enable rasterizer. If GL_RASTERIZER_DISCARD is
enabled, the second pass is omitted.
+ This effectively executes the same vertex shader twice. TODO:
possible improvement is writing vertex outputs to buffer in first
pass then re-use that buffer as input for second pass which has a
passthrough vertex shader.
- If GL_RASTERIZER_DISCARD is enabled, and XFB is enabled:
+ Only first pass above will be executed, and the render pass will use
an empty 1x1 texture attachment since rasterization is not needed.
- If GL_RASTERIZER_DISCARD is enabled, but XFB is NOT enabled:
+ we still enable Metal rasterizer.
+ but vertex shader must emulate the discard by writing gl_Position =
(-3, -3, -3, 1). This effectively moves the vertex out of clip
space's visible area.
+ This is because GLSL still allows vertex shader to write to stage
output when rasterizer is disabled. However, Metal doesn't allow
that. In Metal, if rasterizer is disabled, then vertex shader must
not write to stage output.
- See src/libANGLE/renderer/metal/doc/TransformFeedback.md for more
details.
Bug: angleproject:2634
Change-Id: I6c700e031052560326b7f660ee7597202d38e6aa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2408594
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
|
|
9ff58ddd
|
2020-08-26T01:08:00
|
|
Metal: Support array of matrices varying.
MSL doesn't support array of matrices as varying variable.
This CL converts array of matrices varying to array of vectors.
This fixes WebGL test:
conformance/glsl/misc/shader-varying-packing-restrictions.html
Bug: angleproject:4846
Bug: angleproject:2634
Change-Id: I3cfc638dc01092ddf1add7df02c131d1a5c8ba1d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2392172
Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
08b9ad57
|
2020-07-08T12:50:00
|
|
Metal: Prevent vertex shader's inactive varying from being removed
If vertex shader declares a varying but doesn't use it, and this varying
is being used in fragment shader, linking will fail because the varying
would be removed by spirv-cross.
Fix: initilize the unused varying with zero(s).
New test: GLSLTest.InactiveVaryingInVertexActiveInFragment.
Bug: angleproject:2634
Change-Id: Ia37acd8eea85d5da4ddbca6457d6cddb1b41662c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281796
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
9277ee74
|
2020-07-06T12:40:58
|
|
Metal: Implement MSAA default framebuffer.
GL_SAMPLE_COVERAGE_VALUE is implemented by inserting gl_SampleMask
writing logic to fragment shader.
New test added: MultisampleTest.ContentPresevedAfterInterruption.
- Skip on D3D11 (Bug: angleproject:4609)
Bug: angleproject:2634
Change-Id: Ib44daf0baccc36ea320596d81713156047da059c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281783
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
4d7a3993
|
2020-05-27T14:08:20
|
|
Vulkan: Rotate gl_PointCoord for Android pre-rotation
This extends the current y-flip that's done for gl_PointCoord.
Now, gl_PointCoord is rotated and then flips both the x and y-axis
(similar to gl_FragCoord). The tests used to reproduce the
problem and the fix are:
angle_deqp_gles2_tests --local-output --gtest_filter=dEQP.GLES2/functional_shaders_builtin_variable_pointcoord* --use-angle=vulkan
angle_end2end_tests --local-output --gtest_filter=*GLSLTest.PointCoordConsistency*Vulkan*
Bug: b/157476696
Change-Id: Iada8680eda8322f7382ff242e4a9422a66114f07
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2216700
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
901045cc
|
2020-05-26T10:41:18
|
|
Vulkan: Rotate gl_FragCoord for Android pre-rotation
This extends the current y-flip that's done for gl_FragCoord.
Now, gl_FragCoord is rotated and then flips both the x and y-axis.
Bug: angleproject:4643
Bug: b/156395519
Change-Id: Iada8680eda8322f7382ff242e4a9422a66114f05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2210936
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
1a5c7a16
|
2020-02-25T12:02:31
|
|
Reland "Vulkan:Include precision qualifier in GLSL"
Currently still ignoring precision qualifiers for Vulkan shaders by
default, but have added feature "enablePrecisionQualifiers" that can be
enabled in order to include precision qualifiers.
With this initial implementation, it's possible to get precision
qualifier mis-matches in the generated GLSL 4.50. According to the
spec this is allowed. From GLSLangSpec 4.50 section 4.7 "Precision and
Precision Qualifiers":
For the purposes of determining if an output from one shader stage
matches an input of the next stage, the precision qualifier need not
match.
However, when converted to SPIR-V and run through the shader validation
any mismatches will cause shader validation errors. Initially just
ignoring those errors with this commit.
Bug: angleproject:3078
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057749
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
Change-Id: Ieecca604bb2c834c9b1c2bcab85279d1f8755dfa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2086280
|
|
a60e4973
|
2020-02-27T20:11:20
|
|
Revert "Vulkan:Include precision qualifier in GLSL"
This reverts commit 93e72f5f0eb80b89334ea8fe577b32901a00b5fb.
Reason for revert: This is having a negative impact on gfxbench
Manhattan 3.1 tests (20-30%) with only a minor improvement (~4%) in TRex offscreen. Pulling out for now and need to re-evaluate best
solution here.
Original change's description:
> Vulkan:Include precision qualifier in GLSL
>
> With this initial implementation, it's possible to get precision
> qualifier mis-matches in the generated GLSL 4.50. According to the
> spec this is allowed. From GLSLangSpec 4.50 section 4.7 "Precision and
> Precision Qualifiers":
>
> For the purposes of determining if an output from one shader stage
> matches an input of the next stage, the precision qualifier need not
> match.
>
> However, when converted to SPIR-V and run through the shader validation
> any mismatches will cause shader validation errors. Initially just
> ignoring those errors with this commit.
>
> Bug: angleproject:3078
> Change-Id: Ia2b04f90f0a7b6b1302c1b1b3e32bcfd8db9ed49
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057749
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Tobin Ehlis <tobine@google.com>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tobin Ehlis <tobine@google.com>
TBR=tobine@google.com,timvp@google.com,jmadill@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:3078
Change-Id: I84984e2a963bde573f0f1de585001ceb83623c89
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2079334
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
93e72f5f
|
2020-02-25T12:02:31
|
|
Vulkan:Include precision qualifier in GLSL
With this initial implementation, it's possible to get precision
qualifier mis-matches in the generated GLSL 4.50. According to the
spec this is allowed. From GLSLangSpec 4.50 section 4.7 "Precision and
Precision Qualifiers":
For the purposes of determining if an output from one shader stage
matches an input of the next stage, the precision qualifier need not
match.
However, when converted to SPIR-V and run through the shader validation
any mismatches will cause shader validation errors. Initially just
ignoring those errors with this commit.
Bug: angleproject:3078
Change-Id: Ia2b04f90f0a7b6b1302c1b1b3e32bcfd8db9ed49
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057749
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
4cef8a49
|
2019-11-26T00:04:00
|
|
Metal: Support depthRange near > far
Metal doesn't natively support near > far depthRange, need to
emulate it via shader.
Bug: angleproject:2634
Change-Id: I1885cad3467478a0dcc4b25b7d41f980b9e03103
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1919282
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
|
|
a5a04ac0
|
2019-10-29T22:57:55
|
|
Metal backend pt3: shader translator
Implementation of GLSL to MSL translator
Bug: angleproject:2634
Change-Id: I66e2374b461548fac46163ea79790a488515e6b0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1887251
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d200a77a
|
2019-10-10T00:44:01
|
|
Metal backend skeleton implementation.
Bug: angleproject:2634
Change-Id: I34be82f4a80a6851fecb53a51e069b134d82613a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1849079
Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|