mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
Implement GPUBufferDescriptor.mappedAtCreation.
This CL: - Adds mappedAtCreation to dawn.json - Changes dawn_native to implement CreateBufferMapped in terms of mappedAtCreation. - Duplicates all the CreateBufferMappedTests to mappedAtCreation tests (both validation and end2end). - Implements dawn_wire's mappedAtCreation in terms of CreateBufferMapped. The reversal in dawn_wire will be done in a follow-up CL. Bug: dawn:445 Change-Id: I70b9fa729b1402524a6b993c3f288987eb65c6c4 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24083 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
cf77d75573
commit
b2ea1915d4
@@ -297,8 +297,7 @@ namespace dawn_native { namespace null {
|
||||
return (GetUsage() & (wgpu::BufferUsage::MapRead | wgpu::BufferUsage::MapWrite)) != 0;
|
||||
}
|
||||
|
||||
MaybeError Buffer::MapAtCreationImpl(uint8_t** mappedPointer) {
|
||||
*mappedPointer = mBackingData.get();
|
||||
MaybeError Buffer::MapAtCreationImpl() {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace dawn_native { namespace null {
|
||||
void DestroyImpl() override;
|
||||
|
||||
bool IsMapWritable() const override;
|
||||
MaybeError MapAtCreationImpl(uint8_t** mappedPointer) override;
|
||||
MaybeError MapAtCreationImpl() override;
|
||||
void MapAsyncImplCommon(uint32_t serial, bool isWrite);
|
||||
void* GetMappedPointerImpl() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user