mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 16:37:08 +00:00
Device: Deprecated GetDefaultQueue in favor of ::GetQueue()
Bug: dawn:22 Change-Id: I103ea933ca5b93f20d8bf11c6671bd9f603d8ff3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40061 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
d5a0728b67
commit
6d315daa5d
@@ -828,7 +828,7 @@ void DawnTestBase::SetUp() {
|
||||
"_" + ::testing::UnitTest::GetInstance()->current_test_info()->name();
|
||||
mWireHelper->BeginWireTrace(traceName.c_str());
|
||||
|
||||
queue = device.GetDefaultQueue();
|
||||
queue = device.GetQueue();
|
||||
|
||||
device.SetUncapturedErrorCallback(OnDeviceError, this);
|
||||
device.SetDeviceLostCallback(OnDeviceLost, this);
|
||||
@@ -994,7 +994,7 @@ void DawnTestBase::FlushWire() {
|
||||
}
|
||||
|
||||
void DawnTestBase::WaitForAllOperations() {
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
wgpu::Fence fence = queue.CreateFence();
|
||||
|
||||
// Force the currently submitted operations to completed.
|
||||
|
||||
@@ -105,9 +105,9 @@ class CopyTextureForBrowserTests : public DawnTest {
|
||||
textureDataLayout.bytesPerRow = copyLayout.bytesPerRow;
|
||||
textureDataLayout.rowsPerImage = copyLayout.rowsPerImage;
|
||||
|
||||
device.GetDefaultQueue().WriteTexture(&textureCopyView, textureArrayCopyData.data(),
|
||||
textureArrayCopyData.size() * sizeof(RGBA8),
|
||||
&textureDataLayout, ©Layout.mipSize);
|
||||
device.GetQueue().WriteTexture(&textureCopyView, textureArrayCopyData.data(),
|
||||
textureArrayCopyData.size() * sizeof(RGBA8),
|
||||
&textureDataLayout, ©Layout.mipSize);
|
||||
|
||||
const wgpu::Extent3D copySizePerSlice = {copySize.width, copySize.height, 1};
|
||||
// Perform the texture to texture copy
|
||||
@@ -120,8 +120,8 @@ class CopyTextureForBrowserTests : public DawnTest {
|
||||
queue.Submit(1, &commands);
|
||||
|
||||
// Perform a copy here for testing.
|
||||
device.GetDefaultQueue().CopyTextureForBrowser(&srcTextureCopyView, &dstTextureCopyView,
|
||||
©Size, options);
|
||||
device.GetQueue().CopyTextureForBrowser(&srcTextureCopyView, &dstTextureCopyView, ©Size,
|
||||
options);
|
||||
|
||||
// Texels in single slice.
|
||||
const uint32_t texelCountInCopyRegion = utils::GetTexelCountInCopyRegion(
|
||||
|
||||
@@ -151,6 +151,19 @@ TEST_P(DeprecationTests, BindGroupLayoutEntryViewDimensionDefaulting) {
|
||||
}
|
||||
}
|
||||
|
||||
// Test Device::GetDefaultQueue deprecation.
|
||||
TEST_P(DeprecationTests, GetDefaultQueueDeprecation) {
|
||||
// Using GetDefaultQueue emits a warning.
|
||||
wgpu::Queue deprecatedQueue;
|
||||
EXPECT_DEPRECATION_WARNING(deprecatedQueue = device.GetDefaultQueue());
|
||||
|
||||
// Using GetQueue doesn't emit a warning.
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
|
||||
// Both objects are the same, even with dawn_wire.
|
||||
EXPECT_EQ(deprecatedQueue.Get(), queue.Get());
|
||||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DeprecationTests,
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
|
||||
@@ -79,7 +79,7 @@ TEST_F(DeviceInitializationTest, DeviceOutlivesInstance) {
|
||||
encoder.CopyBufferToBuffer(src, 0, dst, 0, 4 * sizeof(uint32_t));
|
||||
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
device.GetDefaultQueue().Submit(1, &commands);
|
||||
device.GetQueue().Submit(1, &commands);
|
||||
|
||||
bool done = false;
|
||||
dst.MapAsync(
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
|
||||
class QueueTests : public DawnTest {};
|
||||
|
||||
// Test that GetDefaultQueue always returns the same object.
|
||||
TEST_P(QueueTests, GetDefaultQueueSameObject) {
|
||||
wgpu::Queue q1 = device.GetDefaultQueue();
|
||||
wgpu::Queue q2 = device.GetDefaultQueue();
|
||||
// Test that GetQueue always returns the same object.
|
||||
TEST_P(QueueTests, GetQueueSameObject) {
|
||||
wgpu::Queue q1 = device.GetQueue();
|
||||
wgpu::Queue q2 = device.GetQueue();
|
||||
EXPECT_EQ(q1.Get(), q2.Get());
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class BufferValidationTest : public ValidationTest {
|
||||
ValidationTest::SetUp();
|
||||
|
||||
mockBufferMapAsyncCallback = std::make_unique<MockBufferMapAsyncCallback>();
|
||||
queue = device.GetDefaultQueue();
|
||||
queue = device.GetQueue();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
||||
@@ -143,7 +143,7 @@ TEST_F(ErrorScopeValidationTest, PushPopBalanced) {
|
||||
// Test that error scopes do not call their callbacks until after an enclosed Queue::Submit
|
||||
// completes
|
||||
TEST_F(ErrorScopeValidationTest, CallbackAfterQueueSubmit) {
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
|
||||
device.PushErrorScope(wgpu::ErrorFilter::OutOfMemory);
|
||||
queue.Submit(0, nullptr);
|
||||
@@ -159,7 +159,7 @@ TEST_F(ErrorScopeValidationTest, CallbackAfterQueueSubmit) {
|
||||
// Test that parent error scopes do not call their callbacks until after an enclosed Queue::Submit
|
||||
// completes
|
||||
TEST_F(ErrorScopeValidationTest, CallbackAfterQueueSubmitNested) {
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
|
||||
device.PushErrorScope(wgpu::ErrorFilter::OutOfMemory);
|
||||
device.PushErrorScope(wgpu::ErrorFilter::OutOfMemory);
|
||||
@@ -178,7 +178,7 @@ TEST_F(ErrorScopeValidationTest, CallbackAfterQueueSubmitNested) {
|
||||
|
||||
// Test a callback that returns asynchronously followed by a synchronous one
|
||||
TEST_F(ErrorScopeValidationTest, AsynchronousThenSynchronous) {
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
|
||||
device.PushErrorScope(wgpu::ErrorFilter::OutOfMemory);
|
||||
queue.Submit(0, nullptr);
|
||||
@@ -202,7 +202,7 @@ TEST_F(ErrorScopeValidationTest, DeviceDestroyedBeforeCallback) {
|
||||
// TODO(crbug.com/dawn/652): This has different behavior on the wire and should be consistent.
|
||||
DAWN_SKIP_TEST_IF(UsesWire());
|
||||
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
|
||||
device.PushErrorScope(wgpu::ErrorFilter::OutOfMemory);
|
||||
queue.Submit(0, nullptr);
|
||||
|
||||
@@ -53,7 +53,7 @@ class FenceValidationTest : public ValidationTest {
|
||||
ValidationTest::SetUp();
|
||||
|
||||
mockFenceOnCompletionCallback = std::make_unique<MockFenceOnCompletionCallback>();
|
||||
queue = device.GetDefaultQueue();
|
||||
queue = device.GetQueue();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
@@ -194,7 +194,7 @@ TEST_F(FenceValidationTest, SignalSuccess) {
|
||||
// Test it is invalid to signal a fence on a different queue than it was created on
|
||||
// DISABLED until we have support for multiple queues
|
||||
TEST_F(FenceValidationTest, DISABLED_SignalWrongQueue) {
|
||||
wgpu::Queue queue2 = device.GetDefaultQueue();
|
||||
wgpu::Queue queue2 = device.GetQueue();
|
||||
|
||||
wgpu::FenceDescriptor descriptor;
|
||||
descriptor.initialValue = 1;
|
||||
@@ -206,7 +206,7 @@ TEST_F(FenceValidationTest, DISABLED_SignalWrongQueue) {
|
||||
// Test that signaling a fence on a wrong queue does not update fence signaled value
|
||||
// DISABLED until we have support for multiple queues
|
||||
TEST_F(FenceValidationTest, DISABLED_SignalWrongQueueDoesNotUpdateValue) {
|
||||
wgpu::Queue queue2 = device.GetDefaultQueue();
|
||||
wgpu::Queue queue2 = device.GetQueue();
|
||||
|
||||
wgpu::FenceDescriptor descriptor;
|
||||
descriptor.initialValue = 1;
|
||||
|
||||
@@ -133,7 +133,7 @@ TEST_F(OcclusionQueryValidationTest, InvalidOcclusionQuerySet) {
|
||||
pass.EndOcclusionQuery();
|
||||
pass.EndPass();
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
occlusionQuerySet.Destroy();
|
||||
ASSERT_DEVICE_ERROR(queue.Submit(1, &commands));
|
||||
}
|
||||
@@ -292,7 +292,7 @@ TEST_F(TimestampQueryValidationTest, WriteTimestampOnCommandEncoder) {
|
||||
encoder.WriteTimestamp(timestampQuerySet, 0);
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
timestampQuerySet.Destroy();
|
||||
ASSERT_DEVICE_ERROR(queue.Submit(1, &commands));
|
||||
}
|
||||
@@ -338,7 +338,7 @@ TEST_F(TimestampQueryValidationTest, WriteTimestampOnComputePassEncoder) {
|
||||
pass.EndPass();
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
timestampQuerySet.Destroy();
|
||||
ASSERT_DEVICE_ERROR(queue.Submit(1, &commands));
|
||||
}
|
||||
@@ -419,7 +419,7 @@ TEST_F(TimestampQueryValidationTest, WriteTimestampOnRenderPassEncoder) {
|
||||
pass.EndPass();
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
timestampQuerySet.Destroy();
|
||||
ASSERT_DEVICE_ERROR(queue.Submit(1, &commands));
|
||||
}
|
||||
@@ -517,7 +517,7 @@ TEST_F(ResolveQuerySetValidationTest, ResolveInvalidQuerySetAndIndexCount) {
|
||||
encoder.ResolveQuerySet(querySet, 0, kQueryCount, destination, 0);
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
queue.Submit(1, &commands);
|
||||
}
|
||||
|
||||
@@ -542,7 +542,7 @@ TEST_F(ResolveQuerySetValidationTest, ResolveInvalidQuerySetAndIndexCount) {
|
||||
encoder.ResolveQuerySet(querySet, 0, kQueryCount, destination, 0);
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
querySet.Destroy();
|
||||
ASSERT_DEVICE_ERROR(queue.Submit(1, &commands));
|
||||
}
|
||||
@@ -562,7 +562,7 @@ TEST_F(ResolveQuerySetValidationTest, ResolveToInvalidBufferAndOffset) {
|
||||
encoder.ResolveQuerySet(querySet, 1, kQueryCount - 1, destination, 8);
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
queue.Submit(1, &commands);
|
||||
}
|
||||
|
||||
@@ -611,7 +611,7 @@ TEST_F(ResolveQuerySetValidationTest, ResolveToInvalidBufferAndOffset) {
|
||||
encoder.ResolveQuerySet(querySet, 0, kQueryCount, destination, 0);
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
destination.Destroy();
|
||||
ASSERT_DEVICE_ERROR(queue.Submit(1, &commands));
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace {
|
||||
commands = encoder.Finish();
|
||||
}
|
||||
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
|
||||
// Submitting when the buffer has never been mapped should succeed
|
||||
queue.Submit(1, &commands);
|
||||
@@ -84,7 +84,7 @@ namespace {
|
||||
private:
|
||||
void SetUp() override {
|
||||
ValidationTest::SetUp();
|
||||
queue = device.GetDefaultQueue();
|
||||
queue = device.GetQueue();
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -193,7 +193,7 @@ namespace {
|
||||
// Test it is invalid to submit a command buffer twice
|
||||
TEST_F(QueueSubmitValidationTest, CommandBufferSubmittedTwice) {
|
||||
wgpu::CommandBuffer commandBuffer = device.CreateCommandEncoder().Finish();
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
|
||||
// Should succeed
|
||||
queue.Submit(1, &commandBuffer);
|
||||
@@ -224,7 +224,7 @@ namespace {
|
||||
commands = encoder.Finish();
|
||||
}
|
||||
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
|
||||
// Map the source buffer to force a failure
|
||||
buffer.MapAsync(wgpu::MapMode::Write, 0, kBufferSize, nullptr, nullptr);
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace {
|
||||
private:
|
||||
void SetUp() override {
|
||||
ValidationTest::SetUp();
|
||||
queue = device.GetDefaultQueue();
|
||||
queue = device.GetQueue();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace {
|
||||
void SetUp() override {
|
||||
ValidationTest::SetUp();
|
||||
|
||||
queue = device.GetDefaultQueue();
|
||||
queue = device.GetQueue();
|
||||
}
|
||||
|
||||
wgpu::TextureDescriptor CreateDefaultTextureDescriptor() {
|
||||
|
||||
@@ -123,7 +123,7 @@ void ValidationTest::FlushWire() {
|
||||
}
|
||||
|
||||
void ValidationTest::WaitForAllOperations(const wgpu::Device& device) {
|
||||
wgpu::Queue queue = device.GetDefaultQueue();
|
||||
wgpu::Queue queue = device.GetQueue();
|
||||
wgpu::Fence fence = queue.CreateFence();
|
||||
|
||||
// Force the currently submitted operations to completed.
|
||||
|
||||
@@ -231,9 +231,9 @@ TEST_F(WireFenceTests, DestroyBeforeOnCompletionEnd) {
|
||||
// Test that signaling a fence on a wrong queue is invalid
|
||||
// DISABLED until we have support for multiple queues.
|
||||
TEST_F(WireFenceTests, DISABLED_SignalWrongQueue) {
|
||||
WGPUQueue queue2 = wgpuDeviceGetDefaultQueue(device);
|
||||
WGPUQueue queue2 = wgpuDeviceGetQueue(device);
|
||||
WGPUQueue apiQueue2 = api.GetNewQueue();
|
||||
EXPECT_CALL(api, DeviceGetDefaultQueue(apiDevice)).WillOnce(Return(apiQueue2));
|
||||
EXPECT_CALL(api, DeviceGetQueue(apiDevice)).WillOnce(Return(apiQueue2));
|
||||
FlushClient();
|
||||
|
||||
wgpuQueueSignal(queue2, fence, 2u); // error
|
||||
@@ -245,9 +245,9 @@ TEST_F(WireFenceTests, DISABLED_SignalWrongQueue) {
|
||||
// Test that signaling a fence on a wrong queue does not update fence signaled value
|
||||
// DISABLED until we have support for multiple queues.
|
||||
TEST_F(WireFenceTests, DISABLED_SignalWrongQueueDoesNotUpdateValue) {
|
||||
WGPUQueue queue2 = wgpuDeviceGetDefaultQueue(device);
|
||||
WGPUQueue queue2 = wgpuDeviceGetQueue(device);
|
||||
WGPUQueue apiQueue2 = api.GetNewQueue();
|
||||
EXPECT_CALL(api, DeviceGetDefaultQueue(apiDevice)).WillOnce(Return(apiQueue2));
|
||||
EXPECT_CALL(api, DeviceGetQueue(apiDevice)).WillOnce(Return(apiQueue2));
|
||||
FlushClient();
|
||||
|
||||
wgpuQueueSignal(queue2, fence, 2u); // error
|
||||
|
||||
@@ -107,16 +107,16 @@ TEST_F(WireInjectDeviceTests, InjectedDeviceLifetime) {
|
||||
Mock::VerifyAndClearExpectations(&api);
|
||||
}
|
||||
|
||||
// Test that it is an error to get the default queue of a device before it has been
|
||||
// Test that it is an error to get the primary queue of a device before it has been
|
||||
// injected on the server.
|
||||
TEST_F(WireInjectDeviceTests, GetQueueBeforeInject) {
|
||||
ReservedDevice reservation = GetWireClient()->ReserveDevice();
|
||||
|
||||
wgpuDeviceGetDefaultQueue(reservation.device);
|
||||
wgpuDeviceGetQueue(reservation.device);
|
||||
FlushClient(false);
|
||||
}
|
||||
|
||||
// Test that it is valid to get the default queue of a device after it has been
|
||||
// Test that it is valid to get the primary queue of a device after it has been
|
||||
// injected on the server.
|
||||
TEST_F(WireInjectDeviceTests, GetQueueAfterInject) {
|
||||
ReservedDevice reservation = GetWireClient()->ReserveDevice();
|
||||
@@ -128,10 +128,10 @@ TEST_F(WireInjectDeviceTests, GetQueueAfterInject) {
|
||||
ASSERT_TRUE(
|
||||
GetWireServer()->InjectDevice(serverDevice, reservation.id, reservation.generation));
|
||||
|
||||
wgpuDeviceGetDefaultQueue(reservation.device);
|
||||
wgpuDeviceGetQueue(reservation.device);
|
||||
|
||||
WGPUQueue apiQueue = api.GetNewQueue();
|
||||
EXPECT_CALL(api, DeviceGetDefaultQueue(serverDevice)).WillOnce(Return(apiQueue));
|
||||
EXPECT_CALL(api, DeviceGetQueue(serverDevice)).WillOnce(Return(apiQueue));
|
||||
FlushClient();
|
||||
|
||||
// Called on shutdown.
|
||||
@@ -187,7 +187,7 @@ TEST_F(WireInjectDeviceTests, ReflectLiveDevices) {
|
||||
// KnownObjects std::vector of devices. The fix was to store pointers to heap allocated
|
||||
// objects instead.
|
||||
TEST_F(WireInjectDeviceTests, TrackChildObjectsWithTwoReservedDevices) {
|
||||
// Reserve one device, inject it, and get the default queue.
|
||||
// Reserve one device, inject it, and get the primary queue.
|
||||
ReservedDevice reservation1 = GetWireClient()->ReserveDevice();
|
||||
|
||||
WGPUDevice serverDevice1 = api.GetNewDevice();
|
||||
|
||||
@@ -70,10 +70,10 @@ class WireMultipleDeviceTests : public testing::Test {
|
||||
|
||||
mClientDevice = mWireClient->GetDevice();
|
||||
|
||||
// The GetDefaultQueue is done on WireClient startup so we expect it now.
|
||||
mClientQueue = wgpuDeviceGetDefaultQueue(mClientDevice);
|
||||
// The GetQueue is done on WireClient startup so we expect it now.
|
||||
mClientQueue = wgpuDeviceGetQueue(mClientDevice);
|
||||
mServerQueue = mApi.GetNewQueue();
|
||||
EXPECT_CALL(mApi, DeviceGetDefaultQueue(mServerDevice)).WillOnce(Return(mServerQueue));
|
||||
EXPECT_CALL(mApi, DeviceGetQueue(mServerDevice)).WillOnce(Return(mServerQueue));
|
||||
FlushClient();
|
||||
}
|
||||
|
||||
|
||||
@@ -71,10 +71,10 @@ void WireTest::SetUp() {
|
||||
|
||||
apiDevice = mockDevice;
|
||||
|
||||
// The GetDefaultQueue is done on WireClient startup so we expect it now.
|
||||
queue = wgpuDeviceGetDefaultQueue(device);
|
||||
// The GetQueue is done on WireClient startup so we expect it now.
|
||||
queue = wgpuDeviceGetQueue(device);
|
||||
apiQueue = api.GetNewQueue();
|
||||
EXPECT_CALL(api, DeviceGetDefaultQueue(apiDevice)).WillOnce(Return(apiQueue));
|
||||
EXPECT_CALL(api, DeviceGetQueue(apiDevice)).WillOnce(Return(apiQueue));
|
||||
FlushClient();
|
||||
}
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ namespace dawn_native { namespace vulkan {
|
||||
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
|
||||
wgpu::Queue queue = dawnDevice.GetDefaultQueue();
|
||||
wgpu::Queue queue = dawnDevice.GetQueue();
|
||||
queue.Submit(1, &commands);
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ namespace dawn_native { namespace vulkan {
|
||||
ClearImage(secondDevice, copySrcTexture, {1 / 255.0f, 2 / 255.0f, 3 / 255.0f, 4 / 255.0f});
|
||||
|
||||
// Copy color B on |secondDevice|
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetDefaultQueue();
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetQueue();
|
||||
SimpleCopyTextureToTexture(secondDevice, secondDeviceQueue, copySrcTexture,
|
||||
secondDeviceWrappedTexture);
|
||||
|
||||
@@ -578,7 +578,7 @@ namespace dawn_native { namespace vulkan {
|
||||
exportInfo.releasedOldLayout, exportInfo.releasedNewLayout);
|
||||
|
||||
// Copy color B on |secondDevice|
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetDefaultQueue();
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetQueue();
|
||||
|
||||
// Create a buffer on |secondDevice|
|
||||
wgpu::Buffer copySrcBuffer =
|
||||
@@ -681,8 +681,8 @@ namespace dawn_native { namespace vulkan {
|
||||
wgpu::Device::Acquire(reinterpret_cast<WGPUDevice>(thirdDeviceVk));
|
||||
|
||||
// Make queue for device 2 and 3
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetDefaultQueue();
|
||||
wgpu::Queue thirdDeviceQueue = thirdDevice.GetDefaultQueue();
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetQueue();
|
||||
wgpu::Queue thirdDeviceQueue = thirdDevice.GetQueue();
|
||||
|
||||
// Create BOs for A, B, C
|
||||
gbm_bo* gbmBoA = CreateGbmBo(1, 1, true /* linear */);
|
||||
@@ -781,7 +781,7 @@ namespace dawn_native { namespace vulkan {
|
||||
textures.push_back(device.CreateTexture(&descriptor));
|
||||
}
|
||||
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetDefaultQueue();
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetQueue();
|
||||
|
||||
// Make an image on |secondDevice|
|
||||
gbm_bo* gbmBo = CreateGbmBo(640, 480, false /* linear */);
|
||||
|
||||
@@ -446,7 +446,7 @@ namespace dawn_native { namespace vulkan {
|
||||
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
|
||||
wgpu::Queue queue = dawnDevice.GetDefaultQueue();
|
||||
wgpu::Queue queue = dawnDevice.GetQueue();
|
||||
queue.Submit(1, &commands);
|
||||
}
|
||||
|
||||
@@ -610,7 +610,7 @@ namespace dawn_native { namespace vulkan {
|
||||
ClearImage(secondDevice, copySrcTexture, {1 / 255.0f, 2 / 255.0f, 3 / 255.0f, 4 / 255.0f});
|
||||
|
||||
// Copy color B on |secondDevice|
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetDefaultQueue();
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetQueue();
|
||||
SimpleCopyTextureToTexture(secondDevice, secondDeviceQueue, copySrcTexture,
|
||||
secondDeviceWrappedTexture);
|
||||
|
||||
@@ -714,7 +714,7 @@ namespace dawn_native { namespace vulkan {
|
||||
exportInfo.releasedOldLayout, exportInfo.releasedNewLayout);
|
||||
|
||||
// Copy color B on |secondDevice|
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetDefaultQueue();
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetQueue();
|
||||
|
||||
// Create a buffer on |secondDevice|
|
||||
wgpu::Buffer copySrcBuffer =
|
||||
@@ -821,8 +821,8 @@ namespace dawn_native { namespace vulkan {
|
||||
wgpu::Device::Acquire(reinterpret_cast<WGPUDevice>(thirdDeviceVk));
|
||||
|
||||
// Make queue for device 2 and 3
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetDefaultQueue();
|
||||
wgpu::Queue thirdDeviceQueue = thirdDevice.GetDefaultQueue();
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetQueue();
|
||||
wgpu::Queue thirdDeviceQueue = thirdDevice.GetQueue();
|
||||
|
||||
// Allocate memory for A, B, C
|
||||
VkImage imageA;
|
||||
@@ -941,7 +941,7 @@ namespace dawn_native { namespace vulkan {
|
||||
textures.push_back(device.CreateTexture(&descriptor));
|
||||
}
|
||||
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetDefaultQueue();
|
||||
wgpu::Queue secondDeviceQueue = secondDevice.GetQueue();
|
||||
|
||||
// Make an image on |secondDevice|
|
||||
VkImage imageA;
|
||||
|
||||
Reference in New Issue
Block a user