|
112a3a8e
|
2018-01-23T13:04:06
|
|
Vulkan: De-couple Program from VertexArrayVk dirtyiness.
The VertexArrayVk is responsible for filling out the packed shader
input info in ANGLE's packed PipelineDesc info structure. This
packed info structure is used for Pipeline init and caching lookup.
The prior design had this info depend on the active inputs in the
current Program. This was undesirable because then, on a Program
change, the ContextVk would have to call into the VertexArrayVk
to invalidate this info.
Instead, keep a working copy of the VertexArrayVk bits and only
update the bits corresponding to dirty vertex attributes. This
simplifies the cached state management a little bit for ContextVk.
This also means we don't have to update the cached copy in the
VertexArray on a change in VertexArray binding.
Bug: angleproject:2163
Change-Id: I5ba74535367aed74957d17bdc61f882508562d0e
Reviewed-on: https://chromium-review.googlesource.com/881703
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
3c424b48
|
2018-01-19T12:35:09
|
|
Vulkan: Add vk_cache_utils.h.
This file contains the Pipeline and RenderPass cache utils.
Also renames renderervk_utils.h to vk_utils.h and the format utils
file.
Refactoring change only.
Bug: angleproject:2163
Change-Id: I5113a9a2c6f0b0960d38e6c2d8e391fa2d9f5f6a
Reviewed-on: https://chromium-review.googlesource.com/876505
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
f2f6d379
|
2018-01-10T21:37:23
|
|
Vulkan: Add PipelineDesc.
The PipelineDesc class is a 512-byte packed description of the entire
Vulkan pipeline state. It uses the alignas keyword and some static
asserts to verify that the structures are packed. This ensures that
when ANGLE uses MurmurHash to hash the entire struct, and memcmp to
check for identity, that there are no garbage padding bits.
This CL does not implement the Pipeline cache, but it will help, since
now we have a packed type that can be used as the key to a hash map.
Bug: angleproject:2163
Change-Id: I16efa927f08d30d89a9c4c8943edd211c6878ac8
Reviewed-on: https://chromium-review.googlesource.com/829893
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
49ac74bd
|
2017-12-21T14:42:33
|
|
Vulkan: Implement command re-ordering.
This introduces a new CommandBufferNode class. Nodes are linked
together to form a graph based on their dependencies. When the app
triggers a readback or swap, the graph is flushed entirely. This
sends the queued ANGLE Vulkan work to the Vulkan queue which is
then processed on the GPU with the right dependencies.
This design allows us to save on some unnecessary RenderPass creation
and also allows us to know what load/store ops to use. It also allows
us to take advantage of the Vulkan automatic RenderPass transitions
for performance. Load/Store ops and automatic transitions will be
implemented in later patches.
Bug: angleproject:2264
Change-Id: I0e729c719e38254202c6fedcede4e63125eb4810
Reviewed-on: https://chromium-review.googlesource.com/780849
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
da854a27
|
2017-11-30T17:24:21
|
|
Vulkan: Clean up VAO cached resources.
We can actually store a pointer to the base ResourceVk instead of
BufferVk for updating serials. This will work a little nicer with
streaming vertex data, which won't have a BufferVk but will have an
accessible ResourceVk pointer.
Also add an element array resource pointer for serial update. This was
missing and could lead to incorrect behaviour. Also change the types
of the caches from std::vector to gl::AttribArray, which is a
std::array.
Bug: angleproject:2264
Change-Id: Ibd79b7676b5dbc3875ae9d110be477d228e01c5c
Reviewed-on: https://chromium-review.googlesource.com/798170
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
acf2f3ad
|
2017-11-21T19:22:44
|
|
Apply Chromium style fixes.
This addresses several minor code quality issues that are validated
in Chromium, but not yet applied to ANGLE:
* constructors and destructors must be defined out-of-line
* auto is not allowed for simple pointer types
* use override everywhere instead of virtual
* virtual functions must also be defined out-of-line
Slightly reduces binary size for me (~2k on Win, 150k on Linux).
Bug: angleproject:1569
Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6
Reviewed-on: https://chromium-review.googlesource.com/779959
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e1f3ad4d
|
2017-10-28T23:00:42
|
|
Vulkan: Add vk::GetImpl helper.
Using reflection helpers, we can avoid having to pass the return
type to the GetImpl method.
BUG=angleproject:2200
Change-Id: Id160fbdf0ea8b3de2f219d3cc92394c678189a48
Reviewed-on: https://chromium-review.googlesource.com/742371
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
ebf7299e
|
2017-10-13T14:09:45
|
|
Vulkan: Minimal dirty bits for ContextVk.
Currently this won't speed up performance much, if at all, since we
don't even really support state changes. It sets the stage for using
a pipeline cache later, with better state change support. It also
makes implementing descriptor sets for Textures a bit simpler, since
we can just update descriptor sets when the dirty bits tell us of a
Texture change.
Add cache structures to VertexArrayVk and ContextVk so we only need
to update the structures before we create a new pipeline. When we
support pipeline caching, we will most likely be updating a compact
representation for fast cache query.
BUG=angleproject:1898
BUG=angleproject:2167
Change-Id: Id545f2c67c06d8b6e8b7eb63ca70464f6b9a51f6
Reviewed-on: https://chromium-review.googlesource.com/713586
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
bd159f06
|
2017-10-09T19:39:06
|
|
Vulkan: Use minimal dirty bits in VertexArrayVk.
This should slightly reduce draw call overhead.
BUG=angleproject:1898
Change-Id: I0e515bf2868f237f1d6948c12942f8cb6637c0c0
Reviewed-on: https://chromium-review.googlesource.com/707690
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
492f58ec
|
2017-10-09T19:41:33
|
|
Rename VertexArrayImpl::mData to mState.
Refactoring change only.
BUG=angleproject:1898
Change-Id: I9f55651f923ff930c395a9bb575b4f86ad5d9cbd
Reviewed-on: https://chromium-review.googlesource.com/707689
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
4928b7ca
|
2017-06-20T12:57:39
|
|
Proliferate gl::Context everywhere.
This gives the D3D back-end access to the GL state almost anywhere.
This uses the onDestroy hook for Textures to push errors up from
destructors, although they still don't quite make it to the Context.
There are places, such as in EGL object (Context/Surface) destruction,
where we end up calling through to GL implementation internals without
having access to a gl::Context. We handle this via a proxy Context
to a Display, basically a null context, that has access to impl-side
state like the Renderer pointer if necessary. It does not have access
to the normal GL state.
Also Pass gl::Context to RefCountObject::release(). Since we're using
destroy() methods now, we should not ever call the destructor directly.
BUG=angleproject:1156
Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259
Reviewed-on: https://chromium-review.googlesource.com/529707
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
c564c070
|
2017-06-01T12:45:42
|
|
Pass gl::Context to impl methods instead of ContextImpl.
In some cases we might have to call back into the GL layer, passing
the Context, and if we just have a ContextImpl pointer this isn't
possible. It also removes the need for SafeGetImpl.
BUG=angleproject:2044
Change-Id: I6363e84b25648c992c25779d4c43f795aa2866d6
Reviewed-on: https://chromium-review.googlesource.com/516835
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
72106562
|
2017-03-24T14:18:50
|
|
Vulkan: Only re-create pipeline on state change.
This speeds up the simple perf test, but it is a very simple
optimization that does not have a cache of pipelines or anything
sophisticated.
BUG=angleproject:1898
Change-Id: Iec126bc73bf28f8bb33662a2f70670588f010d72
Reviewed-on: https://chromium-review.googlesource.com/444850
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
dd43e6cd
|
2017-03-24T14:18:49
|
|
Pass Context to VertexArray and Framebuffer syncstate.
This will enable more Vulkan-friendly idioms like clearing the
vulkan pipeline caches correctly on GL state changes immediately
because we have access to the ContextVk.
BUG=angleproject:1898
Change-Id: I16c848d8abdde8e26a38d384e565cec8548a66d0
Reviewed-on: https://chromium-review.googlesource.com/459079
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
9e54b5af
|
2016-05-25T12:57:39
|
|
Add Vulkan stubs.
Currently enabled for Windows by default.
BUG=angleproject:1319
Change-Id: I87921c579bee466465fb1e3f629bb3a40fdff659
Reviewed-on: https://chromium-review.googlesource.com/328730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|