|
eaa6961d
|
2021-05-17T18:56:53
|
|
Revert "Vulkan: Disable BufferVk suballocation"
This reverts commit 76181384075c6eb0a5788bf1b732a1e05f6d73bc.
Reason for revert: Bug exposed by this is fixed in https://chromium-review.googlesource.com/c/angle/angle/+/2896168
Original change's description:
> Vulkan: Disable BufferVk suballocation
>
> There are still unresolved bugs.
>
> Bug: angleproject:5719
> Bug: chromium:1209197
> Change-Id: I6a971c421d0ae266404d1ecbf8741a9747a4e809
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897545
> Reviewed-by: Cody Northrop <cnorthrop@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Tim Van Patten <timvp@google.com>
Bug: angleproject:5719
Bug: chromium:1209197
Change-Id: I5c24b5f6476eab98ed5a7b90b3d1796ffc7ca106
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2896169
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
8bd3d7d5
|
2021-05-17T13:45:33
|
|
Vulkan: Fix a bug releasing DynamicBuffer-owned buffer
There was one instance of BufferVk releasing a buffer it had allocated
from a DynamicBuffer. This shouldn't have happened as the DynamicBuffer
owns the buffers.
Bug: angleproject:5720
Change-Id: I435512f4bb099130126bf3efb48a238fcd9f3ddb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2896168
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
76181384
|
2021-05-14T15:31:24
|
|
Vulkan: Disable BufferVk suballocation
There are still unresolved bugs.
Bug: angleproject:5719
Bug: chromium:1209197
Change-Id: I6a971c421d0ae266404d1ecbf8741a9747a4e809
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897545
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
e354ff1a
|
2021-03-05T04:07:21
|
|
Vulkan: Allow DynamicBuffer suballocation in BufferVk
When allocations are made from DynamicBuffer, they suballocate from a
possibly larger BufferHelper. In BufferVk, the offset of the
suballocation was discarded, which limited the use of DynamicBuffer to a
pool of small buffers.
This change applies any such offset that may arise from suballocations
everywhere, and makes BufferVk use a larger buffer size when the
GL_DYNAMIC_* buffer usage hints are provided.
Bug: angleproject:5719
Change-Id: I3df3317f7acff1b1b06a5e3e2bb707616a7d0512
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2738650
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2d5df9d9
|
2021-05-01T12:50:55
|
|
Vulkan: Don't assume host visibility for external buffers
When importing external buffers, Vulkan ICDs could choose to
import the memory into a memoryType that doesn't support the
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT property. Account for this
possibility.
Bug: angleproject:5073
Bug: angleproject:5909
Change-Id: Ied063b38fa48d0c8508c4aaca9214cc526f393ad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2783669
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
cc3e7b5d
|
2021-04-26T14:26:29
|
|
Vulkan: Handle GL_MAP_PERSISTENT_BIT_EXT for external buffer
When user specifies GL_MAP_PERSISTENT_BIT_EXT bit for an external
buffer but we are unable to import it into a memoryType that supports
host visibility, error out with GL_INVALID_OPERATION error.
Bug: angleproject:5073
Bug: angleproject:5909
Change-Id: I03e5477266dfb705bfb0a1bce5ca003049ef4c7a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2862560
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
fc0c8d18
|
2021-04-27T16:58:50
|
|
Vulkan: Honor mapRangeImpl and unmapImpl abstraction
All BufferVk methods need to honor the abstraction provided by
mapRangeImpl and unmapImpl. Do not map BufferVk::mBuffer directly,
this is needed for when we support device local buffers that
cannot be CPU mapped.
Bug: angleproject:5909
Change-Id: I520e5cc0994560a3784b8978e349550211dc2cde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2862559
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
7fe44a53
|
2021-03-20T09:39:09
|
|
Vulkan: Don't acquire new BufferHelper for external buffers
EXT_external_buffer spec -
This extension allows the data store for an immutable buffer to be
sourced from an external EGLClientBuffer, allowing sharing of EGL
client buffers across APIs, across processes, and across different
processing cores such as the GPU, CPU, and DSP.
The intent is for a single backing memory to be reused across various
processes and processors. Ensure that a glBuffer backed by external
memory does not orphan the memory when glBuffer APIs like
glBufferSubData or glMapBufferRangeEXT modify the glBuffer.
Bug: angleproject:4380
Bug: angleproject:5073
Tests: ExternalBufferTestES31.*DoesNotCauseOrphaning*Vulkan
Change-Id: I4e88f80d93ee1ba1208378121412926351d10af8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2776192
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
331640e5
|
2021-03-09T14:36:19
|
|
Vulkan: Pass in the correct size to acquireBufferHelper
When BufferVk::acquireAndUpdate calls into acquireBufferHelper
to allocate a new buffer helper we were passing in the update
size instead of the full buffer size.
Modified acquireAndUpdate's parameter to better reflect intent.
Bug: angleproject:5689
Change-Id: Ic4fbc015651491ec028d747da5d45670264b93fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2746066
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
c054008f
|
2021-03-06T13:33:11
|
|
Vulkan: Check buffer usage before unmapping
Buffers with dynamic usage will have frequent CPU updates.
Don't CPU unmap such buffers after every update. Commits
b5af8bde13 and 58c35d421 took care of performing an unmap when
we release the buffer either to the renderer or mBufferFreeList.
Bug: angleproject:5689
Change-Id: Ib6b8f6a7d0cb36583140e67bf164e074af098b8b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2741688
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
e366e2c3
|
2021-02-27T01:00:02
|
|
Vulkan: Keep dynamic buffer's free list trimmed
ContextVk's staging buffer never gets a chance to free its free buffer
list. During application load time, a large amount of memory may be
allocated from this buffer to stage texture updates and they would
remain throughout the life of the application.
This change ensures that the free buffer list doesn't grow unbounded. In
the Manhattan trace, this saves >1GB of memory on Linux.
There are now three policies for vk::DynamicBuffer:
- Always reuse buffers: This is useful for dynamic buffers that make
frequent small allocations, such as default uniforms, driver uniforms,
default vertex attributes and UBO updates.
- Never reuse buffers: This is for situations where the buffer is
unlikely to be used after some initial usage, such as texture data
upload or vertex format emulation (as the conversion result is cached,
so it's never redone).
- Limited reuse of buffers: For the staging buffer in the context which
is shared by all immutable texture data uploads, it's useful to keep a
limited number of buffers (1 in this change) to support future texture
streaming while allowing a large number of buffers allocated in a
burst to be discarded.
Bug: angleproject:5690
Change-Id: Ic39ce61e6beb3165dbce4b668e1d3984a2b35986
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2725499
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d7037aa2
|
2021-02-11T14:35:30
|
|
Vulkan: noop glMemoryBarrier(CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT)
CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT requires a memory barrier: shader
buffer write -> host read. According to the spec, the data is only
available after a call to glFinish or wait on sync:
> The application must call MemoryBarrier with the
> CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT set and then call FenceSync with
> SYNC_GPU_COMMANDS_COMPLETE (or Finish). Then the CPU will see the
> writes after the sync is complete.
When a buffer is written to by the GPU, ANGLE calls
onHostVisibleBufferWrite(), which ensures a "memory write -> host read"
barrier is issued at the end of the command buffer.
Additionally, persistently mapped buffers use
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, so there's no need for a call to
vkInvalidateMappedMemoryRanges.
As a result, there's nothing necessary in ANGLE to do for this barrier
bit. Note that should persistenly mapped buffers start using
non-coherent memory, this barrier should imply a call to
vkInvalidateMappedMemoryRanges for the persistently mapped buffers.
Bug: angleproject:5070
Change-Id: Iaeae019dadfa659a47d2dac41c0c09f1c15e584b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2689380
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
0c5a55a5
|
2020-12-17T14:52:59
|
|
Vulkan: MapBufferRange should avoid wait if INVALIDATE_BUFFER is set
If glMapBufferRange is called with GL_MAP_INVALIDATE_BUFFER_BIT bit set,
caller indicates that it don't care about the previous content. If the
buffer is busy, instead of wait for GPU to finish and then map the
buffer, we should just allocate a new memory and return it.
brawl_stars is hitting this case. With this CL, the frame time is
cutting to half on the pixel device.
Bug: b/175905404
Change-Id: If1220f07ebf53dd28fe6a4732eaba84e2e57598e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2597784
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
2ffff6d0
|
2020-11-12T10:56:06
|
|
Vulkan: Support image buffers
This change does not support reinterpreted formats yet. Additionally,
despite lack of support for RGB32 formats, EXT_texture_buffer is exposed
by this extension. Those formats don't support the STORAGE_TEXEL_BUFFER
feature on any known hardware.
Bug: angleproject:3573
Change-Id: I85f45eb23f6a0aa533488bb98d9f226d59af4d76
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2534395
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f197ebac
|
2020-11-16T15:16:56
|
|
Vulkan: Add EXT_external_buffer support
Addition of buffer support for external memory
Also adds new end2end tests for these usecases
* SubData update
* map/unmap buffer
* dispatch compute with external buffer
Bug: angleproject:5073
Test: ExternalBufferTestES31.*Vulkan
Change-Id: Ib3cccaca77b76830effe49d3731782552e7424ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2525105
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9e7f08fc
|
2020-11-06T16:55:51
|
|
Vulkan: Fix incorrect reordering of barriers
Take the following situation, a simple copy from image to buffer:
ANGLE_TRY(contextVk->onBufferTransferWrite(buffer));
ANGLE_TRY(contextVk->onImageTransferRead(aspectFlags, image));
CommandBuffer &commandBuffer = contextVk->getOutsideRenderPassCommandBuffer();
commandBuffer.copyImageToBuffer(imageHandle, layout, bufferHandle, 1, regions);
Both `onBufferTransferWrite` and `onImageTransferRead` may flush either
the outsideRP or insideRP command buffers. If buffer is not previously
used, but image is used:
- onBufferTransferWrite: buffer usage is recorded in outsideRP1
- onImageTransferREad: outsiderRP1 is flushed, outsideRP2 is started
- copyImageToBuffer: recorded on outsideRP2, but buffer usage not
recorded there
- A following command that uses the buffer and requires barrier doesn't
close outsideRP2 as it believes it was not used there
Bug: angleproject:5319
Change-Id: Ib8994083fbc21969a538cda3784adee57b089415
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2523388
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a2d8bbb5
|
2020-09-18T18:18:34
|
|
Vulkan: Add GL_EXT_buffer_storage extension support
Addition of support for immutable storage to buffer objects.
Also adds new end2end tests for these usecases
* Basic BufferStorage
* SubData update
* map/unmap buffer
Bug: angleproject:5056
Tests: angle_end2end_tests --gtest_filter=BufferStorageTestES3*Vulkan
Change-Id: Iba74b372ad033711927b63c6a04cec0eeb4db699
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419952
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
68a5baeb
|
2020-09-23T22:13:03
|
|
Revert "Vulkan: Implement a SharedResourceUse pool"
This reverts commit de335c16855f11d1f0a6f0b37bee30c8a09a6c1d.
Reason for revert: Might actually regress CPU overhead perf.
Unsure but it's possible the reported perf improvement was due
to variance.
Original change's description:
> Vulkan: Implement a SharedResourceUse pool
>
> When adding a Resource to the ResourceUseList of ContextVk
> we constructed a new SharedResourceUse object for tracking
> and update of the Resource's Serial. We would then delete
> it after releasing the resource. This incurs repeated
> memory operation costs.
>
> Instead we now allocate a pool of SharedResourceUse objects
> and acquire and release from this pool as needed.
>
> VTune profile of the Manhattan 30 offscreen benchmark
> shows the CPU occupancy of bufferRead decrease from an
> average of 0.9% -> 0.6% and imageRead decreases from
> an average of 0.4% -> 0.3%. The bottleneck for both
> these methods is the retain() method that leverages
> the new SharedResourceUse pool.
>
> Bug: angleproject:4950
> Change-Id: Ib4f67c6f101d4b2de118014546e6cc14ad108703
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396597
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
TBR=syoussefi@chromium.org,jmadill@chromium.org,m.maiya@samsung.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:4950
Change-Id: I40081551c3db67d6e55182fea40119946ed16ac3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2426479
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
de335c16
|
2020-09-14T12:04:20
|
|
Vulkan: Implement a SharedResourceUse pool
When adding a Resource to the ResourceUseList of ContextVk
we constructed a new SharedResourceUse object for tracking
and update of the Resource's Serial. We would then delete
it after releasing the resource. This incurs repeated
memory operation costs.
Instead we now allocate a pool of SharedResourceUse objects
and acquire and release from this pool as needed.
VTune profile of the Manhattan 30 offscreen benchmark
shows the CPU occupancy of bufferRead decrease from an
average of 0.9% -> 0.6% and imageRead decreases from
an average of 0.4% -> 0.3%. The bottleneck for both
these methods is the retain() method that leverages
the new SharedResourceUse pool.
Bug: angleproject:4950
Change-Id: Ib4f67c6f101d4b2de118014546e6cc14ad108703
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396597
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
295d2ccd
|
2020-08-24T14:46:31
|
|
Vulkan: Generate perf warnings on suboptimal paths
Using KHR_debug features, this change creates a
performance-warning-generation macro and employs it in a handful of
locations to provide useful feedback to application developers.
The warnings added in this change are not exhaustive.
Bug: angleproject:3461
Bug: angleproject:4900
Change-Id: Id62435d170d90c5be9c1c5cab2d6779ccb58345e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372628
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
027f0c38
|
2020-08-24T15:55:55
|
|
Vulkan: Remove Host->device availability barrier.
vkQueueSubmit already performs this operation, so this barrier was
unnecessary.
The only place this is necessary is when the GPU is expected to receive
updates from the CPU post-submit. ContextVk::synchronizeCpuGpuTime is
the only such use-case in ANGLE.
Bug: angleproject:4897
Change-Id: I7297fbd65d3faabd949dddb6bcaa181053a83193
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372631
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4909d08c
|
2020-08-19T12:21:44
|
|
Vulkan: Rename mStagingBufferStorage to mStagingBuffer
Rename only to keep it consistency.
Bug: b/164511310
Change-Id: I7b00c48010b76bff0b292e6e75b9aff154cdecc0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2364727
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
eb85c021
|
2020-08-05T15:07:15
|
|
Vulkan: Refactor Context CommandBuffer query.
getOutsideRenderPassCommandBuffer returns the command buffer directly
since it's now stateless and cannot throw an error. All the RenderPass
begin/end and flushing are done by the dependency functions (buffer/
image read/write).
Bug: angleproject:4911
Change-Id: I5e7806be9d0e1b5e358524bd485298d660fac942
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2339544
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
23daea2f
|
2020-08-06T10:40:00
|
|
Vulkan: Rename CommandBuffer get method.
This method will no longer end the RenderPass in a following CL.
Renaming it in a split CL makes the review diff simple.
Bug: angleproject:4911
Change-Id: Id48257884dccb7c86f7de2cc9ca95e651fb68df7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2340788
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
f9dd2c15
|
2020-08-02T18:03:16
|
|
Vulkan: Accumulate Buffer barriers.
Uses an unordered_map in the CommandBufferHelper to track buffer
reads and writes. Buffer barriers are tracked specially in the
CommandBufferHelper class as a barrier we execute immediately when
we execute the commands into the primary. So when we run into an
incompatible buffer access we must start a new command buffer.
The rules for an incompatible access are:
- when we are reading a buffer, any prior write in the same command
buffer is incompatible.
- when we are writing a buffer, any prior read or write in the same
command buffer is incopatible.
Also adds a regression test using a new performance counter.
Bug: angleproject:4429
Change-Id: I393a4ed87314f955eb998940b877ba76ea15a7b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2334091
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
de309a42
|
2020-07-21T17:19:17
|
|
Vulkan: Make staging buffer per context
Right now staging buffers are per BufferVk. This will make it per
ContextVk so that it can be shared among all objects that needs a
staging buffer.
Bug: b/161846868
Change-Id: I9c436acdacaf429a43cbdfa216927df0796f7a28
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2310962
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
dc9743fb
|
2020-07-14T11:33:29
|
|
Add buffer serialization capability
Serializes buffers' states stored on CPU.
Gets buffers contents on GPU by mapping buffers to CPU's address space,
then copy their data. Unmap buffers after finish. Since this feature is
for tests only, it is only implemented for the Vulkan backend.
Adds buffer serialization to serializeContext method so that capture
replay regresssion testing now compares the states of buffers too.
Bug: angleproject:4817
Change-Id: Ic9b529701014d5ba8420023a021cd5ea381bd9a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2295950
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
62ff54eb
|
2020-05-12T13:27:21
|
|
Vulkan: Featurize shadow buffers
Shadow buffers help reduce the latency of glMap* operations
at the cost of CPU overhead. It might not be desirable to
incur such an overhead for all usecases. Featurize it but
enable it by default.
Bug: angleproject:4339
Change-Id: I6374618bf99677eef55fd50a139fb86f5ea70791
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2278102
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
b50541b2
|
2020-01-14T09:07:03
|
|
Vulkan:Adding key perf trace markers
Adding trace markers in performance-critical functions.
Primary areas of interest are command buffer processing
and cleanup and memory mapping.
Bug: b/156403378
Change-Id: Icba53024771711d79f7eee7085bf4dae0e033e63
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2002689
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
cf8422c2
|
2020-05-19T10:14:02
|
|
Vulkan: Acquire a new BufferHelper from the pool based on a threshold
We acquire a new BufferHelper from the pool when the app updates the
data of the entire buffer. In scenarios where the app updates say, 60%
of the buffer it would still be benificial to acquire a new buffer and
copy over the remaining 40% of data from the old buffer to the new one.
This reduces the transfer workload from 60% to 40% of buffer size.
Currently the threshold is set to 50% of buffer size.
Bug: angleproject:4380
Change-Id: I12576c585230e771d4c1a4352fab93dd3db2ecef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2204655
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
41f7bcce
|
2020-04-30T16:09:36
|
|
Vulkan: Add missing cache flush
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>
|
|
df31624e
|
2020-04-30T13:28:24
|
|
Vulkan: Reduce the onBufferRead/onBufferWrite API verbosity a bit
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>
|
|
f07d0072
|
2020-04-27T16:51:05
|
|
Vulkan: use fine grain stage for buffer barriers
We are using VK_PIPELINE_STAGE_ALL_COMMANDS_BIT for
mGlobalMemoryBarrierStages, which is used for both src and dst. This
will cause a full pipeline stall whenever a buffer object introduces a
barrier. This CL will let the caller pass in the specific stage it
will be used for, allowing us to track write and read stage dependencies
separately and request the corresponding barriers.
Bug: b/155122200
Change-Id: I8b8bd291a03b77d07cfbcbe7c3cda2d3771588b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2169014
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
fa03eb9d
|
2020-02-05T15:25:52
|
|
Vulkan: Use DynamicBuffer for BufferVk
When there is glBufferData API call, if the current
VkBuffer is in use, we copy to a staging buffer to
be gpu copied later. Instead of doing this second copy,
write directly to a new buffer that will be used for
subsequent gpu operations.
BufferVk now has a DynamicBuffer to handle
the logic of acquiring a new/free buffer to be used.
Bug: angleproject:4380
Change-Id: I207f334013ae944090eb48c26c692a09e8815f74
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2040513
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
6e0d718a
|
2020-03-31T18:41:57
|
|
Vulkan: Implement device memory sub-allocation
Use AMD Vulkan Memory Allocator for device memory sub-allocation.
We now have a mempool from which all glBuffer memory is allocated.
The CPU overhead involved in repeated IOCTL calls to the kernel is
reduced significantly.
Bug: angleproject:2162
Change-Id: Id7681ffe2ac3d2853141ebe34c7df7b7fdd0d55e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2124519
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
745e0712
|
2020-03-21T17:46:05
|
|
Vulkan: Enable CPU only buffers for PBOs
Add support for a CPU only buffer for PBOs that serve as
the destination for all host operations like MapBuffer*.
This removes the latency caused by waiting for the in-flight
GPU commands to be complete before handing over the buffer
to the app.
This change removes a ~6ms wait/sleep on the first call to
MapBuffer* in each frame of Manhattan
Bug: angleproject:4339
Tests: angle_end2end_tests --gtest_filter=BufferDataTest*Vulkan
Change-Id: I52016b160af8a670cc30f01c05e48f699521310f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2116874
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
d30da072
|
2020-03-31T15:01:14
|
|
Vulkan: Request host uncached memory for some glBuffer objects
Uncached memory is an optimal memory type for resources with
write-only access from the CPU since it avoids polluting CPU caches
with data the CPU will never use.
Bug: angleproject:2162
Change-Id: I33d0d91830979990bcdcca3bd9eedde0345fb5a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2131880
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
7daf31d8
|
2020-03-18T09:19:52
|
|
Vulkan: Use device local memory for conversion buffers that can be converted with the GPU
When converting a vertex buffer by using GPU, the conversion buffer
doesn't need to be host mappable. Hence the conversion buffer can
be allocated on device local memory for faster GPU access times.
Bug: angleproject:3534
Change-Id: I2efabec20186992479920bddd3abd36f9c13babc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2108706
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
78a85f2c
|
2020-03-16T10:28:59
|
|
Vulkan: Request device local memory for glBuffer with GL_STATIC* usage
glBuffer objects with GL_STATIC_* usage patterns will now request
the storage to be allocated in device local memory. For glBuffer
objects with GL_DYNAMIC_* usage patterns we request a host cached
memory.
Bug: angleproject:4480
Change-Id: I7ca968f5ddfb59e4df3ecd07ae65df2bbf734190
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2102958
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
916d204c
|
2020-02-25T14:18:38
|
|
Vulkan: Use new APIs in BufferHelper::copyFromBuffer.
We shouldn't need to special case the barrier logic in this function
any more. Instead use the 'onBufferRead' and 'onBufferWrite' APIs.
Bug: angleproject:4029
Change-Id: I7f67b67aa312d9ae64172b40d73086b7772d49d2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2071143
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
aa09ca69
|
2020-02-24T13:33:30
|
|
Vulkan: Update ContextVk command buffer access methods.
Use the following names:
- flushAndBeginRenderPass
- endRenderPassAndGetCommandBuffer
- flushAndGetPrimaryCommandBuffer
This clarifies that a flush is part of the method.
Bug: angleproject:4029
Change-Id: I6c870761339ea7aa39c83142200781ba39ad6a4b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2068129
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a741abb9
|
2020-02-21T16:37:37
|
|
Vulkan: Rename CommandGraphResource to Resource.
Also renames the h and cpp files to ResourceVk (to keep distinct from
other resource.h/cpp files) and renames 'onResourceAccess' to 'retain'.
Cleans up a few remaining mentions of the command graph in comments.
Bug: angleproject:4029
Change-Id: Ifc8e880c8cea3fc48a4aec4730191c88aa35a076
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2065920
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
c58458e6
|
2020-02-19T14:51:41
|
|
Vulkan: Remove CommandGraph code.
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>
|
|
20b1259a
|
2020-02-05T17:08:05
|
|
Vulkan: Command graph linearization (Step 2).
ES 2.0 is feature complete.
Passes all of the angle_end2end_tests with the new linear command
recording method. Also runs the T-Rex benchmark without any obvious
glitches. Likely has issues with creating too many RenderPasses. ES3
is mostly untouched.
Bug: angleproject:4029
Change-Id: Ic5acf3d768495fbffd07b07bf0a6f2b5787c51f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2012900
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
3712b2e4
|
2020-01-24T17:08:30
|
|
Vulkan: Command graph linearization (Step 1).
This initial prototype introduces a new feature to the Vulkan back-end
that disables the deferred command recording. The intent is to have a
lower CPU overhead during submission calls which currently walk a DAG.
The feature is not complete. Currently it only passes the ANGLE
SimpleOperationTests. Moreover it is extremely simple and only allows
use of one command buffer at a time. In the future we'll allow open
command buffers for recording outside and inside render pass commands
at the same time. We'll also support collapsing RenderPasses together
for some use cases.
Currently the prototype only passes "SimpleOperationTest". There are
quite a few unimplemented features like queries, XFB, etc.
Bug: angleproject:4029
Change-Id: I82760986683f55e37ac4ea559de6f4cffb6ef84e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1953485
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
7d45184d
|
2020-01-22T08:34:48
|
|
Vulkan: Fix naming in CommandGraphResource.
Accidentally submitted a patch set without requested changes. This
corrects the function names to 'hasRecordedCommands' and
'hasRunningCommands'.
Bug: angleproject:4029
Change-Id: I1cf3046052ace304594ef939566b0b36bae822df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2013924
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
579c5940
|
2020-01-17T13:20:21
|
|
Vulkan: Rename onGraphAccess to onResourceAccess.
Clarifies the function for the upcoming command graph linearization.
Bug: angleproject:4029
Change-Id: Ib50997c007053757de533f69c155a92d7555e0b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2003235
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
09a2d065
|
2020-01-17T13:20:20
|
|
Vulkan: Clean up naming of ResourceUse checks.
Instead of referring to command graphs we can refer to if the resource
is in use by "ANGLE" or the "Driver". This will make the methods more
consistent when we switch away from the command graph.
Bug: angleproject:4029
Change-Id: I3045a4eb2a38234ef331c0662694656065590ae1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2003234
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
441b72f0
|
2020-01-16T14:48:39
|
|
Vulkan: Make ContextVk own ResourceUseList.
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 <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
4ff1651e
|
2020-01-16T12:42:27
|
|
Vulkan: Add ResourceUseList helper.
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 <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
01c0d6bd
|
2020-01-12T13:41:31
|
|
Vulkan: Use dynamic buffers for staged updates
Dynamic buffers are used to perform staged updates to
BufferVk objects instead of recreating staging buffers
for each update.
Bug: angleproject:4292
Change-Id: I0f64c821c97e0e6014e9df1d4f99e2f495838025
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001461
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
5e33e647
|
2020-01-09T14:20:09
|
|
Vulkan: Optimize getIndexRange
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 <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
caa6eccd
|
2019-10-27T13:46:56
|
|
Vulkan: Implement Transform Feedback support via extension
Implemented transform feedback extension path. Where
VK_EXT_transform_feedback is supported, extension path will be taken
over an emulation path. Extension path has advantages in terms of
performance.
BUG=angleproject:3206
Test: dEQP-GLES3.functional.transform_feedback.*
angle_end2end_tests --gtest_filter=TransformFeedbackTest*
Change-Id: Ia07c23afb289d9c67073469a97b714ec96f5265a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1882767
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
27c89d2b
|
2019-11-25T10:22:01
|
|
Vulkan: fix BufferVk::map() synchronization
4398b2b6a2ac13034dff249d8c049c4047b5fed2 made finishToSerial() in
BufferVk::map() conditional to whether the serial is in use to work
around a performance regression. Notes:
- Prior to 087f1384f233792921d34c0ca5b5a90fac75b070, finishToSerial
already did that, but that check was inadvertently removed.
- finishToSerial waits for the smallest serial that's bigger than or
equal to the requested serial.
- The flush() call in BufferVk::map() was conditional to whether the
serial is in use, but it really meant to check whether the buffer has
pending commands in the graph.
The end result is that there was an unnecessary flush in BufferVk::map()
if we had to wait for a previous serial to finish.
This change makes the flush conditional to whether the buffer has
pending commands in the graph, and the finishToSerial call to whether
the serial is not yet finished.
Bug: angleproject:3994
Change-Id: Idca436ef2439bcc8c59396a07b2591c1dfadd669
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1932341
Reviewed-by: Brandon Schade <b.schade@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
61c6aecc
|
2019-11-28T14:30:18
|
|
Vulkan: Fold read access into write flags on buffer writes
This could lead to a subtle bug:
Say we use a buffer as a storage buffer and write to it. We then must
issue a memory barrier before using it as a uniform buffer. However we
would set the SHADER_READ bit as a read mask on a storage buffer
access. This seems like it could lead to a missing barrier.
Bug: angleproject:4178
Change-Id: I486002739b7fb000ffacc0a1e996784b7875e7ba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1943034
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
|
|
2ed547a6
|
2019-10-15T17:34:09
|
|
Vulkan: Mark destination buffers dirty after a copy
When a user performs a copy between GL buffers, we need to mark the
destination buffer dirty in case that buffer data is used as vertex
data and requires another conversion to be done.
Bug: angleproject:3544
Test: dEQP-GLES3.functional.buffer.copy.*
Change-Id: Ie3196db4feb0f01d0b25c8799312c5f57c1095a2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1863007
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
4398b2b6
|
2019-10-10T16:39:33
|
|
Vulkan: finishToSerial only if the buffer is in use
The call to flushImpl() was conditioned on the buffer
being used but the call to finishToSerial() was outside.
This caused an unconditional wait and unnecessary pipeline
stall. The fix is to make sure to perform a flush and
wait only when the buffer is in use.
Bug: angleproject:3994
Change-Id: I1b297cf11a67f7611d37808cb111d6b52ac16f90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1854881
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f10bf6bf
|
2019-09-26T10:27:18
|
|
Vulkan: Implement multi-threaded GL.
The main component of this change is to make vk::BufferHelper,
vk::ImageHelper and vk::SyncHelper use a common path. We introduce a
new "vk::SharedGarbage" helper class that stores small lists of garbage
from individual objects like an ImageHelper or BufferHelper. The
SharedGarbage is stored in the RendererVk with the ResourceUse of the
helper object. The ResourceUse tells RendererVk when it is safe to
destroy the GarbageObjects.
New "onGraphAccess" commands are added in a few places to enable the
common garbage collection path. A couple Context-only resources like
default attributes now are referenced where they were not before.
Also reorganizes some functions so we can add a few helpful ASSERTs
to our graph dependencies. Added "updateCurrentAccessNodes" for this.
Also adds a "RendererScoped" helper to replace many uses of
"ContextScoped".
The multithreading EGL tests mostly pass but have some remaining
flakiness so cannot yet be enabled.
Bug: angleproject:2464
Change-Id: Ia3e3ae8848d731abf3f21ebe04c33e381e130be0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1808444
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
33ffed01
|
2019-09-26T10:19:35
|
|
Vulkan: Clean up garbage APIs.
Instead of dumping resources to a context, we use the release APIs
consistently. Refactoring/cleanup change only. Should have very litte
impact on runtime behaviour.
Bug: angleproject:2464
Change-Id: I2dc7f8316c466f7ccfad50a7b792ba0ee7bc2e49
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1804883
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b540da89
|
2019-09-19T14:19:12
|
|
Vulkan: Use ResourceUse to track object lifetime.
With the new resource tracking scheme the CommandGraph, tracking a
"Context serial" aka "current" serial is no longer necessary for
CommandGraphResources. Serial tracking has been moved to the shared
ResourceUse struct that gets updated on a command submission. Thus
we don't need to store the serial as a current separate piece of info
in BufferHelper/ImageHelper.
Will lead to further redesign for the multi-threading support for
Vulkan.
Bug: angleproject:2464
Change-Id: I1ae4bcc27fcfb93422b4ab4c9682a458e482f295
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1785990
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
dd4a00a0
|
2019-09-19T14:19:11
|
|
Vulkan: Track resource usage via counter.
This adds a small shared piece of memory that counts the number of
times a resource is used in a command graph. This will enable more
multi-threaded uses. The shared pointer is updated in the command
graph during a submit and during graph construction.
Bug: angleproject:2464
Change-Id: Id9d0319a6814825d02e865ba527c97b5f535ff31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1785989
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
1d83e1e8
|
2019-08-21T09:00:33
|
|
Vulkan: Handle new validation errors
With updated validation layers Vulkan backend is hitting two new
errors. This CL fixes one and works around (WA) another.
Fixes issue where a Buffer used in vkCmdDispatchIndirect() did
not have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT set so now setting
that usage bit for all buffers.
WA issue where invalid topologies enabled primitiveRestart so
ignoring that VUID initially until complete fix is implemented.
Bug: angleproject:3832
Change-Id: Ie3f681eaf9e2051c27bdf00a35dc50d8ad4a2528
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1763196
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
3e493c48
|
2019-07-29T16:27:01
|
|
Vulkan: Optimize memory allocation offset rounding
Use bit operation to compute memory alignment round up.
Tested with T-Rex, hotspot in roundUp resolved.
Bug: angleproject:3744
Change-Id: I55db941f588401a1d2d3d93f4d6b810e6b1aa95f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1725118
Commit-Queue: Jiacheng Lu <lujc@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
020abb8b
|
2019-07-24T11:33:49
|
|
Vulkan: invalidate translation buffers for SSBOs
Translation buffers weren't being marked dirty after running a compute
shader in which they are bound as SSBOs.
This change invalidates all SSBOs after a draw or compute call.
Bug: angleproject:3739
Change-Id: I66b56df7e619b55afc7e3da6b5613b6d050e06bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1717144
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: James Dong <dongja@google.com>
|
|
f92fc916
|
2019-07-15T22:39:23
|
|
Vulkan: Compute shader support
A DispatchHelper class is created as the equivalent of FramebufferHelper
as a command graph resource. There's currently a single dispatcher and
all dispatch calls are recorded on that. Context dirty bits are set up
in such a way that graphics and compute workloads are independently
handled, so that issuing a dispatch call wouldn't cause a framebuffer's
render pass to rebind resources.
Bug: angleproject:3562
Change-Id: Ib96db48297074d99b04324e44b067cfbfd43e333
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688504
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
55efe37c
|
2019-07-03T11:52:21
|
|
Vulkan: Cleanup buffer dependencies
onWrite now sets the dependency to make sure the order of setting
dependency and adding memory barrier is correct. onReadByBuffer is
added to handle buffer-to-buffer dependency and barrier setting
correctly without causing a graph loop. onExternalWrite is added so
that BufferVk doesn't have to track write access flags.
Additionally, setting write dependencies now include both read and write
flags. This is in preparation for SSBO support where the buffer can be
used to read data in addition to write.
Bug: angleproject:3561
Change-Id: I2028186ea14459cd159cf79f6d640df54538fc62
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1687119
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7f2520f1
|
2019-06-26T11:18:33
|
|
Vulkan: Refactor DynamicBuffer::init.
This will allow us to more easily create a white box test that sets a
very small initial size for a dynamic buffer.
Bug: angleproject:3082
Change-Id: Ic02bbee83ee8e0f4bfe182e9448c2ce60dea66d5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1667645
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
615ae1a7
|
2019-06-21T12:10:14
|
|
Vulkan: Improve copy buffer self-dependency
The check in addReadDependency to avoid setting self-dependencies was
causing the barrier set in `copySubData` to be potentially set earlier
than the buffer's previous usage. This change allows buffer
self-dependencies to be handled especially.
Bug: angleproject:3194
Change-Id: I08f2c39f420f020ad5faa9735193e6b7142fa756
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1670952
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
9420fa06
|
2019-06-07T17:09:22
|
|
Vulkan: Implement copyBufferSubData
Implement BufferVk::copySubData().
Bug: angleproject:3194
Test: dEQP-GLES3.functional.buffer.copy.*
Test: dEQP-GLES3.functional.negative_api.buffer.copy_buffer_sub_data
Test: angle_end2end_tests BufferDataTestES3
Change-Id: I220cd490eb1eb799604e217b3e377af3fd431d97
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1648669
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3ea463bf
|
2019-06-19T14:21:33
|
|
Move event tracer back into common.
Requires that we update the TRACE_EVENT macros to accept a platform as
an argument. The refactor isn't complete. In order to finish we'd need
to ensure we have the Display's PlatformMethods available at all sites.
Unblocks adding trace events directly in the perf tests.
Bug: angleproject:1892
Bug: angleproject:3117
Change-Id: Iee0ca086ccfe23acab3fc186fb042f018711a94c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1664794
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b1c8dbf3
|
2019-06-14T23:57:26
|
|
Vulkan: Correct synchronization for buffer readback
When mapping buffer memory, a flush is performed if the buffer has
pending operations followed by a finishToSerial to make sure the buffer
is no longer in use by the GPU.
This also implements GLES 3.0 buffer mapping flags:
GL_MAP_INVALIDATE_RANGE_BIT: No-op. Vulkan's vkMapMemory doesn't have
such a feature.
GL_MAP_INVALIDATE_BUFFER_BIT: Same
GL_MAP_FLUSH_EXPLICIT_BIT: Vulkan automatically flushes host memory
writes on vkQueueSubmit, so this is no-op as well.
GL_MAP_UNSYNCHRONIZED_BIT: The flush+finishToSerial call is skipped in
this case.
Bug: angleproject:3213
Change-Id: I6bdb460dffbb57170649f4c9678afbfae331926c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1661252
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
44063c80
|
2019-06-04T15:20:30
|
|
Vulkan: Store array buffer conversions in BufferVk.
The intent of this CL is to call convertVertexBuffer*PU only when we
have new data to convert. If the app unbinds and rebinds a vertex
buffer without changing the data we can now retrieve the cached
vertex buffer info from the BufferVk class. Previously we would always
reconvert the data on a rebind. This was slowing down applications and
benchmarks.
To achieve this we add a conversion cache to BufferVk. Each cache entry
stores a key based on the vertex info. Also we store a ring buffer for
each cache entry and a flag to indicate if the entry is dirty. The
cache is dirtied on a bufffer data update or a map call.
Improves performance in the T-Rex benchmark.
Bug: angleproject:3495
Change-Id: Ia999c9187510748ba95bc98362eb332e1990d270
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1638903
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
d3e7a41b
|
2019-05-29T14:40:52
|
|
Vulkan: fix buffer copy barriers
Bug: angleproject:3362
Change-Id: Ibf6520fb73bb1a9b76714cddd786569789c70430
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635752
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ee244c77
|
2019-05-06T10:30:18
|
|
Vulkan: Move command graph and garbage to ContextVk.
To support multithreading, contexts should manage their own command graphs
and garbage. This allows safe access to vulkan resources such as command pools
without thread synchronization.
BUG=angleproject:2464
Change-Id: I930149bc9f0793028761ee05ab50b8c0a4dec98a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1516515
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@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>
|
|
892d1805
|
2019-03-27T14:21:34
|
|
Vulkan: Have the WindowSurfaceVk own the submit semaphores.
Chaining of submit semaphores is only needed for window surfaces because they
are required for the first usage of the swap chain image and final present
of the image.
Move ownership of the submit semaphores from RendererVk to WindowSurfaceVk and
update all calls to finish and flush to be piped through a ContextVk which
tracks the currently bound window surface.
BUG=angleproject:2464
Change-Id: I4b3083124d7910a5dee297afc219e3a3f28057f2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1542257
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2660b503
|
2019-03-21T12:08:40
|
|
Vulkan: Restore CommandBuffer to namespace vk
Moved vk::CommandBuffer and vk::SecondaryCommandBuffer to vk::priv:: and
aliased vk::CommandBuffer to one or the other. This allows the rest of
the classes to continue seeing vk::CommandBuffer as they used to do.
Used a special alias for the primary command buffer that gets submitted
(vk::PrimaryCommandBuffer).
Bug: angleproject:3136
Change-Id: I61236fd182230991db7395d05e3da3be5e3f45be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1534456
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
134425c7
|
2019-03-15T17:02:17
|
|
Vulkan:Integrate SecondaryCommandBuffers
Integrate the custom SecondaryCommandBuffer type into the CommandGraph
nodes by adding new ANGLE_USE_CUSTOM_VULKAN_CMD_BUFFERS define that can
be set in the BUILD gn args with angle_enable_custom_vulkan_cmd_buffers
set to "true."
Initially the custom cmd buffers are disabled by default.
This adds some support functions to SecondaryCommandBuffer to make the
integration easier by matching the wrapped cmd buffer interface:
initialize(), end(), valid().
Bug: angleproject:3136
Change-Id: Ib910554583192550757bb8ce89914e3ea8737988
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1526556
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e3981cf7
|
2019-02-27T11:05:15
|
|
Vulkan:Add SecondaryCommandBuffer class
SecondaryCommandBuffer is a CPU-side command buffer construct intended
to delay allocation/construction of GPU-side command buffers until
absolutely necessary.
Initially ANGLE was batching commands into Vulkan secondary command
buffers and then submitting those command buffers when rendering was
required. On at least some devices we saw two areas of overhead that
SecondaryCommandBuffers are intended to reduce:
1. Commands in secondary cmd buffers taking longer than equivalent
commands in a single primary cmd buffer.
2. Allocation/free/reset overhead of the secondary command buffers was
a hotspot for some workloads.
Bug: angleproject:3136
Change-Id: Ife8ffe2968eee423d89ff433d62596c432156661
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1492016
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@google.com>
|
|
4a41914b
|
2019-02-05T08:50:30
|
|
Vulkan: Add trace markers
Add systrace markers for various RendererVk::finish paths in order to
quickly identify cause of finishes. Also added marker to commandPool
destroy which is currently a known hotspot on some devices.
Bug: angleproject:2528
Change-Id: I5a2fc741679a58445d71a2edd6204cf9e869d236
Reviewed-on: https://chromium-review.googlesource.com/c/1454277
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1f750d1e
|
2019-01-16T13:27:16
|
|
Even more inlining and micro-optimization.
Improves perf by about 3-4% on the Vulkan VBO state change test.
Bug: angleproject:3014
Change-Id: If4415e503cd883cf7de6387bf1ebbca0e5fc994e
Reviewed-on: https://chromium-review.googlesource.com/c/1393907
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
611bbaab
|
2018-12-06T01:59:53
|
|
Vulkan: Convert vertex attributes in compute
In this commit, VertexArrayVk::convertVertexBuffer() is renamed to
VertexArrayVk::convertVertexBufferCpu() to explicitly show it does a CPU
readback. A new VertexArrayVk::convertVertexBuffer() function is added
that has the same functionality in gpu (with some assumptions, where the
CPU fallback is used should those assumptions fail). Currently, the
only requirement is that buffer offset/stride are divided by the
component size.
ConvertVertex.comp is the shader responsible for this conversion, and it
implements the functionality in renderer/copyvertex.inc, minus a few
functions that are not used in the Vulkan backend.
Bug: angleproject:2958, angleproject:3009
Change-Id: I8ec9a5f4672509bcf7b9e352cd27663970ad4653
Reviewed-on: https://chromium-review.googlesource.com/c/1364451
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
7c985f5c
|
2018-11-29T18:16:17
|
|
Make angle::Result an enum.
This moves away from a class type to a value type. This should improve
performance when using angle::Result as a return value. Previously the
generated code would return a pointer instead of a value.
Improves performance in the most targeted microbenchmark by 10%. In
more realistic scanarios it will have a smaller improvement. Also
simplifies the class implementation and usage.
Includes some unrelated code generation changes.
Bug: angleproject:2491
Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa
Reviewed-on: https://chromium-review.googlesource.com/c/1356139
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
8f1b7a66
|
2018-11-14T16:02:54
|
|
Vulkan: Add DispatchUtilsVK
This class provides a set of compute-based internal utilities.
Currently, buffer clear and copy are implemented. Other possibilities
include more efficient mip map generation, or specialized texture
operations.
VertexArrayVk::updateIndexTranslation() is updated to convert the
GL_UNSIGNED_BYTE index buffer to a GL_UNSIGNED_SHORT one using this
class to avoid a CPU readback.
The vk::Format class is augmented with a few flags (IsInt, IsUnsigned)
to be able to select the appropriate shader based on the format (float,
int or uint).
Bug: angleproject:2958,angleproject:3003
Change-Id: Ie35519deb3c32a3da5ccf74080c70092c9287f0a
Reviewed-on: https://chromium-review.googlesource.com/c/1336307
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
4abdf74f
|
2018-11-28T14:41:10
|
|
Vulkan: Add dynamic index buffers to graph
With DynamicBuffer outputting BufferHelper objects, these objects can
participate in the command graph, i.e. record commands. This means they
need appropriate dependencies in the graph as well as pipeline barriers.
There are a few users of DynamicBuffer for which this change should be
applied to. This change covers index buffers.
This commit includes a fix to BufferHelper::copyFromBuffer for WaW
hazards.
It also includes a fix for a missing pipeline barrier after
BufferVk::copyToBuffer.
Bug: angleproject:2958
Change-Id: I3e61af56936580b2da20c28c45defece552d9a39
Reviewed-on: https://chromium-review.googlesource.com/c/1352732
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8dc27f99
|
2018-11-29T11:45:44
|
|
Use packed enum for DrawElementsType.
The packing and unpacking take a few extra instructions. But it
completely obviates the need for any switches in the validation code.
Speed is slightly faster or the similar depending on the back-end.
Also add gl_angle_ext.xml to GL entry point generator inputs. This was
missing and would cause the code generation to miss certain changes.
Bug: angleproject:2985
Change-Id: I1ea41a71db71135000166ead8305ec42d22ff7b3
Reviewed-on: https://chromium-review.googlesource.com/c/1351729
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b980c563
|
2018-11-27T11:34:27
|
|
Reformat all cpp and h files.
This applies git cl format --full to all ANGLE sources.
Bug: angleproject:2986
Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f
Reviewed-on: https://chromium-review.googlesource.com/c/1351367
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
27780295
|
2018-11-09T11:19:49
|
|
Vulkan: refactor WrappedObject descendants
Methods receive VkDevice instead of Context
and return VkResult instead of angle::Result now.
Bug: angleproject:2657
Change-Id: I3eca8692ad0b3b6e96e31fd433ed14e04384990e
Reviewed-on: https://chromium-review.googlesource.com/c/1330105
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
03d1a5ed
|
2018-11-12T11:34:24
|
|
Vulkan: Use global buffer barriers.
This switches from using resource barriers for buffers to using global
barriers. This matches the general advised best practice. It also
allows us to combine multiple barriers into one. On a draw we might
combine all the vertex and index barriers into a single barrier call.
We implement this using a bit of extra state tracking in BufferHelper.
Bug: angleproject:2828
Change-Id: I196b368804ff50e60d085687a643e5566ba1c5b6
Reviewed-on: https://chromium-review.googlesource.com/c/1309977
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0ea96210
|
2018-10-30T15:14:51
|
|
Vulkan: Enable more perf tests.
Also fixes the check for the correct UINT index extension that wasn't
available on Vulkan. Also includes a workaround for the mock ICD not
implementing buffer state for index ranges.
Bug: angleproject:2923
Change-Id: Iab35809d15f890525a9e658d4148272c46cf1320
Reviewed-on: https://chromium-review.googlesource.com/c/1308733
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
ae108bd1
|
2018-10-18T15:00:38
|
|
Use angle::Result in front-end (Part 5)
Refactors gl::Buffer and implementation.
Bug: angleproject:2491
Change-Id: Ic6860dac2faf33067965e7117ea8e98dc6a8dc7a
Reviewed-on: https://chromium-review.googlesource.com/c/1283310
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
06270c9e
|
2018-10-03T17:00:25
|
|
Vulkan: Safer struct initialization
Using x = {}; before filling out each field, we can be sure any missing
field is 0 initialized. This in turn helps us not have to specify
certain fields that are generally unused (at the moment), such
as pNext.
Bug: angleproject:2860
Change-Id: Ia1fa2db3ecfb316673a02ac0c5e13e47e055a19f
Reviewed-on: https://chromium-review.googlesource.com/c/1259764
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c2116cd3
|
2018-10-02T09:31:40
|
|
Vulkan: Update pipeline barrier interface.
This makes the vk::CommandBuffer class closer to an auto-generated
wrapper class.
Bug: angleproject:2828
Change-Id: I91ba03914a60d5612707dd240fcda25b86cf2c46
Reviewed-on: https://chromium-review.googlesource.com/1255505
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2d03ff4a
|
2018-09-27T15:04:26
|
|
Vulkan: Make Buffer/Image be CommandGraphResources.
Don't make TextureVk/RenderbufferVk/SurfaceVk/BufferVk own the
manipulation of the command graph. Instead put the operations close to
the buffers and images used to render.
This will lead towards implementing implicit barriers on the command
graph resources.
Bug: angleproject:2828
Change-Id: I07b742b6792c60285b280d6454f90e963d667e0e
Reviewed-on: https://chromium-review.googlesource.com/1246983
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
50e6eaae
|
2018-09-27T08:24:32
|
|
Vulkan: Move LineLoopHelper graph work into BufferVk.
Bug: angleproject:2828
Change-Id: Ie6bcdd10e2de415615db2bfb0b6fa17c392455b0
Reviewed-on: https://chromium-review.googlesource.com/1235655
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
f5aad063
|
2018-09-19T14:39:00
|
|
Avoid flush/invalidate of host-coherent memory
For DynamicBuffer avoid calling vkFlushMappedMemoryRanges() or
vkInvalidateMappedMemoryRanges() if the underlying memory is host-
coherent. These calls are not required for host-coherent memory and
may negatively impact performance.
When currently allocating HOST_VISIBLE memory it's possible to also get
HOST_COHERENT memory even though it's not explicitly requested. Because
of this, the change updates the memory allocaiton interfaces through
the stack to pass back the actual allocated memory properties so that
it can be checked to see if it's host-coherent.
Bug: angleproject:2804
Change-Id: Ife95c4b98115b16d16c087dd72dba7d9661fdb46
Reviewed-on: https://chromium-review.googlesource.com/1234276
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
e2d2270a
|
2018-09-19T08:11:48
|
|
Vulkan: Merge append/beginWriteResource.
The new API is named 'recordCommands'.
These two APIs were basically doing the same thing. We don't need to
have an understanding of creating a new graph node to know that we
want to record some Vulkan commands to a command buffer. The prior
design was actually masking a bug where we would allow appending
commands to a command graph node that had already started a render
pass. Fix this by adding a render pass check to recordCommands.
Also removes 'hasStartedWriteResource' since this method wasn't used
anywhere.
Also renames 'onResourceChanged' to 'finishCurrentCommands'.
Bug: angleproject:2828
Change-Id: I00bd5b893fcfc37172b6c1706cb2f5fc57e79f54
Reviewed-on: https://chromium-review.googlesource.com/1235654
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
9d84ccba
|
2018-09-12T18:09:02
|
|
Vulkan: renderer->finish() before reading buffers.
Have to call renderer->finish() before reading a buffer otherwise you can
get stale data.
Enable IndexBufferOffsetTest.UInt8Index/ES2_VULKAN which now works.
Disable LineLoopTest.LineLoopUShortIndexBuffer/ES2_VULKAN which stopped
working on Windows with Intel GPU.
BUG=angleproject:2659
Change-Id: I1e21b0e1dacd3368923caf18e767e34ab696eef6
Reviewed-on: https://chromium-review.googlesource.com/1227032
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
62114aae
|
2018-08-28T09:36:46
|
|
glBufferSubData: Exit early if size is zero
glBufferSubData is calling vkMapMemory with a size of zero is invalid.
Check for that and exit early if found.
Bug: angleproject:2790
Change-Id: I965badeb3aa2cec1adc24dd7ff5695f8aa3e553d
Reviewed-on: https://chromium-review.googlesource.com/1194610
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
e452382a
|
2018-07-19T16:10:53
|
|
Vulkan: convert/align vertex data from buffers
When we get a buffer with vertex data in an unsupported format or
alignment, correct that as we copy it to a DynamicBuffer, then use
the copy. Enable tests.
BUG=angleproject:2405
Change-Id: I2132abea4d936f6b53d9209be7f99a0e2d8de219
Reviewed-on: https://chromium-review.googlesource.com/1141277
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|