mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
d3d12: External image import using multiple wait fences and signal fence
To support concurrent readers on multiple command queues/devices, Dawn must support importing via wait multiple fences and also export a signal fence. The previous implementation of using a single fence for waiting and signaling doesn't work for concurrent reads across queues. This CL adds support for specifying multiple wait fences for ExternalImageDXGI via a BeginAccess method that's meant to replace ProduceTexture. There's also an EndAccess method that returns a signal fence for the client. For performance reasons, we use the same fence as the signal fence that the Device uses internally, and record its value on the texture after ExecuteCommandLists. Therefore, the CL also makes the Device's internal fence a shared fence so that we can export it to the client. This CL also expands the ConcurrentExternalImageReadAccess test so that it tests fence synchronization across multiple devices. A number of test helpers also now take an optional device parameter so that we can use pixel value expectations with secondary devices. Bug: dawn:576 Change-Id: I6bc86808ede9b5aacf87667106cbd16731a12516 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/99746 Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
29aa613dcf
commit
5881e735f9
@@ -237,12 +237,6 @@ struct DAWN_NATIVE_EXPORT ExternalImageDescriptor {
|
||||
ExternalImageType mType;
|
||||
};
|
||||
|
||||
struct DAWN_NATIVE_EXPORT ExternalImageAccessDescriptor {
|
||||
public:
|
||||
bool isInitialized = false; // Whether the texture is initialized on import
|
||||
WGPUTextureUsageFlags usage = WGPUTextureUsage_None;
|
||||
};
|
||||
|
||||
struct DAWN_NATIVE_EXPORT ExternalImageExportInfo {
|
||||
public:
|
||||
bool isInitialized = false; // Whether the texture is initialized after export
|
||||
|
||||
Reference in New Issue
Block a user