Also updates relevant comments to no longer refer to a graph.
Bug: angleproject:4029
Change-Id: Ic29716e9ae4926870f902947d49d8fee7af98662
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057804
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
This can catch unexpected GL errors from ANGLE or the system driver.
Only enable when ASSERTs are enabled to ensure that we get full
performance when profiling.
Helpful to diagnose incorrect perf test rendering. In this case it
helped diagnose that our frame tracing and replay do not correctly
remap uniform locations.
Bug: angleproject:3630
Change-Id: Ifd9f47196381e48f74a810ea0c9f9c0fd7a13a22
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057352
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
This is a reland of f6e73131c5
Aligned BlendStateKey fields
Original change's description:
> Move sampleAlphaToCoverage out of blendState
>
> This is the second step towards exposing OES_draw_buffers_indexed (that defines independent blend state for each draw buffer). This flag is global in all graphics APIs, however D3D11 technically puts it in the blend state.
>
> D3D11: BlendStateKey was extended to keep existing D3D11 state caching semantics.
>
> D3D9: a comment was added explaining why this feature was never implemented there.
>
> Bug: angleproject:4394
> Change-Id: Ie6a294eeb6fcf4c868a1f1001c4f7efd61692ccd
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057063
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Bug: angleproject:4394
Change-Id: Ia7aed863f0f9f6066daf1b02ecade3256f494062
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2066698
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Minor cleanup to change funciton signatures of vulkan specific methods in
MemoryObjectVk & SemaphoreVk.
Bug: angleproject:2475
Change-Id: I230664548004ebc48b559e0f25264ea948ce5a1f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2067500
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
In the final frame of Manhattan, resources are cleaned up,
even if they are non-existent. This is allowed by the GLES
spec. Compilation of the replay would fail, for instance:
error: use of undeclared identifier 'gRenderbufferMap';
did you mean 'gFramebufferMap'?
const GLuint glDeleteRenderbuffers_renderbuffersPacked_0[] =
{ gRenderbufferMap[0] };
^~~~~~~~~~~~~~~~
This is because we are only declaring resources if they are used.
Instead, go ahead and emit the resources, then circle back when
filtering is implemented, allow that to optimize the replay.
Bug: angleproject:4091
Bug: angleproject:4223
Change-Id: Ib48da0d9c3f4f2eca268646e7717a12126b1d85c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2066455
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Only enabled for specific tests at the moment. This CL allows our tests
to sanitizes memory for the robust resource access extension. It is
quite slow so should not be enabled by default.
Only works for 1 level 2D color textures and buffers. Makes several
flaky robust resource initialization tests consistently fail.
Controlled via an angle::Feature in FeaturesVk.
It works by initializing memory to an abitrary non-zero value:
- if newly allocated memory is mappable, we map it in init and set it
- if a buffer or texture can be a transfer destination, we use a
staging resource
- otherwise we don't attempt to initialize the resource.
Bug: angleproject:4384
Change-Id: I9b4f347bfcddf3096f491ed0243bef86837feaa0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2043271
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Very simple diagnostics that prints out the command stream. Since there
is very little deferral right now the graph itself became quite a bit
simpler.
Also fills in some missing values in the switch that prints the command
name string.
Bug: angleproject:4029
Change-Id: Ib64a7fed6f9f56ce406cc7dbc6cc993ed510e2cb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2065530
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
This adds a FramebufferVk cache. Cache signature is based on unique Serial
values that are assigned to ImageHelper objects backing all color and DS
rendertargets as well as level/layer values unique to the imageView.
Update the Serials and cache signature at FramebufferVk::syncState() time.
L0 cache is a currently active framebuffer.
L1 cache retrieves previously created framebuffer from new cache.
If neither of those hit, create new FramebufferVk and add to L1.
Bug: angleproject:4322
Change-Id: I3f585271798ddfb9e5f194020adca8cf8a6b19dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033869
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Add extensions layered on top of GL_EXT_memory_object and GL_EXT_semaphore
to support GL & Vulkan interoperation on Fuchsia. They are analagous to
the file descriptor versions, except not quite as opaque.
This is a draft; the underlying vulkan extensions have not been submitted
to Khronos.
Bug: angleproject:3492
Change-Id: Ic4723ded9fff752c4186eaa6a7f07d9ac51a3364
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642332
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This copies functionality out of the command graph path. A preemptive
barrier ensures we don't need to issue an availability barrier when we
need to map buffer memory.
Bug: angleproject:4029
Change-Id: I868ce8bdb3c452dccf35cc9e70adf81ad7905c66
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2065917
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Add test for glBlendColor >1.0, skipped on D3D9 since it's unsupportable
there.
Bug: angleproject:3323
Change-Id: I3fcf867dae96bdadf8a0183269d8f27b659d0baf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1541723
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jeff Gilbert <jgilbert@mozilla.com>
DiscardFramebuffer was being ignored in the new linear path. Fix this
by using the correct APIs. Also cleans up some of the access to the
"RenderPassCommandBuffer" struct in ContextVk. Add a new accessor that
returns the RenderPass without a flush that ensures it is only called
when a RenderPass is already started.
Bug: angleproject:4029
Change-Id: Ibd199f3a371c0f91b448a0b34c8752dc8b76c284
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057329
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Enforces that the validation layers should be working pretty much read-
only with the exeption of updating caches. Requires a few tricks:
- updates EP code generation to add 'const' to pointer parameters
- enables a kludge const_cast to enable the robust query extension
- makes some members of Framebuffer mutable to work around syncState
- makes 'is' queries and other methods in Context/State const
Will allow us to more safely expose the no_error extension.
Bug: angleproject:1280
Change-Id: Id9756757854c9e68fc096ecec8d93759fbe6b3a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2060689
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Implement eglWaitNative API. It will call XSync() on XCB and
do nothing on other systems.
Bug: angleproject:4281
Change-Id: I597b75124a380df519ab10af3cab9b6e26f3194f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2059620
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
In the case where command graph is disabled, we don't need to call
appendToStartedRenderPass().
Bug: angleproject:4029
Change-Id: I9b9d1ad666a903fcb63ab394944cfe7adb836a08
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2065708
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
These again weren't being tested on the CQ. Probably necessary for some
image sharing scenarios.
Bug: angleproject:4029
Change-Id: Iccbebf127e2ec6fdb74dd213998674fff77b75b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2065529
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
Reduces much of the code duplication by adding some new helper methods.
The helpers allow combining test parameters similarly to how the
GoogleTest Combine() and Values() generators work. They are more
general and work by returning collections of test parameters instead
of combining generator functions.
Also updates the GLMark2 benchmark runner to use the new methods.
Bug: angleproject:3630
Change-Id: Ibc10f9afb401e119d67a7119974a1a8d9b5abb60
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057353
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Prior to this commit, when "OpName %id name" was encountered, the info
corresponding to "name" was immediately associated with %id. This is
not necessarily correct because there could be multiple ids with the
same name. For example a sampler declaration and an unrelated function
argument could have the same name. In this case, the sampler
declaration and function argument name don't even need to be in the same
shader stage.
This change modifies the SPIR-V transformation such that the name-id
mapping is tracked until the OpVariable instruction that actually
declares the variable is visited. The mapping to variable info is only
done if the storage class specified in this instruction corresponds to a
shader interface variable.
Bug: angleproject:3394
Change-Id: I35a1f6f8278e4b1ad81c9955a55e1b72d6f2e4ea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057248
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This is essentially the same commit as fed0dda, but with the BaseVertex variant.
Bug: angleproject:4373
Change-Id: I2d6fe46a0e8ce5faa8c92d4db6909f8cabd9692f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2032972
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This reverts commit f6e73131c5.
Reason for revert: Crashes on Win10 FYI x64 Debug (NVIDIA) and Win7 FYI Debug (AMD) in the webgl CTS
Original change's description:
> Move sampleAlphaToCoverage out of blendState
>
> This is the second step towards exposing OES_draw_buffers_indexed (that defines independent blend state for each draw buffer). This flag is global in all graphics APIs, however D3D11 technically puts it in the blend state.
>
> D3D11: BlendStateKey was extended to keep existing D3D11 state caching semantics.
>
> D3D9: a comment was added explaining why this feature was never implemented there.
>
> Bug: angleproject:4394
> Change-Id: Ie6a294eeb6fcf4c868a1f1001c4f7efd61692ccd
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057063
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
TBR=geofflang@chromium.org,jmadill@chromium.org,lexa.knyazev@gmail.com
Change-Id: I650624b5dfb7f2777c316906b9145a411243f42f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:4394
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2062605
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This reverts commit 123fd97000.
Reason for revert: Causes GL creation failure on Linux FYI Ozone (Intel)
Original change's description:
> Provide default implementation of rx::DisplayEGL
>
> Will allow to use EGL instead of GLX on X11.
>
> Meant to be used on modern EGL so it requires the extensions
> EGL_KHR_no_config_context and EGL_KHR_surfaceless_context.
> This keeps the default implementation simple (no pBuffer
> fallback)
>
> Also provide simple WorkerContextEGL.
>
> Bug: angleproject:4328
> Change-Id: I92a1ded9e09e65de8bb83710274e0a73ecdff0a4
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2061168
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=geofflang@chromium.org,jmadill@chromium.org,julien.isorce@chromium.org
Change-Id: Ia55180ed83386fe1a158ccefda6155b33d779e98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:4328
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2062604
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Will allow to use EGL instead of GLX on X11.
Meant to be used on modern EGL so it requires the extensions
EGL_KHR_no_config_context and EGL_KHR_surfaceless_context.
This keeps the default implementation simple (no pBuffer
fallback)
Also provide simple WorkerContextEGL.
Bug: angleproject:4328
Change-Id: I92a1ded9e09e65de8bb83710274e0a73ecdff0a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2061168
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This CL adds a fence wait when we get more than 100 serials behind the
device. This fixes an ASSERT when unit tests or offscreen performance
tests get way ahead of the device.
Bug: angleproject:3630
Bug: angleproject:4281
Change-Id: I90f9af1b2ceb2b1cd9f2f638d6d84caaeeb83bb1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057351
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
This doesn't seem to be tested in the default CQ configuration.
Bug: angleproject:4029
Change-Id: If0acd5c78602324433b63498e2de8c16881023de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057354
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This is the second step towards exposing OES_draw_buffers_indexed (that defines independent blend state for each draw buffer). This flag is global in all graphics APIs, however D3D11 technically puts it in the blend state.
D3D11: BlendStateKey was extended to keep existing D3D11 state caching semantics.
D3D9: a comment was added explaining why this feature was never implemented there.
Bug: angleproject:4394
Change-Id: Ie6a294eeb6fcf4c868a1f1001c4f7efd61692ccd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057063
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Previously the validation layer would create the query if not created.
This change should be a no-op that makes the validation layer work in
a more "const-friendly" way.
Bug: angleproject:1280
Change-Id: Ife0c216c8a0dcda2a33d1182821c51e4ed5f67e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2060688
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>