According to the OpenGL ES 3.1 spec:
7.3. PROGRAM OBJECTS
If there is no active program for the vertex or fragment shader
stages, the results of vertex and fragment shader execution will
respectively be undefined. However, this is not an error.
To handle this, if no VS or FS is present in the active Program/PPO,
we will no-op the draw command.
Bug: angleproject:3570
Test: KHR-GLES31.core.sepshaderobjs.StateInteraction
Change-Id: If19e9fbb1bc09fa0d490832079bb9f514eab6035
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2136386
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
This CL adds infrastructure for tracking whether resources need to be
reset when looping back to the beginning of the frame sequence.
A new function is generated on the last frame: ResetContext*Replay().
It will contain calls to gen, delete, and restore contents of
resources. This CL only supports Buffer resets.
Bug: b/152512564
Bug: angleproject:3662
Bug: angleproject:4599
Change-Id: I46672dd70dcb997967e3cc0897308144f2582e21
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2168121
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This reverts commit 226bba3c75.
Reason for revert: Should no longer be needed after
https://chromium-review.googlesource.com/c/angle/angle/+/2168617
Original change's description:
> Add -Wno-pointer-to-int-cast
>
> This is the last remaining instance of the warning across Chromium. It's
> fixed upstream but I can't seem to figure out how to successfully roll
> deqp. So suppressing it here for now.
>
> This can be removed once the deqp in Angle has
> https://github.com/KhronosGroup/VK-GL-CTS/pull/199.
>
> Change-Id: Ie954bb2a3d86ea0de644e2a78051531b396e88a8
> Bug: chromium:1054220
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2165365
> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
TBR=geofflang@chromium.org,courtneygo@google.com,aeubanks@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: chromium:1054220, angleproject:4588
Change-Id: Ib26534cbb48df6d51af137babb95f3aeb6825043
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2182891
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Nico Weber <thakis@chromium.org>
This is a follow-on to
https://chromium-review.googlesource.com/c/angle/angle/+/2180881.
This adds a comment explaining part of that solution, and an end2end
test that creates a compressed texture and then renders after
decreasing MAX_LEVEL and then again after increasing MAX_LEVEL.
Bug: b/155499736
Change-Id: I04bb0dc9ead2807f7121e4c6b95ffd3594d5dcc0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2182174
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
* Moved xexml files to a library
* Added new waiver system to GN
* Added new KHR GLES 3.x tests to GN for nearest sampling edge cases
* Updated expectations for new tests
* Manual roll of glslang to bring in new dependencies.
Test: deqp
Bug: angleproject:4588
Change-Id: I7b9bcc28e9c9ba6abe4fa4873f732677ed3d276d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2168617
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Merge the outside and inside renderPass command buffer helpers to
share the single CommandBufferHelper (CBH) class.
This commom class is still used for separate outside and inside
renderPass command buffer objects in the context. That's a bit
wasteful since some functions and members are only relevant to
one type of command buffer.
However, this is a foundational change that will provide the
immediate benefit of being able to use the CBH as the interface
for passing commands to a worker thread. It also provides the
long term benefit of starting the refactor to merge the outside
and inside renderPass command buffers into a single command buffer
object that can be used by the main thread to record all commands
whether inside or outside of a renderpass.
Bug: b/154030403
Change-Id: I83c63385fe9858bc05853c550d4fb2e13226d582
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2180850
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
All the *_RANGE_SIZE enums were removed from vulkan_core.h
Fix up ANGLE references.
Bug: b/155750030
Change-Id: Idc4ee20d4a87f8cb3f46e105819af7257a7fea4b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2182577
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This works by storing the deferred clears in the ImageHelper's staging
buffers. We apply the deferred clears onto the RenderPass right before
we begin to draw. Storing the clears in the ImageHelper solves problems
where we clear GL Textures in a Framebuffer and then unbind the
Textures and sample from them. Or do other commands like CopyTexImage.
Note that because the staging buffer clears only handle full-image
clears we need to immediately apply some scissored clears where before
we would use the RP. This should be a pretty rare occurrence and it is
possible to optimize that in the future.
Reduces the RenderPass count in the Manhattan "frame 10" trace from max
22 to max 20. May improve perf slightly on Android or may have effects
too small to measure. Should not regress performance.
Bug: angleproject:4517
Change-Id: I02150d531022afb903f1058f070937ec6337bd88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2142711
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
When a texture's base or max mipmap level is changed, ANGLE creates a
new VkTexture (and potentially copies lots of data old->staging
buffer->new). However, ANGLE wasn't looking at the texture's format,
and for a compressed format ANGLE wasn't looking at/using the texture
format's compressed block width and height.
Bug: b/155499736
Change-Id: I11a12028aee998fa23d503c2c0db39fbb49ae6ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2180881
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
DynamicBuffer are not cache coherent, thus requires flush. Also adds a
few assertion to ensure implementation matches expectation.
Bug: b/155432713
Change-Id: Iaf28786168a3bb5d746b43e030f882c4b6d005ad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174269
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
This will allow ANGLE to share the same source location as
Chromium.
Bug: chromium:1074162
Change-Id: I3ea9820cc1fe9cd0bfec81d734168213e5c1bb0b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176067
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
When attempting to link a new program, the program must be marked
as unlinked, but the validation-related caching should not be
cleared yet, since we can still use the previously linked program
if linking fails at this point.
Added an angle end2end test which fails without this fix and
passes with this fix.
Fixes the following WebGL 1.0.4 test with SwANGLE:
conformance/programs/program-test.html
Bug: angleproject:3557
Change-Id: Ib6722ba88803979e8f292c9b7b81f85cc0304662
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2173538
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Check isSwiftShader() for whether to load swiftshader instead of the
default ICD.
The spec says we should query GL_DEVICE_UUID_EXT & co for this, but we
haven't implemented those queries yet.
Bug: angleproject:4092
Change-Id: Ifd74d6b6706f7b1fcbe5d82a33ecf70e631e26b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2088660
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
When the script has trouble parsing info for a step, it's supposed to
remove that step from the list of steps to not cause further problems
with the script (and log an error). Instead, it was being removed while
iterating the same list which caused malformed tables.
Bug: angleproject:4610
Change-Id: Iff8bfd77eae227907e78660183c79221d4d305a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2180342
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
We also need the bundled ICDs and selection logic for certain tests that
create a vulkan instance. If we don't, the tests will use default vulkan
even if ANGLE is using swiftshader-vulkan. Tests of driver specific
handle types (e..g opaque fd) will fail in this case.
Bug: angleproject:4092
Change-Id: Iff089c9341b8b533ee8634923d0177c5dbcd5cc8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2088659
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
The current timeline implies the existence of time travel.
Bug: None
Change-Id: Ic558f430912b874afc881f4841a49236f26b78dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2178945
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This CL adds two program pipeline object (PPO) tests based on code
inspection during review. They are both disabled awaiting fixes.
* The first (DetachAndModifyShader) tests a bug that shaders aren't
detached immediately on call.
* The second (DifferentTextureTypes) tests PPOs with mismatched
texture types. They should not link if the programs use a texture in
non-matching ways.
Test: ProgramPipelineTest31.DetachAndModifyShader*
Test: ProgramPipelineTest31.DifferentTextureTypes*
Bug: b/151462886
Bug: b/151449648
Bug: angleproject:3570
Change-Id: Ief0937397d31c972bf5e3a8d56b02d2dbd5a604b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2146997
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
EGL_CONTEXT_OPENGL_DEBUG is only exposed as of EGL 1.5.
We can also now properly test for no_error extension strings.
Do not require backwards compatible context extensions.
Fixes parts of using EGLWindow to load native EGL drivers.
Bug: angleproject:4596
Change-Id: I4de8f492f265d29f6603ed1b35b123e362699c54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176271
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
This is helpful for figuring out if we can support the DEBUG
property when initializing an EGL context. It also will be
necessary down the line for Android.
Bug: angleproject:4596
Bug: b/154921118
Bug: angleproject:4606
Change-Id: I01c2cbaa21495e3620b7858f2a309c9a884033ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176277
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Fix a couple minor nits with command buffer handling in ANGLE:
1. Make initialize() common CommandBufferHelper function
2. Reduce some common code when starting renderpass
Bug: b/154030403
Change-Id: Ie9cfcd7c053c8605b16bc2dee7f8d69418922492
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2175106
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
Handle all 4 rotations and non-full-screen viewports & scissors.
Test: Running NBA 2K20 while flipping phone left and right (90 & 270) + watching it in Visual Studio and with Android logcat INFO messages
Bug: b/150329969
Bug: angleproject:4431
Change-Id: Icd555dbc2419aac1413452c1b306d6227784dc27
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174961
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
For some reason this line of code confused git cl format
in that it would generate different results depending on when
it was called:
"PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC
ANGLE_EGL_StreamConsumerGLTextureExternalAttribsNV;"
I wasn't able to root cause the bug. Instead I worked around
it by changing the signatures for this file.
Bug: angleproject:4596
Change-Id: I4f18e03d27d378480b19831de51c4e85d815ca66
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176157
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
FramebufferAttachmentObject::initializeContents clears the entire mip
level for layered textures (not including cube map). This was done by
special casing 2D array and 2D multisample array textures but did not
work for 3D.
Generalize the logic to work for all layered texture types.
Handle clearing the entire 3D texture mip in Vulkan.
TEST=conformance2/misc/uninitialized-test-2.html
BUG=angleproject:4602
Change-Id: I35bb9fc3304f0553e8de68d205b0843845bf7549
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174264
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Instead of walking through uniform locations, walk through
the uniforms themselves and emit arrayed uniforms, which consume
multiple locations.
Test: MEC capture of Manhattan on Windows
Bug: angleproject:3662
Change-Id: Ifd25528721982847d4f0938f469a914a1cb908c5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2175994
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Moved GPU trace event and occlusion query commands that were on the
primary command buffer to the SecondaryCommandBuffer (SCB). Putting
these commands on outside render pass SCB and flushing those commands
to primary on-demand as needed to maintain ordering of commands.
For resetQueryPool command used by occlusion query, allow the SCB
to queue up that command for inside RenderPass SCB. This avoids
ending a renderPass prematurely and allows all outstanding reset
commands to be executed before the beginRenderPass command since
the resets must occur outside of a renderPass.
This is groundwork to simplify the hand-off of SCBs from the main
thread to a worker thread. Long-term we'd like a single SCB that
can handle both inside and outside renderPass commands at the same
time to pass to the worker thread for processing into a primary CB.
Bug: b/154030403
Bug: angleproject:4603
Change-Id: Ic1023ae27a9b14435743549ea9933edf1c4b318b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2168114
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
In some cases we'd end up with attributes that are optimized
out by the GL driver. BindAttribLocation forces the programs
to use the same attribute indexing numbers so that the command
stream works mostly the same even if some attributes aren't
active in the shader.
Bug: angleproject:4598
Change-Id: I2d02dd38d29a1489706ae70bcc0b262b1c076942
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174266
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
These were slightly mismatching the header types. They seemed
to link fine despite producing some warnings in a tool.
Bug: angleproject:4598
Change-Id: I19cfe4d87eca409c82a7c8cf25fff6f8a4c83ca9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2175057
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
This reverts commit 9349c14344
and commit d43b057435.
It's no longer needed after we bind attribute locations before link.
Original CL message:
This will allow the capture/replay tool to easily intercept and label
attribute locations for remapping.
There's some inconsistency in implementation in the GL desktop front-
end. This is a quick fix and the full implementation is left for when
we implement the full desktop GL API set.
Bug: angleproject:4598
Change-Id: Ic510159d4d1982eff41560503cabf983a1be0381
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174076
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This adds helper functions to handle common use case for onBufferRead
and onBufferWrite to reduce the API verbosity a little bit. Also fix the
transform feedback bug that we are passing in wrong access/stage flags
when it is emulated by vertex shader.
Bug: b/155122200
Change-Id: Id2549ca00cad184a90c6230dc3665aaff44dda08
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174265
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Courtney noted this bug from a review. Should begin label on pushGroup
instead of insert label.
Bug: b/154030403
Change-Id: I5f4da5762e1ef03fe27b414740e34d2064af86b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171951
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
- run the same checks on 'git cl upload' as 'git cl pre'
- show the problematic line on non-ascii presubmit check
Bug: angleproject:4601
Change-Id: I321e22fd49f7a83aa062ebae01d13476e57044e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174075
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Add support for the EGL_EXT_image_dma_buf_import on EGL implementations
that support it natively. This extensin is used on ozone to import
native compositing buffers.
This patch also adds new tokens in EGL_EXT_image_dma_buf_import_modifiers
which are used in eglCreateImageKHR.
BUG=angleproject:4529
Change-Id: I49bff831b591fb19fcdcec1145c7a61f5d8020c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2128190
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
It's required on Chrome OS.
Based on spec EXT_texture_format_BGRA8888, this format is renderable.
Bug: angleproject:4594
Change-Id: Ibde0f0de18f4b8079a23f4b13123c6b5c8794a89
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2172638
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
'index' became 'indexPacked' for attribute locations. It
also changed the type.
Bug: angleproject:4598
Change-Id: I6393e09dd1d5c1a7c5d0e2ca8a67e4f7bbb05411
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174263
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Clang format and non-ascii characters don't get along well, which are
typically introduced when copy/pasting spec language. This CL will
detect non-ascii characters during presubmit.
Bug: angleproject:4601
Test: git cl presubmit --upload
Change-Id: I80080fc04590ad47c9756f8f969d5c7f44d41793
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2173684
Reviewed-by: Shrek Shao <shrekshao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
This will allow the capture/replay tool to easily intercept and label
attribute locations for remapping.
There's some inconsistency in implementation in the GL desktop front-
end. This is a quick fix and the full implementation is left for when
we implement the full desktop GL API set.
Bug: angleproject:4598
Change-Id: Ibf11bcb8669d27265ea376494a2e3124825cf3be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171933
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
We aren't properly handling them, were already firing UNIMPLEMENTED,
but can't continue with the loop. Will follow up with real support.
Test: MEC capture of Manhattan on Windows
Bug: angleproject:3662
Change-Id: I7b77350b39971fda702eac8b19c6f29f36f78146
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171759
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>