mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 08:57:26 +00:00
Adding Queue::WriteTexture
Added Queue::WriteTexture with validation but no actual implementation. Tests were mostly taken from validation tests for copying buffer to texture. Validation tests for CopyB2T and WriteTexture do not cover 2d-array textures yet. Bug: dawn:483 Change-Id: I9027eb615c02fe2265cde912f6ba17a235b94728 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24440 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Tomek Ponitka <tommek@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
83fe1bc34d
commit
a9c7d64aad
@@ -55,4 +55,21 @@ namespace dawn_wire { namespace server {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Server::DoQueueWriteTextureInternal(ObjectId queueId,
|
||||
const WGPUTextureCopyView* destination,
|
||||
const uint8_t* data,
|
||||
size_t dataSize,
|
||||
const WGPUTextureDataLayout* dataLayout,
|
||||
const WGPUExtent3D* writeSize) {
|
||||
// The null object isn't valid as `self` so we can combine the check with the
|
||||
// check that the ID is valid.
|
||||
auto* queue = QueueObjects().Get(queueId);
|
||||
if (queue == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
mProcs.queueWriteTexture(queue->handle, destination, data, dataSize, dataLayout, writeSize);
|
||||
return true;
|
||||
}
|
||||
|
||||
}} // namespace dawn_wire::server
|
||||
|
||||
Reference in New Issue
Block a user