In this change, the shader interface variables are given SPIR-V ids by
the compiler before SPIR-V generation. Those ids are made available
through the ShaderVariable interface.
The transformer does not yet rely on this information. A follow up
change will rework the backend's name->info map and the transformer to
directly use ids instead of names.
Bug: angleproject:7220
Change-Id: Ic0a62681d4bcf3ed171c39c3ecd83e438ea068c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4600609
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Instead of passing in gl_Position etc built-in names and then find their
index by looking at OpMemberName instructions, this change has the
front-end create a bitset of active gl_PerVertex members. The SPIR-V
transformer then directly uses this information to trim gl_PerVertex.
Bug: angleproject:7220
Change-Id: I5c3d56784801abb310d09d98d9c82c9e6e019de8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4600608
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
I was having trouble using some GL/EGL loader generators because of some
errors in the XML definitions for ANGLE.
The first major problem is the content of the <ptype> tags. Let's refer
to the Khronos registry XML schema (which is annoyingly a PDF rather
than an xsd that we can test against, though I don't know if an xsd
would catch this anyway):
https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/readme.pdf
In section 12.4.2, "Contents of <param> tags" it states:
The <ptype> tag is optional, and contains text which is a valid type
name found in <type> tag, and indicates that this type must be
previously defined for the definition of the command to succeed.
Builtin C types, and any derived types which are expected to be
found in other header files, should not be wrapped in <ptype> tags
Note that the above is repeated for the contents of <proto> tags as
well.
The extension XML files currently have a bunch of <ptype> tags which
don't meet the expectations described above. The correct transformation
for them would be, for example:
<ptype>GLfloat *</ptype> -> <ptype>GLfloat</ptype> *
<ptype>void *</ptype> -> void *
<ptype>const char *</ptype> -> const char *
<ptype>EGLAttrib *</ptype> -> <ptype>EGLAttrib</ptype> *
The next issue is that some tags have some typos, such as "<pytpe>"
instead of "<ptype>". (Now *that* is something an .xsd would catch...)
The last issue is the use of the typename "GLvoid" which is not as
serious a problem. It is still defined in Khronos' gl.xml <types> block,
but Khronos no longer uses it in their XML registries. The comment for
the "GLvoid" type in their <types> block states:
<type comment="Not an actual GL type, though used in headers in the past">typedef void <name>GLvoid</name>;</type>
So we might as well replace those with just plain "void".
Anyway, long story short: to apply these transformations, I used Perl
regular expressions, and applied these expressions in order:
- Fix the tag misspellings:
s#<(/?)pytpe>#<\1ptype>#g
- Move the const qualifiers (if present) and pointer asterisk(s) (if
any) outside the <ptype> tag itself:
s#<ptype>(const )?([A-Za-z0-9]+)[ ]?(\*\*?)</ptype> #\1<ptype>\2</ptype> \3#g
- Replace "GLvoid", "char", and "void" inside ptype tags to normal
C types outside tags:
s#<ptype>(GLvoid|void|char)</ptype>#\1#g
Bug: angleproject:8190
Change-Id: Ib0bea79fecb7e714910b6e92124bb9f52994d0fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4603709
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
DmaBufImageSiblingVkLinux::initWithFormat is used to fallback like:
- mutable format + srgb
- mutable format + unorm
- non-mutable srgb
- non-mutable unorm
However, it never fallbacks since GetFormatModifierProperties bails.So
this change has made it non-fatal to allow fallback behavior.
Meanwhile, this change updates the fallback order to use unorm as actual
format first to favor most common scenarios.
Bug: b/277798516
Change-Id: I60283590d85b27d55010cb2f5a2cc13d4df1ac9c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4603208
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Romaric Jodin <rjodin@chromium.org>
The name in the extension/require block did not match the name in the
enum specification block. This caused some EGL loader generators to fail
to run properly.
Bug: angleproject:8190
Change-Id: I6ce6e226121e7ea9aa611c7d331a8fd1bc83e55b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4603708
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Collecting this data takes a significant amount of resources but we do
not actively use it at the moment.
Disable --split-shard-samples (will avoid separate calibration on each
shard)
Reduce samples to 6 (from default 10)
Bug: angleproject:7671
Change-Id: I87d45f21badb30ed44de9b9854c94fe7f67ecdc8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4605335
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
To avoid downstream repositories having to deal with a roller breakage
on every major revision to the Android NDK, use an unversioned CIPD
path. Versioned CIPD paths cause downstream roller scripts to assume
each version is an unrelated package and requires manual intervention.
Bug: chromium:1446443
Change-Id: I6cb8c777ec4b971a3ab59392d6cefb2f40530749
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4602772
Auto-Submit: Prashanth Swaminathan <prashanthsw@google.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
This CL starts treating EGLSync as a tracked resource, such
that we can detect when they need to be created in Setup, or
regenerated in Reset.
Test: MEC of infinity_ops trace
Test: Replay new kentucky_route_zero trace without error
Bug: angleproject:8176
Change-Id: I130212f6edb78d9df29dd6e572843df25493ae09
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4566949
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
With this change, the SPIR-V transformer does not need to discover these
ids through name matching. Ultimately, user variables would also be
identified by their SPIR-V ids (instead of name), removing the Vulkan
backend's reliance on strings.
Bug: angleproject:7220
Change-Id: I241c3247b89a28f9eed28f23c06b7c8b7fbbeaa0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4583133
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Used only once after these rules were reorganized.
Bug: b/276474703
Change-Id: Ie01f20781ee1ca6f04fd19a9f37769d66561bde8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4600614
Auto-Submit: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Defines the interface between the test suite
(or an other TraceLibrary class user) and trace libraries.
TraceFunctions defines entry points for calls suite->trace, such as
SetupReplay() or SetBinaryDataDir().
TraceCallbacks defines entry points for calls trace->suite, for example
for loading .angledata.gz files.
These are set up via the exported SetupEntryPoints() call. Functions
like SetupReplay etc no longer need to be exported from the trace
library.
TraceInfo (parsed representation of the trace json) is moved to
trace_interface as is. This is convenient for further changes to the
fixture that will allow to easily move some of the captured parameters
to json.
This also moves Decompress functionality (and memory ownership) to test
suite entirely, which avoids Decompress/Delete callbacks - the trace
just calls LoadBinaryData via TraceCallbacks and TraceLibrary releases
the memory either on FinishReplay or in its destructor.
This should also take care of the memory leak described in
https://crrev.com/c/3858185
Bug: b/286072760
Change-Id: Ibc6f6f64156ad805b1917c8fc41a3b0d2c0d6375
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4594445
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Now that chromium/base has rolled and switched the android_ndk_root to
the new android_toolchain directory, remove the stale Android NDK. Fix
roller scripts to no longer roll Android NDK and Android blueprint
generation can remove references to the removed sources.
Bug: chromium:1448383
Test: Verified build of ANGLE.
Change-Id: Iba8bfd8be9fd6bfb4f75f5d3a273411bd11f6b5e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4585389
Auto-Submit: Prashanth Swaminathan <prashanthsw@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
When eglTerminate is called remove the thread from the
active thread set if there is no context current.
This allows for proper cleanup of invalid EGL objects
during certain EGL terminate related end2end tests.
Also perform appropriate cleanup in EGLBlobCacheTest test.
Bug: angleproject:6723
Bug: angleproject:6798
Test: EGLMultiContextTest.ReuseUnterminatedDisplay*
Change-Id: I5a637938d463d6556f594d8bb0cf457efca92355
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4408364
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Chromium is being updated to 'android_toolchain', which means the
'android_ndk' DEPS is no longer present. Remove it from the roller until
the transition is complete, then it can be removed from this script
entirely.
Bug: chromium:1448383
Change-Id: I0b515611a94f9aae5951655639a57ec5a9e7ffde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4600111
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Prashanth Swaminathan <prashanthsw@google.com>
This CL adds detection of the device, for use in expectations files
Bug: b/285045753
Bug: angleproject:8185
Change-Id: Ia68402c4a85fde058b03143eb97607da4679fc7a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4597749
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
The Android NDK dependency is moving to a CIPD bucket to reduce the
checkout cost and to eventually move to NDK v25. This introduces the
NDK into an 'android_toolchain' directory. Following the roll of
chromium/base in this repository, a second change will delete the old
'android_ndk' checkout. As a result, the checkout size of this
repository will temporarily increase.
Bug: chromium:1448383
Test: Verified local builds of ANGLE.
Change-Id: Id2b7593270ae8d98e7353011dbc1b564da107786
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4585388
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
EGLPreRotationBlitFramebufferTest are passing on
Pixel 6. Skip the failed tests on Pixel4 devices only.
Bug: b/172867704
Bug: angleproject:5044
Change-Id: I23744cec20bf7e74272532a00420d1488398cda8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4590228
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
The backend was removed but the references were not.
Update ShaderBinaryTest to properly skip tests if shader binaries are
unsupported in the current ANGLE backend.
Forcibly re-enable building of the Vulkan backend on macOS to keep
ANGLE's SwiftShader backend working.
Fixed: angleproject:6081
Change-Id: I5e6e47d5fe05b0dd6ec150b6db9fe5d75e580173
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4594582
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Ran into it causing issues in https://crrev.com/c/4545408
Bug: b/286067106
Change-Id: I9314d1e48b064a46362a65db2c3a92760111f02f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4594440
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Auto-Submit: Roman Lavrov <romanl@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
This qualifier has no equivalents in HLSL or MSL.
Bug: angleproject:8046
Change-Id: I1e79c8d725306efb859152b8083d72019c982149
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4595017
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
https://crrev.com/c/4505697 started accepting show_callstack. Since
Msg is used as specialized error message, it also needs to accept
show_callstack since CallCommand will pass it.
Bug: chromium:1451607
Change-Id: Ib3aee58b41d2419446e71b8e67392daed407714d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4591539
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
To prepare for future changes which require that angle features
be parsed before device creation, we must rearrange device
creation such that driver version can be retrieved from the
adapter BEFORE the device gets created.
Bug: angleproject:8180
Change-Id: I08855b9df318d0a6234231f1e52d3c17cfaa8a30
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4575653
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
The backend was removed but the references were not.
Update ShaderBinaryTest to properly skip tests if shader binaries are
unsupported in the current ANGLE backend.
Fixed: angleproject:6081
Change-Id: I54bb4080763fbc0dcc2515e71ccd5df5c536db5b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4591046
Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
When assigning the previous value of an atomic op to an SSBO, we do not
want to use the "direct assignment" path, since we can't pass the SSBO
expression as an argument to Interlocked*().
Instead, we change the RewriteAtomicFunctionExpressions transform not to
defer assignments until HLSL output if the LHS is an SSBO expression,
and to do its usual creation of a temporary for the previous value of
the atomic op.
In OutputHLSL, we skip the direct assignment path if the LHS is an SSBO
expression.
Bug: angleproject:8182
Change-Id: I0707f4f69757119fe5c8f8e7a12bd26025ec74e6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4573827
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This is exposing too much detailed information to the web. Replace it
with the string "Unspecified Version".
Bug: chromium:1354575
Change-Id: I69b8c6f7cb4eae01f806e91496664276c864309e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4574285
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kenneth Russell <kbr@chromium.org>
postResolveLink assumes the program is currently linked, which is not
the case in Program::deserialize. It makes calls to set uniforms which
is not always expected by the backend.
Call postResolveLink after the backend has linked when loading
program binaries.
Bug: angleproject:6073, angleproject:8183
Change-Id: Idacb81040ea79a7df51917aaa27c77b25df7d5cd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4588410
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Only changes the way we get auto_script inputs/outputs.
Before this CL, some of the scripts (depending on the shebang)
are run via vpython3 - which can take a few seconds. But the
inputs/outputs code generally doesn't require any unusual imports, so we
can just add little hacks to suppress those imports where needed when
an argument is given to the script.
Bug: angleproject:8184
Change-Id: Ib09a35b839318253fe7e913e24a756d2cb46dad1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4585820
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
The SPIR-V transformer no longer needs to discover these ids.
Bug: angleproject:7220
Change-Id: I7082e831308eaac97ace3c128f398ff5f5497739
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4573825
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
The SPV_KHR_non_semantic_info extension is set up in this change to
allow the translator to communicate an overview of the SPIR-V to the
SPIR-V transformer as well as mark locations of interest. This would
help the SPIR-V transformer avoid having to discover basic ids and such
locations.
In this change, a few basic types are predefined and the location where
new types and variables need to be defined are marked.
Bug: angleproject:7220
Change-Id: I237b9a79efa9c192b3b11f1d97bc9b6a5cc2f8fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4573823
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Additional dependencies are being added to //build that reside outside
of it, and that also resolves the problem where lookup_dep.py was
manually checked in into ANGLE: https://anglebug.com/8178#c15
Bug: angleproject:8178
Change-Id: I332cd955ad6857f87e5611284ed43da6a69d4c30
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4582331
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
Updates the requests version in .vpython3 to the latest available in
order to pick up a security fix. Also changes the requested version to
the Python 3-only one since Python 2 support was removed from requests.
Bug: chromium:1448265
Change-Id: I132cf2a18f59a70a17f04b7fcbb3e65165fa7eb1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4574296
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>