Instead of storing the entire LinkedResources struct, we can keep it
only for the duration of the linking calls. Refactoring change only.
It sets the stage for more refactoring. This change also switches the
link call to use LinkingState's ProgramLinkedResources directly to
avoid the need to copy the varying packing or use a pointer.
Bug: angleproject:4514
Bug: angleproject:5496
Change-Id: Iefea3c16a33213dc338cc54efaa7c3064ea6ae08
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601403
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
CaptureMidExecutionSetup() hits an assert while capturing "World War
Doh":
ANGLE : FATAL: FrameCapture.cpp:2876 (CaptureMidExecutionSetup):
! Assert failed [[[...]]] attrib.location != -1
This is due to CaptureMidExecutionSetup() enforcing that all attributes,
including built-ins, have a location. However, in the case of "World War
Doh", the built-in 'gl_GlobalInvocationID' does not have a location.
Moving the assert to after the gl::IsBuiltInName() check allows the
capture to complete without hitting any asserts.
Bug: angleproject:4048
Test: Capture "World War Doh"
Change-Id: Ice96dec629b1477b11a710283c4ec4bf1c95c6e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606807
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
The passed-in GlslangSpirvOptions already has the shaderType, so this
extra parameter was not necessary.
Bug: angleproject:4524
Change-Id: Ibbc7442b3173b26825f3cb9e2365789fade92cfc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611311
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Most of the AST transforms are written as a workaround to an issue that
affects a single backend. This change identifies such transforms and
organizes them by backend. They are then only built if the respective
backend is.
Additionally, about half of the GL transforms are due to mac
workarounds, including the large RewriteRowMajorMatrices transform.
Mac-specific workarounds are additionally only built on said platform.
This change reduces the ANGLE binary size:
- 106KB in a Vulkan-only build on Linux
- 27KB in a GL-only build on Android (60KB on Linux)
Bug: chromium:1084580
Bug: chromium:1161513
Change-Id: I64b334332c0d4f848756c6538af0d8d96864c7e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601346
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Clarifies that the GL internal format is an "intended" format
and the Vulkan formats are "actual" formats. This makes all the format
fields use the same consistent naming pattern.
Bug: angleproject:5438
Change-Id: I935a49895109e9e06eae5ef98d5614dfd1128ff8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2605728
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The tests meant to perform a draw call and validate the correctness of
the shaders.
Bug: angleproject:3580
Change-Id: I3a008d204ae3d7dceb731ba7a815ab54f38c2920
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2599938
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Building on support for transform feedback capture of I/O block members,
this change optimizes capture of builtins other than gl_Position by
directly decorating members of gl_PerVertex. Most importantly, this
allows us to reserve only one varying for transform feedback, instead of
as many builtins there could be (up to 4).
Bug: angleproject:3606
Change-Id: Ie0957802c657ed6c5aac538d92b860582ed6da45
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601072
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
ANGLE_framebuffer_blit is already exposed but has restrictions on
scaling/flipping and mismatched color buffer formats. When
NV_framebuffer_blit, EXT_framebuffer_blit, or an ES3 context is
available we can expose a less restrictive BlitFramebuffer.
Bug: angleproject:5474
Bug: chromium:1157057
Change-Id: I916ee39c8d6120216f91461080eb3ee9ca777e29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601165
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
In GLES 3.1 spec, sesion 7.3.1 program interfaces, it says that
'Resources referenced in shader code are considered active unless the
compiler and linker can conclusively determine that they have no
observable effect on the results produced by the executable code of the
program.'. Variables might be considered inactive if they are used only
in computations of temporary variables having no effect on any shader
output. So we should use atomicCounterIncrement instead of atomicCounter
in case the resources are marked as inactive on some platforms.
Bug: angleproject:5494
Change-Id: Ic04bd4a2936e97776fc680b5ef8273f0944d7480
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2605917
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Instead of using a map type directly we abstract the info maps into an
encapsulated class. We can enforce a specific API set instead of using
the same API as the map class. This also cleans up a few of the APIs
related to these maps.
This change will allow future changes to the way the variables are
stored in the class without drastically changing the interface.
Bug: angleproject:3572
Bug: angleproject:4524
Change-Id: Ic1a63e1776c39f49b895a1274bae8282d7a6b9b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2600080
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
After [1], Chrome and ANGLE use separate X11 connections, so in order
for Chrome to receive exposure events, it must select for them its own
connection, which is done in [2].
The events selected by ANGLE's connection are never dispatched, so
they queue up indefinitely and leak until the connection is closed
(when happens when Chrome closes). This change removes the request
to receive exposure events.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/2492177
[2] https://chromium-review.googlesource.com/c/chromium/src/+/2602441
Change-Id: Ie47c3700855aeeecc8efa1b379df60c344b1b70a
Bug: chromium:1158170
R=jonahr
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2602705
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
From the EXT_buffer_storage overview:
The GL_EXT_texture_storage extension added immutable storage for
texture objects (and was subsequently incorporated into OpenGL ES
3.0). This extension further applies the concept of immutable
storage to buffer objects.
[T]his extension introduces the concept of persistent client
mappings of buffer objects, which allow clients to retain pointers
to a buffer's data store returned as the result of a mapping, and to
issue drawing commands while those mappings are in place.
The initial implementation of EXT_buffer_storage didn't enable this
portion of the extension, so ANGLE is generating errors while attempting
to draw with an immutable buffer mapped with the GL_MAP_PERSISTENT_BIT
flag.
This CL enables that functionality, since apps (e.g., FIFA Soccer) rely
on it.
Bug: angleproject:5473
Change-Id: Icf1c0597156044a342aac5e4d2abbc29b34f46b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2596957
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
It's not currently exposed on iOS.
Bug: angleproject:5417
Change-Id: I2564d3363f8f8bddad4da7d8a9d7dac9bea15897
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2600454
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Enable adjustSrcDstRegionBlitFramebuffer workaround on iOS and fix
a conflict when it is enabled in combination with
clipSrcRegionBlitFramebuffer.
Bug: angleproject:5417
Change-Id: I1de0f9f392643fbcf6900bad86d83084cb6d4009
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601106
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
The adb install command is being updated to include the following
options:
-r: replace existing application
-d: allow version code downgrade (debuggable packages only)
--force-queryable: mark the ANGLE APK as visible to all other packages
This will allow AngleLibraries.apk to install without errors and be
loadable for apps targeting SDK >= 30.
Bug: b/175800879
Change-Id: I61bb7218b407e54057adbfb5aa3098a96b903f5e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2602241
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
angle_white_box_tests build and runs and passes on the iOS
simulator with this change. angle_end2end_tests builds and runs but
crashes.
Bug: angleproject:4256
Bug: angleproject:5417
Change-Id: I8817e46415c4598cbfae49804727a2e9b21baff1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2600361
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
In the emulation path, it's ensured that the generated code references
the I/O block field correctly (using the instance name if provided, and
without it otherwise).
In the extension path, the info map is augmented with an array of xfb
decorations for its fields. Then when `OpDecorate %IOBlockId Block` is
encountered, the transform feedback decorations on the fields are
inserted:
OpMemberDecorate %IOBlockId MemberN XfbBuffer buffer
OpMemberDecorate %IOBlockId MemberN XfbStride stride
OpMemberDecorate %IOBlockId MemberN Offset offset
Future work includes removing the duplicate varying added for
gl_PointSize and use this mechanism to decorate gl_PerVertex directly.
Bug: angleproject:3606
Change-Id: I6fed0b1ee7245fe695337043b40b281fb01a1fb0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2599953
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Validation and generation of transform feedback varyings that specify an
I/O block member are implemented in this change. The GL backend is able
to pass the added tests.
Bug: angleproject:3606
Change-Id: I66d02bed8ca9161555d0d1e7a32ae9ef4d9e813f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2599952
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
This reverts commit 11c31e0a4a.
Reason for revert: Broke ANGLE -> Skia roll because of GN error.
Bug: angleproject:5489
Original change's description:
> Changes to build inside a Dawn checkout.
>
> Add an "angle_standalone" flag that can be disabled by Dawn.
> Put test definitions behind angle_standalone || build_with_chromium.
>
> Bug: angleproject:5462
> Change-Id: I58c9b18723384334156e2a3dd86ed3f89afcaade
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2587451
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Stephen White <senorblanco@chromium.org>
TBR=senorblanco@chromium.org,jmadill@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:5462
Change-Id: I4363d1d35b03e00d970e25ddd3d7eac51ad2da2d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2600078
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
We need the higher limit for tessellation shaders and ES 3.2.
Unfortunately this means we are no longer using a packed 64-bit bitset
for the active textures and images. We fallback to using std::bitset.
Also keeps the 64 texture limit if tessellation is not available. The
higher limits was causing timeouts in WebGL tests.
Bug: angleproject:3572
Change-Id: I1953955600b56d7c66178bd610de53453151dc8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2586996
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Type confusion on the index buffer. It should be unsigned shorts. Fixes
a crash on iOS.
Bug: angleproject:4992
Bug: angleproject:5417
Change-Id: I18179a89dd81fff2582636496ea9684e432f4400
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601162
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
An assertion was fired which was only valid when emulating transform
feedback. The relevant block is conditioned to the respective feature.
Bug: angleproject:3571
Change-Id: I287ef6d94c920ccda742e4032bfc389409a38e1f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2599951
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This pipes through to a system call via JNI. This will allow
Chromium changes to land that were prevented because ANGLE
hard-coded some parts of this path. This in turn will allow
us to more easily override these paths for changes needed
for Android R support.
Bug: chromium:1094062
Change-Id: I20d75b8ee40d418ba5c057f618640ef896248299
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2315483
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Clean up change in preparation for changes that add more options.
Bug: angleproject:5478
Change-Id: Id35825b337dba153a5c28dfcc311b344ce257f78
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2599941
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>