Implemented DetermineBGRAReadFormatSupport in order to allow enabling
readFormat when possible with the Vulkan backend.
While reading the spec, I realized that ANGLE only seems to care
about BGRA8888 and not the new types mentioned in the extension.
Logged a new issue (http://anglebug.com/4302) to track this.
Bug: angleproject:4294
Change-Id: I071ed89574de9b4088df2301c317d3769cb31ce6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2003237
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
DetermineFloatBlendSupport was added to be able to set floatBlend to
true if requirements are met. Essentially GL_EXT_float_blend complements
GL_EXT_color_buffer_float by making any non-blendable formats blendable.
Bug: angleproject:4291
Change-Id: I40d6bb7a93b8847a63de2d25c6a8dc411d6d8fbb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001479
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
The GL_EXT_color_buffer_float spec
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_float.txt
mentions that some of the formats must be blendable:
"Blending applies only if the color buffer has a fixed-point or
floating-point format. If the color buffer has an integer format,
proceed to the next operation. Furthermore, an INVALID_OPERATION
error is generated by DrawArrays and the other drawing commands
defined in section 2.8.3 (10.5 in ES 3.1) if blending is enabled
and any draw buffer has 32-bit floating-point format components."
So any non 32-bit floating-point must be blendable.
Bug: angleproject:4291
Change-Id: I850fb13b71e4ad03fd07e2a265896c9106bc0ce1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001478
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Add support for floating point configs. On backends that
support rendering to floating point formats, add them to
EGL's frambuffer config list
Bug: angleproject:3958
Tests: dEQP-EGL.functional.wide_color.*fp16*
angle_end2end_tests --gtest_filter=EGLFloatSurfaceTest*
Change-Id: Ie65f63013483267985c2b308567bf5025acf750e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1993686
Commit-Queue: Mohan Maiya <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
- Added a blendable check to InternalFormat
- Set the blendable check to the same as the Renderbuffer check for
most formats, except true integer formats and 32F formats
- True integer formats never support blending
- 32F formats support blending based on the GL_EXT_float_blend
Bug: angleproject:4291
Change-Id: Icffdd3e6d8791303bdfdad9ec01cfd9a1d511af0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1999495
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Alexis Hétu <[email protected]>
This moves the resource use tracking functionality out of CommandGraph.
Making the list a separate class helps the implementation avoid tricky
circular include problems.
Bug: angleproject:4029
Change-Id: I3288fc685b21e949f12b0796109a2b7bb117c249
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2002931
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
ANGLE_STATE_VALIDATION_ENABLED is expensive, adding a lot of overhead
to draw calls in debug mode. It's causing some of WebKit's layout tests
to time out. Instead of enabling it for all debug builds, let's only
enable it when ANGLE_ENABLE_DEBUG_TRACE is specified.
Bug: angleproject:3900
Change-Id: I9866d7afbb5666f35c56539820d591953bdf7650
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1994440
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: James Darpinian <[email protected]>
This abstracts away the ResourceUse tracking from CommandGraph. Pulling
it out will allow us to more easily swap resource use tracking into
ContextVk. The command graph is eventually going away so we need to
move functionality out of CommandGraph.
Bug: angleproject:4029
Change-Id: Icc3bcc824510b03e91f8ff010a82751a81516bfa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2002930
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Vulkan distinguishes between a texture format that can be used as a
render target (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) and one that
supports blending (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT).
This cl adds a blendable capability and sets it based on the
appropriate bit. It also adds the check in GetFormatSupportBase(),
but all uses of it are currently set to false.
In terms of behavior, this cl should be noop.
Bug: angleproject:4291
Change-Id: Ib151ac8ab7b69311b7fdef15ad87186d13e3ed78
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1999494
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
The passthrough ASAN fuzzer was hitting a null-dereference trying to
call glBlitFramebuffer when ANGLE was not exposing it. The fuzzer uses
the NULL backend so we can just expose it.
Bug: chromium:1029829
Change-Id: I0f65c65284756fa21821155559a6404d95e25647
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2003230
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jonah Ryan-Davis <[email protected]>
The previous implementation of the function had an incorrect comment
that implied XQueryTree was a great way to check if a Window is valid.
Any X11 function taking a Window is a good candidate, what we need to be
careful about is X11 exiting the program on any error.
Replace it with a call to XGetWindowAttributes while ignoring X11
errors.
This fix was found while implementing similar functionality in Dawn.
Bug: dawn:269
Change-Id: I777e59cddbe94baf63286d11887b58c63ac2b66c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001301
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
Found two issues when native OVR_multiview and OVR_multiview2 extensions are generated.
1. OVR_multiview got replaced by the OVR_multiview2 in the translated shader (ESSL & GLSL)
2. Duplicate #extension OVR_multiview2 (for Fragment & Vertex) and 'layout (num_views=x)' (for Vertex) got generated into the translated shader.
Bug: angleproject:4247
Change-Id: I9a550883eeb326d95af4557578f8202a9493f4ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1983802
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Rafael Cintron <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
This was done based on the incorrect assumption that Vulkan GLSL doesn't
allow layout qualifiers on interface block fields. This was due to
glslang compile failures in some shaders that included mixed row- and
column-major fields in interface blocks.
However, the failures were only in the case the interface block is
inactive, in which case glslang wrapper previously replaced the
layout/qualifier of the interface block with |struct|, which left the
shader with an unused struct definition with fields that have layout
qualifiers; an invalid shader.
The change introduced in
https://chromium-review.googlesource.com/c/angle/angle/+/1951523
removes inactive shader interface declarations. The above scenario thus
never occurs, rendering the row- to column-major transformation
unnecessary.
Bug: angleproject:3443
Change-Id: Ice34a0fc6e047b79a4d44f04b730ec59bdfafe33
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1961098
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
Previously we were still calling GoogleTest directly. This change
switches the test main funtions to call the standalone harness. Only
affects standalone and shouldn't affect the tests in Chromium or on
the current test setup.
Bug: angleproject:3162
Change-Id: Ia5a5a73d47c0b47b4df8f54cd6df71da2d878847
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1998661
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Adds special handling for the DISABLED_ GTest test name. Fixes the test
for the test suite harness itself when run with the new "--bot-mode"
flag.
Bug: angleproject:3162
Change-Id: Idf34098d2d6bcb78263773be7b01c55df9ec624b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1998660
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Reorganizes the build files to work with a more divided setup. It is
unclear if we'll ever be able to run tests in a UWP config. This at
least sets up the organization so it would at some point be possible.
Bug: angleproject:4182
Change-Id: I49dddfcdc0118b11466fe171f949c28d101ac6a2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1953484
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Changing SwiftShader to return:
VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_4_BIT for
for VkPhysicalDeviceLimits::sampledImageIntegerSampleCounts fixes two
tests that were failing with SwS.
This also fixes the expectations file for another test.
Bug: angleproject:4260
Bug: angleproject:4259
Bug: angleproject:3565
Change-Id: I698468ff8421b1c8556c8671b173e1cfde6b7f6e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1999484
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Ian Elliott <[email protected]>
Commit-Queue: Ian Elliott <[email protected]>
For current WEBGL_video_image implementation, VideoImage texture type translates to its
native texture type in blink layer.
A refactory for this implementation is required but is complicated and need much time.
Currently, we need a workaround in ANGLE to support this extension.
Current end2end tests can monitor this workaround well.
BUG=chromium:776222, angleproject:3889
Change-Id: I864bc2734cfffc8c5aea6166466767e3fb31c1c7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1989864
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
This function was unconditionally calling finishImpl(). This is changed
to finishToSerial() to only wait until the serial that actually used the
buffer.
Bug: angleproject:3072
Change-Id: Ida89bb119b4ba6420f12404b911af0e3b4583a51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1993407
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Under robustBufferAccess, Vulkan states that:
Vertex input attributes are considered out of bounds if the offset of
the attribute in the bound vertex buffer range plus the size of the
attribute is greater than either:
- vertexBufferRangeSize, if bindingStride == 0; or
- (vertexBufferRangeSize - (vertexBufferRangeSize % bindingStride))
The latter implies that if the buffer size is not a multiple of the
vertex attribute stride, what lies beyond the last multiple of stride is
considered out of bounds.
It also says:
Out-of-bounds buffer loads will return any of the following values:
- Values from anywhere within the memory range(s) bound to the buffer
(possibly including bytes of memory past the end of the buffer, up to
the end of the bound range).
- Zero values, or (0,0,0,x) vectors for vector reads where x is a valid
value represented in the type of the vector components and may be any
of ...
The first bullet point indicates that the driver is allowed to load the
attribute values from the buffer if its range still lies within the
buffer size.
Take the following example:
- Buffer size = 12
- Attribute stride = 8
- Attribute offset = 0
- Attribute size = 4
Basically the buffer is thus laid out as follows:
attr stride
_________/\_________
/ \
+----------+----------+----------+
| vertex 0 | padding | vertex 1 |
+----------+----------+----------+
\___ ____/
V
attr size
In the above example, the attribute for vertex 1 is considered out of
bounds, but the driver is allowed to either read it correctly, or return
(0, 0, 0, 1) for it.
Most drivers implement the former, while AMD implements the latter.
This change introduces a workaround for AMD where
GL_MAX_VERTEX_ATTRIB_STRIDE is limited to 2048 (the common value for it
according to gpuinfo.org) and conservatively rounds up every buffer
allocation to that size.
While technically, this workaround should be applied on any device with
the robustBufferAccess feature enabled, it is currently limited to AMD
to avoid the inefficiency. A possible future revision of Vulkan may
relax the above restrictions.
Bug: angleproject:2848
Change-Id: Ida5ae5d777da10f22ce8be5a09a7644b5bbd778e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1991709
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
When the program binding changes, we set the descriptor sets binding
dirty bit if the program had any textures, UBOs, SSBOs, images or atomic
counters. The check for default uniforms was missing. So if the two
programs had no resources and were only using default uniforms, then
drawing with one after the other didn't update the descriptor set
binding of the default uniforms for the second draw.
Bug: angleproject:4277
Change-Id: I631a1619658ee713484cfaee99fe1e39987e16e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1993408
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>