53 Commits

Author SHA1 Message Date
Corentin Wallez
cc0a54dbdb Implement MapWrite except in the wire.
Also this MapWrite doesn't zero out memory yet.
2018-04-06 16:03:57 -04:00
Corentin Wallez
8565e0056a Rename "buffer map read status" to "buffer map async status"
This is in preparation of MapWriteAsync that will use the same status
enum.
2018-04-06 16:03:57 -04:00
Corentin Wallez
abcf982e09 Enable IndexFormatTests on Vulkan
This adds translation of the index format in the Vulkan backend. A test
is also added for an issue currently present in the Vulkan backend.
2018-03-02 15:26:19 -05:00
Corentin Wallez
a3c89cc27a Add and Implement CommandBuffer::SetScissorRect 2018-03-02 14:22:50 -05:00
Corentin Wallez
53604a11a5 Vulkan: Implement SetStencilReference 2018-02-06 09:15:01 -05:00
Corentin Wallez
08b3cbf5bf Vulkan: Implement DepthStencilState 2018-02-06 09:15:01 -05:00
Corentin Wallez
6e01758dcd TextureVk: Don't release swapchain-owned images 2018-02-06 09:15:01 -05:00
Corentin Wallez
27570bd5b4 Vulkan: Implement RenderPass LoadOp 2018-02-06 09:15:01 -05:00
Corentin Wallez
8b7564fb54 Vulkan: Remove stencil masks from dynamic state
In NXT the stencil read and write masks are part of the pipeline state
so they should be set by the pipeline and not dynamically.
2018-02-06 09:15:01 -05:00
Corentin Wallez
54c11a8a55 Vulkan: Implement SetBindGroup 2018-02-05 13:27:47 -05:00
Corentin Wallez
14e0687f94 Vulkan: Implement BindGroups
For now only StorageBuffer and UniformBuffer bindings are supported as
we don't have samplers yet.
2018-02-05 13:27:47 -05:00
Corentin Wallez
e7362d0b1b Vulkan: Implement BindGroupLayout 2018-02-05 13:27:47 -05:00
Corentin Wallez
8df4142870 Vulkan: Implement SetBlendColor 2018-02-05 13:27:47 -05:00
Corentin Wallez
5842c71e17 Vulkan: Implement BlendState 2018-02-05 13:27:47 -05:00
Corentin Wallez
b0ae792954 Vulkan: Don't implicitly transition texture already in output attachment 2018-02-05 13:27:47 -05:00
Corentin Wallez
9e59b4ddf1 Fixup some include guards to match the filename 2018-02-05 13:27:47 -05:00
Corentin Wallez
92baafc7a0 Vulkan: Initial implementation of a swapchain.
This is currently hardcoded to work on one specific HW/OS/driver
version. It also assumes that the graphics queue is the same as the
present queue.
2018-01-29 19:50:28 -05:00
Corentin Wallez
672d7f26e1 TextureVk: Fix not transitioning between queues 2018-01-29 19:50:28 -05:00
Corentin Wallez
75f5b8039b Vulkan: Fix texture synchronization for present 2018-01-29 19:50:28 -05:00
Corentin Wallez
dd5ff104ec Vulkan: support fenced deletion of swapchain objects 2018-01-29 19:50:28 -05:00
Corentin Wallez
37bead6fa5 Vulkan: transition attachments implicitly 2018-01-29 19:50:28 -05:00
Corentin Wallez
407233390b Vulkan: support vktrace and renderdoc 2018-01-29 14:35:58 -05:00
Corentin Wallez
04d8567d31 VulkanInfo: Implement gathering of VkSurfaceKHR related info 2018-01-29 14:35:58 -05:00
Corentin Wallez
49588b0b8d Vulkan: Split off and implement SwapChain 2018-01-18 16:17:28 -05:00
Corentin Wallez
c0f5ca1f5a Move vulkan_platform.h to common/
This file changes the non-dispatchable Vulkan handle types. We want to
use some of these handles in utils/VulkanSwapChain.cpp so it needs to
have access to it. The file could include
backend/vulkan/vulkan_platform.h but it seems a bit cleaner to move the
header in common/ instead with a warning if the Vulkan backend isn't
enabled.
2018-01-18 16:17:28 -05:00
Corentin Wallez
a00a5d3d8b TextureVk: Transition to the first usage if needed
In Vulkan images are created in no particular layout and must be
transitioned before they can be used. This didn't appear before because
the test were creating the textures with not initial usage and then
transitioned them. This isn't the case with InputStateTest, which is
what uncovered this issue.
2018-01-15 19:13:01 -05:00
Corentin Wallez
2b391dac74 Vulkan: Implement RenderPipeline 2018-01-15 19:13:01 -05:00
Corentin Wallez
eb135f6fc0 Vulkan: Implement render pass commands 2018-01-15 19:13:01 -05:00
Corentin Wallez
35fcfc737b Vulkan: Implement TextureView and Framebuffer 2018-01-15 19:13:01 -05:00
Corentin Wallez
49450b5644 Vulkan: Implement Draw* commands 2018-01-15 19:13:01 -05:00
Corentin Wallez
88d85fbaac Vulkan: Implement Set[Index|Vertex]Buffers 2018-01-15 19:13:01 -05:00
Corentin Wallez
2bd6143061 Vulkan: Implement InputState 2018-01-15 19:13:01 -05:00
Corentin Wallez
3a11684e05 Vulkan: Implement 1-subpass renderpasses
Also adds some missing asserts for empty serial queues in the fenced
deleter service.
2018-01-15 19:13:01 -05:00
Corentin Wallez
aeaffcf8fc Vulkan: Create dummy pipeline layouts 2018-01-15 19:13:01 -05:00
Corentin Wallez
6b986732d5 Vulkan: implement T<->B copies 2018-01-08 04:07:41 -08:00
Corentin Wallez
f1d56f3094 Vulkan: Implement texture transitions 2018-01-08 04:07:41 -08:00
Corentin Wallez
aa43d162ec Vulkan: Implement texture creation.
This commit only implements the creation and destruction of VkImage as
well as the allocation and freeing of its memory.
2018-01-08 04:07:41 -08:00
Corentin Wallez
160abad592 Vulkan: Implement buffer transitions 2017-12-12 12:31:20 -05:00
Corentin Wallez
77a1d908b6 Vulkan: Handle CopyBufferToBuffer commands
This as this is the first command handled by the Vulkan backend, this
commit also introduces the b:✌️:CommandBUffer class and implements
b:✌️:Queue::Submit.

