Commit 3ee1db28 authored by Corentin Wallez's avatar Corentin Wallez Committed by Commit Bot

GPUBuffer: Rely on Dawn's validation for mapping methods

Bug: dawn:445
Change-Id: I3b435dc158bba190b5499da428a1efe7433b4831
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446229
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: default avatarKai Ninomiya <kainino@chromium.org>
Reviewed-by: default avatarAustin Eng <enga@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818876}
parent 3774afbd
...@@ -26,7 +26,6 @@ class GPUBuffer : public DawnObject<WGPUBuffer> { ...@@ -26,7 +26,6 @@ class GPUBuffer : public DawnObject<WGPUBuffer> {
const GPUBufferDescriptor* webgpu_desc); const GPUBufferDescriptor* webgpu_desc);
explicit GPUBuffer(GPUDevice* device, explicit GPUBuffer(GPUDevice* device,
uint64_t size, uint64_t size,
bool mapped_at_creation,
WGPUBuffer buffer); WGPUBuffer buffer);
~GPUBuffer() override; ~GPUBuffer() override;
...@@ -49,7 +48,6 @@ class GPUBuffer : public DawnObject<WGPUBuffer> { ...@@ -49,7 +48,6 @@ class GPUBuffer : public DawnObject<WGPUBuffer> {
ExceptionState& exception_state); ExceptionState& exception_state);
void unmap(ScriptState* script_state); void unmap(ScriptState* script_state);
void destroy(ScriptState* script_state); void destroy(ScriptState* script_state);
// TODO(crbug.com/877147): implement GPUBuffer.
private: private:
ScriptPromise MapAsyncImpl(ScriptState* script_state, ScriptPromise MapAsyncImpl(ScriptState* script_state,
...@@ -62,8 +60,6 @@ class GPUBuffer : public DawnObject<WGPUBuffer> { ...@@ -62,8 +60,6 @@ class GPUBuffer : public DawnObject<WGPUBuffer> {
ExceptionState& exception_state); ExceptionState& exception_state);
void OnMapAsyncCallback(ScriptPromiseResolver* resolver, void OnMapAsyncCallback(ScriptPromiseResolver* resolver,
uint64_t map_start,
uint64_t map_end,
WGPUBufferMapAsyncStatus status); WGPUBufferMapAsyncStatus status);
DOMArrayBuffer* CreateArrayBufferForMappedData(void* data, DOMArrayBuffer* CreateArrayBufferForMappedData(void* data,
...@@ -76,8 +72,6 @@ class GPUBuffer : public DawnObject<WGPUBuffer> { ...@@ -76,8 +72,6 @@ class GPUBuffer : public DawnObject<WGPUBuffer> {
// mapWriteAsync. // mapWriteAsync.
HeapVector<Member<DOMArrayBuffer>> mapped_array_buffers_; HeapVector<Member<DOMArrayBuffer>> mapped_array_buffers_;
uint64_t map_start_ = 0;
uint64_t map_end_ = 0;
// List of ranges currently returned by getMappedRange, to avoid overlaps. // List of ranges currently returned by getMappedRange, to avoid overlaps.
Vector<std::pair<size_t, size_t>> mapped_ranges_; Vector<std::pair<size_t, size_t>> mapped_ranges_;
......
...@@ -52,6 +52,9 @@ crbug.com/1083478 [ Win ] wpt_internal/webgpu/webgpu/web-platform/reftests/canva ...@@ -52,6 +52,9 @@ crbug.com/1083478 [ Win ] wpt_internal/webgpu/webgpu/web-platform/reftests/canva
crbug.com/dawn/542 wpt_internal/webgpu/cts.html?q=webgpu:api,validation,setViewport:* [ Failure ] crbug.com/dawn/542 wpt_internal/webgpu/cts.html?q=webgpu:api,validation,setViewport:* [ Failure ]
crbug.com/dawn/542 wpt_internal/webgpu/cts.html?q=webgpu:api,validation,setScissorRect:* [ Failure ] crbug.com/dawn/542 wpt_internal/webgpu/cts.html?q=webgpu:api,validation,setScissorRect:* [ Failure ]
# This test should be updated to expect an OperationError instead of a RangeError
crbug.com/dawn/445 wpt_internal/webgpu/cts.html?q=webgpu:api,operation,buffers,map_oom:mappedAtCreation:* [ Failure ]
# #
# Platform-independent failures # Platform-independent failures
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment