Vulkan: Handle CopyBufferToBuffer commands

This as this is the first command handled by the Vulkan backend, this
commit also introduces the b::v::CommandBUffer class and implements
b::v::Queue::Submit.

Also enables the BufferSetSubData tests that are now passing on Vulkan
even though the buffer transitions are unimplemented.
This commit is contained in:
Corentin Wallez
2017-12-04 16:29:41 -05:00
committed by Corentin Wallez
parent a9b98af710
commit 77a1d908b6
11 changed files with 134 additions and 6 deletions

View File

@@ -136,10 +136,10 @@ TEST_P(BufferSetSubDataTests, SmallDataAtOffset) {
// Stress test for many calls to SetSubData
TEST_P(BufferSetSubDataTests, ManySetSubData) {
if (IsD3D12() || IsMetal()) {
if (IsD3D12() || IsMetal() || IsVulkan()) {
// TODO(cwallez@chromium.org): Use ringbuffers for SetSubData on explicit APIs.
// otherwise this creates too many resources and can take freeze the driver(?)
std::cout << "Test skipped on D3D12 and Metal" << std::endl;
std::cout << "Test skipped on D3D12, Metal and Vulkan" << std::endl;
return;
}
@@ -180,4 +180,8 @@ TEST_P(BufferSetSubDataTests, LargeSetSubData) {
EXPECT_BUFFER_U32_RANGE_EQ(expectedData.data(), buffer, 0, kElements);
}
NXT_INSTANTIATE_TEST(BufferSetSubDataTests, D3D12Backend, MetalBackend, OpenGLBackend)
NXT_INSTANTIATE_TEST(BufferSetSubDataTests,
D3D12Backend,
MetalBackend,
OpenGLBackend,
VulkanBackend)