Also enables the BufferSetSubData tests that are now passing on Vulkan
even though the buffer transitions are unimplemented.
2017-12-12 12:31:20 -05:00
Corentin Wallez
a9b98af710 Vulkan: Centralized deferred deletion, use it for BufferVk's handle
This introduce a new FencedDeleter service as part of the Device
objects that tracks when resources are no longer used and deletes them.
BufferVk takes advantage of this to defer the deletion of its handle
that was previously incorrectly delete directly in ~BufferVk.
2017-12-12 12:31:20 -05:00
Corentin Wallez
c34aa3abe7 Vulkan: Make non-dispatchable handles always opaque
On 32 bit Vulkan typedefs these handles to uint64_t which breaks
function overload resolution. Replace the
VK_DEFINE_NON_DISPATCHABLE_HANDLE and VK_NULL_HANDLE defines to be
opaque C++ types with the same capabilities.
2017-12-12 12:31:20 -05:00
Corentin Wallez
b36b501f5e Build the Vulkan backend on CI 2017-12-04 21:39:16 -05:00
Corentin Wallez
23b27a27e2 Format: src/backend/vulkan 2017-11-28 16:18:39 -05:00
Corentin Wallez
8d75e5b4ae Member rename: src/backend/vulkan 2017-11-23 17:04:10 -05:00
Corentin Wallez
b325f4d0af Fix compilation of Vulkan backend on Windows 2017-11-23 17:04:10 -05:00
Corentin Wallez
eee5171c39 Vulkan: Add uploader for BufferSetSubData 2017-11-23 09:26:26 -05:00
Corentin Wallez
a8ec80ba57 Vulkan: Add some simple command pool / buffer management 2017-11-23 09:26:26 -05:00
Corentin Wallez
9018236b38 Vulkan: Keep track of finished operations with fences 2017-11-23 09:26:26 -05:00
Corentin Wallez
315e9268bb Vulkan: Start buffers, hack SetSubData and MapRead 2017-11-22 18:25:20 -05:00
Corentin Wallez
0216233a83 Vulkan: Create device and load all entry points 2017-11-22 18:25:20 -05:00