|
8346addb
|
2024-02-06T15:40:31
|
|
Contain X11 includes and free usage of common terms
This change undoes workarounds where some terms were avoided so there is
no clash with X11 (such as Success, Bool and None). In particular, this
helps us make sure we never include the X11 headers in such an
unconstrained manner as to clash with our code.
Bug: angleproject:8520
Change-Id: I53d9657c5a33164064d2c80a206b96fd52f607f1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5273491
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
|
|
8403e4c5
|
2022-10-10T20:59:29
|
|
EGL: Resource IDs for Surface, Context and EGL Image.
This will make these classes play nicely with resource maps. As these
objects are used in a lot of places, and simplified C can't handle
unordered_map, it's necessary to index the maps by simple packed IDs
in capture/replay code. This indirection will also have increased
safety as we validate EGL resource ID handle values before accessing
the memory directly.
Also hides some of the other EGL capture methods behind helper methods
to simplify the C code and hide assignments and other complex maps.
Bug: angleproject:7758
Change-Id: Ibc7bb56430d3068bd38877c9dfb011979d4ea234
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957164
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
89e38b57
|
2022-06-22T15:04:08
|
|
Refactor to use ANGLETest vs ANGLETestWithParam
Bug: angleproject:6747
Change-Id: I72ad52d0268eae0e1a401f12f3e94cc5efa402f2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719002
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
4a65040b
|
2022-01-30T14:00:48
|
|
Add new Vulkan uniform update test.
This covers a specific case with multiple programs and descriptor
set caching. It could get tripped up by more complicated patterns
in the trace tests.
Bug: angleproject:6776
Change-Id: Ic8e42e55e60ef0fc01f0386712d3457abeea94e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3426884
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
8589c456
|
2021-12-22T17:13:33
|
|
Vulkan: Remove mStagingBuffer from ImageHelper and ContextVk
This CL removes ImageHelper::mStagingBuffer and
ContextVk::mStagingBuffer and uses per shared group staging buffer pool
instead.
Bug: b/208323792
Change-Id: I46b5fd542697eb860def9c6d592dd147ad4dc973
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3354090
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
2663e601
|
2020-09-24T18:28:31
|
|
Vulkan: Dynamically grow descriptor pool sizes
Initial testing using benchmarks shows that the majority of the
descriptor pools allocate fewer than 32 descriptor sets worth of
descriptors. This CL reduces the initial size of each pool from 128 to
32 to reduce memory consumption.
Additionally, when a pool is exhausted and a new one is created, the
size of the pool doubles each time, up to a max of 512 descriptor sets
worth of descriptors. This allows us to aggressively increase the size
of the pools that appear to be very hot and decrease the total number of
pools created.
Bug: angleproject:5067
Test: CQ
Change-Id: I190059cf04134902d6251d475dd908c1cbb82b58
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2430193
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
f12e4123
|
2020-08-25T12:01:12
|
|
Vulkan: Match descriptor pool sizes to descriptor set layouts
When a descriptor pool is created, a list of descriptor types and counts
are given to vkCreateDescriptorPool(). Later, when allocating a
descriptor set from the pool, we pass along a descriptor set layout to
vkAllocateDescriptorSets() which is used to determine how many of each
type of descriptor (i.e. binding) to allocate from the pool.
In order for our "free descriptor set" counts to be accurate for each
pool, the descriptor pools need to be created with descriptor counts
that match the descriptor set layout binding counts.
This change fixes a bug where the descriptor set layouts were created
with more bindings than the descriptor pool sizes, causing the "free
descriptor set" count to be inaccurate, leading to allocating too many
descriptor sets from a pool.
Bug: angleproject:3570
Test: VulkanDescriptorSetTest
Change-Id: I660bf02d29a1291391fb15f39e6479bf348d0f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2391114
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
85ddcc93
|
2020-08-24T14:22:22
|
|
Vulkan: Convert ProgramExecutableVk::mDescriptorSets to std::array
Currently ProgramExecutableVk::mDescriptorSets is a vector, but it's
size is bound so it can be a std::array (DescriptorSetLayoutArray).
To ensure the size grows correctly in the future, the various descriptor
set indexes are also being converted from independent constexpr
uint32_ts into the enum DescriptorSetIndex.
Bug: angleproject:4898
Test: CQ
Change-Id: I7ae8ff3455bcfb61e24b73bd16cc3f8cf9873087
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372664
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
8765b46a
|
2020-07-15T17:10:35
|
|
Vulkan: Make mDefaultUniformStorage per ContextVk
Right now the dynamic buffer for default uniform is per program. Most of
time the buffer is unused. That is a huge waste of memory (and these
memory are wired memory). This CL moves the mDefaultUniformStorage from
per ProgramVk to ContextVk so that we all share with each other.
Bug: b/161391337
Change-Id: I1fe8523b2b2dbc39bec3509a3432e38e34bd5713
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2274870
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
22e1f3e2
|
2020-06-26T14:26:50
|
|
Vulkan: Let all shader stages share one buffer for default uniform
Right now each shader stage has its own vk::DynamicBuffer for default
uniform storage. This is less efficient than just share one buffer. This
CL moves the storage from per shader stage into its ProgramVk object.
Bug: b/159457348
Change-Id: If47248ea23c4e48407d3b211583ae2b048d4d10f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2265281
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
120b61d3
|
2019-08-21T12:51:58
|
|
Use ShaderProgramID in place of GLuint handles
Bug: angleproject:3804
Change-Id: I5dc640004c2cc054c53261e8e939b6a9f5fc23bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762363
Commit-Queue: Jiacheng Lu <lujc@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
2ab08edc
|
2019-08-12T16:20:21
|
|
Use TextureID in place of GLuint handles.
Bug: angleproject:3611
Change-Id: Ie6156e8732b3ca4dc6c4439c059a5481a4dfd250
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738753
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
29fba5e0
|
2019-07-04T17:08:41
|
|
Vulkan: Prepare for variable-stage pipelines
Compute (single-stage pipeline) is upcoming, but this change prepares
GlslangWrapper to handle any number of stages (mostly). Additionally,
this change binds each resource to each stage based on whether it's
active, so that we don't hit the per-stage limit of resources by binding
every resource to every stage.
Bug: angleproject:3633
Bug: angleproject:3562
Change-Id: Ifebf691482846e0371c6e314f514226a4cfee258
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1689330
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d4d43ac0
|
2019-06-28T10:54:26
|
|
Add suppression for test failing on old MESA
Bug: chromium:979349
Change-Id: Iaeee744dc33e388e8030ccb923dde0c3f6fda0a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1679991
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0bfa5504
|
2019-06-03T10:40:10
|
|
Vulkan: Emulate Transform Feedback with vertex shader output
In ES 3.0 and 3.1, only non-indexed GL_POINTS, GL_LINES and GL_TRIANGLES
is supported for transform feedback. Without tessellation and geometry
shaders, we can calculate the exact location where each vertex transform
output should be written on the CPU, and have each vertex shader
invocation write its data separately to the appropriate location in the
buffer.
This depends on the vertexPipelineStoresAndAtomics Vulkan feature.
Bug: angleproject:3205
Change-Id: I68ccbb80aece597cf20c557a0aee842360fea593
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1645678
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c773ab98
|
2019-06-25T17:11:58
|
|
Vulkan: Recycle dynamic buffer storage.
This adds a free list to the dynamic buffer storage. Buffers are added
to the free list when the retained buffers are released. They are taken
from the free list when we allocate a new buffer. We only allocate
a new buffer in the ring when we run out of free buffers. This reduces
the amount of time we spend in allocation for frequent updates.
Now that we're recycling buffers inside of DynamicBuffer we also need
to be a bit more careful about when we allow ourselves to reuse them.
If they're still in use by the GPU we should not try to modify them.
Bug: angleproject:3082
Change-Id: Ibee5a7e2fe4a17f4a2f7af6bc6bcce54bdc413c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646548
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
88596bea
|
2019-06-13T14:17:48
|
|
Vulkan: Implement a texture descriptor cache.
We noticed a significant hotspot in vkAllocateDesctiptorSets. The app
was repeatedly cycling through a few combinations of active textures.
For each state change in ANGLE we were allocating a new desctiptor set.
This in turn would trigger internal driver memory allocation and cause
jank. Using a cache avoids allocations entirely since the application
is rotating through a stable set of textures.
The descriptor cache is stored in each program. It is indexed by a set
of 32-bit serials. Each texture generates a unique serial for every
combination of VkImage and VkSampler that the texture owns. The texture
descriptor is refreshed every time a texture changes or is rebound.
The descriptor cache is accessed via an unoredered map with the texture
serial sets as the hash key. We also store the maximum active texture
index in the cache key so we don't need to hash and memcmp on all 64
active textures.
This will currently fail if more than MAX_UINT serials are generated.
But that number is high enough that it shouldn't be possible to hit
in practice in a practical amount of time.
Requires shifting the texture sync to ContextVk so we can get the new
serial after the textures are updated. And to make sure to update the
image layouts even if the descriptors are not dirty.
Improves performance of the T-Rex demo. Also improves the score of the
texture state change microbenchmark by about 40%.
Bug: angleproject:3117
Change-Id: Ieb9bec1e8c1a7619814afab767a1980b959a8241
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642226
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
266a9e8d
|
2019-06-05T15:15:10
|
|
Vulkan: Move descriptor pools into ProgramVk.
Previously ContextVk owned the descriptor pools. We were trying to
maximize descriptor reuse to conserve memory. However the default
uniforms would have no possible sharing. And because uniform buffers
are usually unique to a program it's likely there would be less reuse.
Image descriptors could be shared. But with the advent of a descriptor
cache in the Program it becomes difficult to manage the cache through
descriptor pool recycling. Moving the pools into the Program simplifies
the cache management. We could look at adding back more reuse in the
future.
Also shifts driver uniforms back into the end of the descriptor sets
to make indexing into the Program's descriptor pools simpler.
Bug: angleproject:3117
Change-Id: I52bb49cf322d944ad7cf08791efdf24b7fe573ce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1644775
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
216f73d0
|
2019-04-12T13:32:30
|
|
Vulkan: add uniform buffer object support
Support for layout qualifiers in interface blocks are added. All
interface blocks are adjusted to either be in std140 or std430.
In the Vulkan backend, a new descriptor set is added for UBOs. A dirty
bit is added for UBO updating and pipeline layouts and descriptor
bindings are updated.
Bug: angleproject:3199, angleproject:3220
Change-Id: I271fc34ac2e1e8b76dee75e54a7cff0fe15fe4ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565061
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
ba319ba3
|
2018-12-29T10:29:33
|
|
Re-land "Load entry points dynamically in tests and samples."
Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL
headers.
This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.
Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.
All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.
The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.
Bug: angleproject:2995
Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57
Reviewed-on: https://chromium-review.googlesource.com/c/1392382
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
9f088621
|
2018-12-29T20:46:15
|
|
Revert "Load entry points dynamically in tests and samples."
This reverts commit 03923558a7103827ffec6a4d2a1453ed91f01c6f.
Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624
Original change's description:
> Load entry points dynamically in tests and samples.
>
> This CL adds a dynamic loader generator based on XML files. It also
> refactors the entry point generation script to move the XML parsing
> into a helper class.
>
> Additionally this includes a new GLES 1.0 base header. The new
> header allows for function pointer types and hiding prototypes.
>
> All tests and samples now load ANGLE dynamically. In the future this
> will be extended to load entry points from the driver directly when
> possible. This will allow us to perform more accurate A/B testing.
>
> The new build configuration leads to some tests having more warnings
> applied. The CL includes fixes for the new warnings.
>
> Bug: angleproject:2995
> Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
> Reviewed-on: https://chromium-review.googlesource.com/c/1359516
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org
Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2995
Reviewed-on: https://chromium-review.googlesource.com/c/1392381
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
03923558
|
2018-12-29T10:29:33
|
|
Load entry points dynamically in tests and samples.
This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.
Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.
All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.
The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.
Bug: angleproject:2995
Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
Reviewed-on: https://chromium-review.googlesource.com/c/1359516
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
5f01324f
|
2018-11-26T12:41:12
|
|
Vulkan: Allow descriptor pool to allocate different types
The internal shaders know exactly what mix of resources they use, so
with this change they can make one allocation of multiple types.
Bug: angleproject:2958
Change-Id: Ia6f03672b95af4be9618a2f5eeb41ef1c027e810
Reviewed-on: https://chromium-review.googlesource.com/c/1351116
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
78bcd2be
|
2018-10-16T15:05:20
|
|
Vulkan: Fix deleting in-use descriptor sets.
Sequences of many frames with uniform updates could lead to a bug where
we attempt to delete descriptor sets that are still in use. To trigger
the bug we need to write enough uniform data to trigger a descriptor
set to be freed. This would correctly trigger refresh sets in the
Program. But if there was a second program idle in the background that
also allocated descriptors from the old pool, the bug would manifest.
Fix this by storing a shared handle to the descriptor pool in the
Program. The dynamic descriptor pool won't recycle descriptor pools
internally unless there are zero outstanding references to the pool.
We could also improve this in a resource sharing situation by keeping
a single shared dynamic descriptor pool per share group.
Includes a contribution from tobine@google.com that adds a test to
cover the bug.
Bug: angleproject:2863
Change-Id: Id585b85f33f8cfa3772ceff3af512d1e4fb0b75a
Reviewed-on: https://chromium-review.googlesource.com/c/1271919
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
edeaa835
|
2018-06-22T09:18:41
|
|
Vulkan: Fix mixed descriptor pool updates.
When updating the Uniforms and Textures pools at different rates we
could trigger an ANGLE bug. We would sometimes reset and free the
currently bound descriptors. We can fix this by using separate
descriptor pools for each descriptor set.
Bug: angleproject:2678
Change-Id: I605b558531e7745484e16156a3af5eac40ffcc79
Reviewed-on: https://chromium-review.googlesource.com/1110662
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Luc Ferron <lucferron@chromium.org>
|
|
05a449a7
|
2018-06-20T18:08:04
|
|
Replace reinterpret_cast with safer or no cast
When casting types to one another in C++, the weaker the cast,
the better.
This change replaces instances of reinterpret_cast with static_cast
or no cast where it safe and correct to do so.
BUG=angleproject:2683
Change-Id: I99c9033614a65282ae1d78cf0f4b80fabd75877a
Reviewed-on: https://chromium-review.googlesource.com/1109396
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
0cb6dc4c
|
2018-04-16T10:36:39
|
|
Vulkan: Fix texture descriptor set alloc count.
We were reserving half the required descriptor sets for our pool. This
fixes the counting and ensures we won't regress by adding a test.
Also enables the cube map texture sample, and removes an UNIMPLEMENTED
warning that was spurious.
Bug: angleproject:2318
Change-Id: I371cd7c5b42e1ce980cce7bb0ef04885db72b614
Reviewed-on: https://chromium-review.googlesource.com/1014165
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
7a06ac1b
|
2018-03-15T10:17:04
|
|
Vulkan: Dynamic update of uniforms
- This change enables us to update uniforms indefintely using
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC descriptor types.
- Enables 219 new dEQP tests in the uniform_api namespace.
- Creates a new white box test to validate new buffer allocation.
Bug: angleproject:2392
Change-Id: I8146e6104a6b7727f63265a4671577d251a8fca8
Reviewed-on: https://chromium-review.googlesource.com/965929
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|