Commit f85f7f54 authored by François Beaufort's avatar François Beaufort Committed by Commit Bot

[WebGPU] Define GPUExtent3D as (sequence<unsigned long> or GPUExtent3DDict)

This CL redefines GPUExtent3D as not only a GPUExtent3DDict, but also a
sequence of unsigned long as specified in
https://gpuweb.github.io/gpuweb/#typedefdef-gpuextent3d

Bug: 877147
Change-Id: If5eb7d3b6f79f1234938f1fbae7c7fe5f0b7aa28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1828909
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: default avatarCorentin Wallez <cwallez@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarMike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701522}
parent ce85bcc0
...@@ -94,6 +94,8 @@ bindings_modules_generated_union_type_files = [ ...@@ -94,6 +94,8 @@ bindings_modules_generated_union_type_files = [
"$bindings_modules_v8_output_dir/string_or_unsigned_long.h", "$bindings_modules_v8_output_dir/string_or_unsigned_long.h",
"$bindings_modules_v8_output_dir/unsigned_long_or_unsigned_long_sequence.cc", "$bindings_modules_v8_output_dir/unsigned_long_or_unsigned_long_sequence.cc",
"$bindings_modules_v8_output_dir/unsigned_long_or_unsigned_long_sequence.h", "$bindings_modules_v8_output_dir/unsigned_long_or_unsigned_long_sequence.h",
"$bindings_modules_v8_output_dir/unsigned_long_sequence_or_gpu_extent_3d_dict.cc",
"$bindings_modules_v8_output_dir/unsigned_long_sequence_or_gpu_extent_3d_dict.h",
"$bindings_modules_v8_output_dir/webgl_rendering_context_or_webgl2_rendering_context.cc", "$bindings_modules_v8_output_dir/webgl_rendering_context_or_webgl2_rendering_context.cc",
"$bindings_modules_v8_output_dir/webgl_rendering_context_or_webgl2_rendering_context.h", "$bindings_modules_v8_output_dir/webgl_rendering_context_or_webgl2_rendering_context.h",
] ]
......
...@@ -850,7 +850,7 @@ modules_dictionary_idl_files = ...@@ -850,7 +850,7 @@ modules_dictionary_idl_files =
"webgpu/gpu_depth_stencil_state_descriptor.idl", "webgpu/gpu_depth_stencil_state_descriptor.idl",
"webgpu/gpu_device_descriptor.idl", "webgpu/gpu_device_descriptor.idl",
"webgpu/gpu_extensions.idl", "webgpu/gpu_extensions.idl",
"webgpu/gpu_extent_3d.idl", "webgpu/gpu_extent_3d_dict.idl",
"webgpu/gpu_fence_descriptor.idl", "webgpu/gpu_fence_descriptor.idl",
"webgpu/gpu_limits.idl", "webgpu/gpu_limits.idl",
"webgpu/gpu_object_descriptor_base.idl", "webgpu/gpu_object_descriptor_base.idl",
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <dawn/dawn.h> #include <dawn/dawn.h>
#include "third_party/blink/renderer/bindings/modules/v8/double_sequence_or_gpu_color_dict.h" #include "third_party/blink/renderer/bindings/modules/v8/double_sequence_or_gpu_color_dict.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_extent_3d.h" #include "third_party/blink/renderer/bindings/modules/v8/unsigned_long_sequence_or_gpu_extent_3d_dict.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_origin_3d.h" #include "third_party/blink/renderer/modules/webgpu/gpu_origin_3d.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_pipeline_stage_descriptor.h" #include "third_party/blink/renderer/modules/webgpu/gpu_pipeline_stage_descriptor.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_shader_module.h" #include "third_party/blink/renderer/modules/webgpu/gpu_shader_module.h"
...@@ -739,13 +739,30 @@ DawnColor AsDawnType(const DoubleSequenceOrGPUColorDict* webgpu_color) { ...@@ -739,13 +739,30 @@ DawnColor AsDawnType(const DoubleSequenceOrGPUColorDict* webgpu_color) {
return dawn_color; return dawn_color;
} }
DawnExtent3D AsDawnType(const GPUExtent3D* webgpu_extent) { DawnExtent3D AsDawnType(
const UnsignedLongSequenceOrGPUExtent3DDict* webgpu_extent) {
DCHECK(webgpu_extent); DCHECK(webgpu_extent);
DawnExtent3D dawn_extent = {}; DawnExtent3D dawn_extent = {};
dawn_extent.width = webgpu_extent->width();
dawn_extent.height = webgpu_extent->height(); if (webgpu_extent->IsUnsignedLongSequence()) {
dawn_extent.depth = webgpu_extent->depth(); const Vector<uint32_t>& webgpu_extent_sequence =
webgpu_extent->GetAsUnsignedLongSequence();
DCHECK_EQ(webgpu_extent_sequence.size(), 3UL);
dawn_extent.width = webgpu_extent_sequence[0];
dawn_extent.height = webgpu_extent_sequence[1];
dawn_extent.depth = webgpu_extent_sequence[2];
} else if (webgpu_extent->IsGPUExtent3DDict()) {
const GPUExtent3DDict* webgpu_extent_3d_dict =
webgpu_extent->GetAsGPUExtent3DDict();
dawn_extent.width = webgpu_extent_3d_dict->width();
dawn_extent.height = webgpu_extent_3d_dict->height();
dawn_extent.depth = webgpu_extent_3d_dict->depth();
} else {
NOTREACHED();
}
return dawn_extent; return dawn_extent;
} }
......
...@@ -21,9 +21,9 @@ namespace blink { ...@@ -21,9 +21,9 @@ namespace blink {
class DoubleSequenceOrGPUColorDict; class DoubleSequenceOrGPUColorDict;
class GPUColorDict; class GPUColorDict;
class GPUExtent3D;
class GPUOrigin3D; class GPUOrigin3D;
class GPUPipelineStageDescriptor; class GPUPipelineStageDescriptor;
class UnsignedLongSequenceOrGPUExtent3DDict;
// Convert WebGPU bitfield values to Dawn enums. These have the same value. // Convert WebGPU bitfield values to Dawn enums. These have the same value.
template <typename DawnEnum> template <typename DawnEnum>
...@@ -41,7 +41,7 @@ DawnEnum AsDawnEnum(const WTF::String& webgpu_enum); ...@@ -41,7 +41,7 @@ DawnEnum AsDawnEnum(const WTF::String& webgpu_enum);
DawnColor AsDawnColor(const Vector<double>&); DawnColor AsDawnColor(const Vector<double>&);
DawnColor AsDawnType(const GPUColorDict*); DawnColor AsDawnType(const GPUColorDict*);
DawnColor AsDawnType(const DoubleSequenceOrGPUColorDict*); DawnColor AsDawnType(const DoubleSequenceOrGPUColorDict*);
DawnExtent3D AsDawnType(const GPUExtent3D*); DawnExtent3D AsDawnType(const UnsignedLongSequenceOrGPUExtent3DDict*);
DawnOrigin3D AsDawnType(const GPUOrigin3D*); DawnOrigin3D AsDawnType(const GPUOrigin3D*);
using OwnedPipelineStageDescriptor = using OwnedPipelineStageDescriptor =
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
typedef unsigned long long GPUBufferSize; typedef unsigned long long GPUBufferSize;
typedef (sequence<double> or GPUColorDict) GPUColor; typedef (sequence<double> or GPUColorDict) GPUColor;
typedef (sequence<unsigned long> or GPUExtent3DDict) GPUExtent3D;
[ [
RuntimeEnabled=WebGPU RuntimeEnabled=WebGPU
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "third_party/blink/renderer/modules/webgpu/gpu_command_encoder.h" #include "third_party/blink/renderer/modules/webgpu/gpu_command_encoder.h"
#include "third_party/blink/renderer/bindings/modules/v8/double_sequence_or_gpu_color_dict.h" #include "third_party/blink/renderer/bindings/modules/v8/double_sequence_or_gpu_color_dict.h"
#include "third_party/blink/renderer/bindings/modules/v8/unsigned_long_sequence_or_gpu_extent_3d_dict.h"
#include "third_party/blink/renderer/modules/webgpu/dawn_conversions.h" #include "third_party/blink/renderer/modules/webgpu/dawn_conversions.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_buffer.h" #include "third_party/blink/renderer/modules/webgpu/gpu_buffer.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_buffer_copy_view.h" #include "third_party/blink/renderer/modules/webgpu/gpu_buffer_copy_view.h"
...@@ -14,7 +15,6 @@ ...@@ -14,7 +15,6 @@
#include "third_party/blink/renderer/modules/webgpu/gpu_compute_pass_descriptor.h" #include "third_party/blink/renderer/modules/webgpu/gpu_compute_pass_descriptor.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.h" #include "third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_device.h" #include "third_party/blink/renderer/modules/webgpu/gpu_device.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_extent_3d.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_origin_3d.h" #include "third_party/blink/renderer/modules/webgpu/gpu_origin_3d.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_render_pass_color_attachment_descriptor.h" #include "third_party/blink/renderer/modules/webgpu/gpu_render_pass_color_attachment_descriptor.h"
#include "third_party/blink/renderer/modules/webgpu/gpu_render_pass_depth_stencil_attachment_descriptor.h" #include "third_party/blink/renderer/modules/webgpu/gpu_render_pass_depth_stencil_attachment_descriptor.h"
...@@ -26,6 +26,16 @@ ...@@ -26,6 +26,16 @@
namespace blink { namespace blink {
bool ValidateCopySize(UnsignedLongSequenceOrGPUExtent3DDict& copy_size,
ExceptionState& exception_state) {
if (copy_size.IsUnsignedLongSequence() &&
copy_size.GetAsUnsignedLongSequence().size() != 3) {
exception_state.ThrowRangeError("copySize length must be 3");
return false;
}
return true;
}
DawnRenderPassColorAttachmentDescriptor AsDawnType( DawnRenderPassColorAttachmentDescriptor AsDawnType(
const GPURenderPassColorAttachmentDescriptor* webgpu_desc) { const GPURenderPassColorAttachmentDescriptor* webgpu_desc) {
DCHECK(webgpu_desc); DCHECK(webgpu_desc);
...@@ -247,34 +257,52 @@ void GPUCommandEncoder::copyBufferToBuffer(GPUBuffer* src, ...@@ -247,34 +257,52 @@ void GPUCommandEncoder::copyBufferToBuffer(GPUBuffer* src,
dst_offset, size); dst_offset, size);
} }
void GPUCommandEncoder::copyBufferToTexture(GPUBufferCopyView* source, void GPUCommandEncoder::copyBufferToTexture(
GPUTextureCopyView* destination, GPUBufferCopyView* source,
GPUExtent3D* copy_size) { GPUTextureCopyView* destination,
UnsignedLongSequenceOrGPUExtent3DDict& copy_size,
ExceptionState& exception_state) {
if (!ValidateCopySize(copy_size, exception_state)) {
return;
}
DawnBufferCopyView dawn_source = AsDawnType(source); DawnBufferCopyView dawn_source = AsDawnType(source);
DawnTextureCopyView dawn_destination = AsDawnType(destination); DawnTextureCopyView dawn_destination = AsDawnType(destination);
DawnExtent3D dawn_copy_size = AsDawnType(copy_size); DawnExtent3D dawn_copy_size = AsDawnType(&copy_size);
GetProcs().commandEncoderCopyBufferToTexture( GetProcs().commandEncoderCopyBufferToTexture(
GetHandle(), &dawn_source, &dawn_destination, &dawn_copy_size); GetHandle(), &dawn_source, &dawn_destination, &dawn_copy_size);
} }
void GPUCommandEncoder::copyTextureToBuffer(GPUTextureCopyView* source, void GPUCommandEncoder::copyTextureToBuffer(
GPUBufferCopyView* destination, GPUTextureCopyView* source,
GPUExtent3D* copy_size) { GPUBufferCopyView* destination,
UnsignedLongSequenceOrGPUExtent3DDict& copy_size,
ExceptionState& exception_state) {
if (!ValidateCopySize(copy_size, exception_state)) {
return;
}
DawnTextureCopyView dawn_source = AsDawnType(source); DawnTextureCopyView dawn_source = AsDawnType(source);
DawnBufferCopyView dawn_destination = AsDawnType(destination); DawnBufferCopyView dawn_destination = AsDawnType(destination);
DawnExtent3D dawn_copy_size = AsDawnType(copy_size); DawnExtent3D dawn_copy_size = AsDawnType(&copy_size);
GetProcs().commandEncoderCopyTextureToBuffer( GetProcs().commandEncoderCopyTextureToBuffer(
GetHandle(), &dawn_source, &dawn_destination, &dawn_copy_size); GetHandle(), &dawn_source, &dawn_destination, &dawn_copy_size);
} }
void GPUCommandEncoder::copyTextureToTexture(GPUTextureCopyView* source, void GPUCommandEncoder::copyTextureToTexture(
GPUTextureCopyView* destination, GPUTextureCopyView* source,
GPUExtent3D* copy_size) { GPUTextureCopyView* destination,
UnsignedLongSequenceOrGPUExtent3DDict& copy_size,
ExceptionState& exception_state) {
if (!ValidateCopySize(copy_size, exception_state)) {
return;
}
DawnTextureCopyView dawn_source = AsDawnType(source); DawnTextureCopyView dawn_source = AsDawnType(source);
DawnTextureCopyView dawn_destination = AsDawnType(destination); DawnTextureCopyView dawn_destination = AsDawnType(destination);
DawnExtent3D dawn_copy_size = AsDawnType(copy_size); DawnExtent3D dawn_copy_size = AsDawnType(&copy_size);
GetProcs().commandEncoderCopyTextureToTexture( GetProcs().commandEncoderCopyTextureToTexture(
GetHandle(), &dawn_source, &dawn_destination, &dawn_copy_size); GetHandle(), &dawn_source, &dawn_destination, &dawn_copy_size);
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
namespace blink { namespace blink {
class ExceptionState;
class GPUBuffer; class GPUBuffer;
class GPUBufferCopyView; class GPUBufferCopyView;
class GPUCommandBuffer; class GPUCommandBuffer;
...@@ -17,10 +18,10 @@ class GPUCommandBufferDescriptor; ...@@ -17,10 +18,10 @@ class GPUCommandBufferDescriptor;
class GPUCommandEncoderDescriptor; class GPUCommandEncoderDescriptor;
class GPUComputePassDescriptor; class GPUComputePassDescriptor;
class GPUComputePassEncoder; class GPUComputePassEncoder;
class GPUExtent3D;
class GPURenderPassDescriptor; class GPURenderPassDescriptor;
class GPURenderPassEncoder; class GPURenderPassEncoder;
class GPUTextureCopyView; class GPUTextureCopyView;
class UnsignedLongSequenceOrGPUExtent3DDict;
class GPUCommandEncoder : public DawnObject<DawnCommandEncoder> { class GPUCommandEncoder : public DawnObject<DawnCommandEncoder> {
DEFINE_WRAPPERTYPEINFO(); DEFINE_WRAPPERTYPEINFO();
...@@ -46,13 +47,16 @@ class GPUCommandEncoder : public DawnObject<DawnCommandEncoder> { ...@@ -46,13 +47,16 @@ class GPUCommandEncoder : public DawnObject<DawnCommandEncoder> {
uint64_t size); uint64_t size);
void copyBufferToTexture(GPUBufferCopyView* source, void copyBufferToTexture(GPUBufferCopyView* source,
GPUTextureCopyView* destination, GPUTextureCopyView* destination,
GPUExtent3D* copy_size); UnsignedLongSequenceOrGPUExtent3DDict& copy_size,
ExceptionState& exception_state);
void copyTextureToBuffer(GPUTextureCopyView* source, void copyTextureToBuffer(GPUTextureCopyView* source,
GPUBufferCopyView* destination, GPUBufferCopyView* destination,
GPUExtent3D* copy_size); UnsignedLongSequenceOrGPUExtent3DDict& copy_size,
ExceptionState& exception_state);
void copyTextureToTexture(GPUTextureCopyView* source, void copyTextureToTexture(GPUTextureCopyView* source,
GPUTextureCopyView* destination, GPUTextureCopyView* destination,
GPUExtent3D* copy_size); UnsignedLongSequenceOrGPUExtent3DDict& copy_size,
ExceptionState& exception_state);
void pushDebugGroup(String groupLabel); void pushDebugGroup(String groupLabel);
void popDebugGroup(); void popDebugGroup();
void insertDebugMarker(String markerLabel); void insertDebugMarker(String markerLabel);
......
...@@ -17,17 +17,17 @@ ...@@ -17,17 +17,17 @@
GPUBufferSize dstOffset, GPUBufferSize dstOffset,
GPUBufferSize size); GPUBufferSize size);
void copyBufferToTexture( [RaisesException] void copyBufferToTexture(
GPUBufferCopyView source, GPUBufferCopyView source,
GPUTextureCopyView destination, GPUTextureCopyView destination,
GPUExtent3D copySize); GPUExtent3D copySize);
void copyTextureToBuffer( [RaisesException] void copyTextureToBuffer(
GPUTextureCopyView source, GPUTextureCopyView source,
GPUBufferCopyView destination, GPUBufferCopyView destination,
GPUExtent3D copySize); GPUExtent3D copySize);
void copyTextureToTexture( [RaisesException] void copyTextureToTexture(
GPUTextureCopyView source, GPUTextureCopyView source,
GPUTextureCopyView destination, GPUTextureCopyView destination,
GPUExtent3D copySize); GPUExtent3D copySize);
......
...@@ -173,8 +173,9 @@ ScriptPromise GPUDevice::createBufferMappedAsync( ...@@ -173,8 +173,9 @@ ScriptPromise GPUDevice::createBufferMappedAsync(
return promise; return promise;
} }
GPUTexture* GPUDevice::createTexture(const GPUTextureDescriptor* descriptor) { GPUTexture* GPUDevice::createTexture(const GPUTextureDescriptor* descriptor,
return GPUTexture::Create(this, descriptor); ExceptionState& exception_state) {
return GPUTexture::Create(this, descriptor, exception_state);
} }
GPUSampler* GPUDevice::createSampler(const GPUSamplerDescriptor* descriptor) { GPUSampler* GPUDevice::createSampler(const GPUSamplerDescriptor* descriptor) {
......
...@@ -78,7 +78,8 @@ class GPUDevice final : public EventTargetWithInlineData, ...@@ -78,7 +78,8 @@ class GPUDevice final : public EventTargetWithInlineData,
ScriptPromise createBufferMappedAsync(ScriptState* script_state, ScriptPromise createBufferMappedAsync(ScriptState* script_state,
const GPUBufferDescriptor* descriptor, const GPUBufferDescriptor* descriptor,
ExceptionState& exception_state); ExceptionState& exception_state);
GPUTexture* createTexture(const GPUTextureDescriptor* descriptor); GPUTexture* createTexture(const GPUTextureDescriptor* descriptor,
ExceptionState& exception_state);
GPUSampler* createSampler(const GPUSamplerDescriptor* descriptor); GPUSampler* createSampler(const GPUSamplerDescriptor* descriptor);
GPUBindGroup* createBindGroup(const GPUBindGroupDescriptor* descriptor); GPUBindGroup* createBindGroup(const GPUBindGroupDescriptor* descriptor);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
GPUBuffer createBuffer(GPUBufferDescriptor descriptor); GPUBuffer createBuffer(GPUBufferDescriptor descriptor);
[CallWith=ScriptState, RaisesException] GPUMappedBuffer createBufferMapped(GPUBufferDescriptor descriptor); [CallWith=ScriptState, RaisesException] GPUMappedBuffer createBufferMapped(GPUBufferDescriptor descriptor);
[CallWith=ScriptState, RaisesException] Promise<GPUMappedBuffer> createBufferMappedAsync(GPUBufferDescriptor descriptor); [CallWith=ScriptState, RaisesException] Promise<GPUMappedBuffer> createBufferMappedAsync(GPUBufferDescriptor descriptor);
GPUTexture createTexture(GPUTextureDescriptor descriptor); [RaisesException] GPUTexture createTexture(GPUTextureDescriptor descriptor);
GPUSampler createSampler(optional GPUSamplerDescriptor descriptor); GPUSampler createSampler(optional GPUSamplerDescriptor descriptor);
GPUBindGroup createBindGroup(GPUBindGroupDescriptor descriptor); GPUBindGroup createBindGroup(GPUBindGroupDescriptor descriptor);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// https://gpuweb.github.io/gpuweb/ // https://gpuweb.github.io/gpuweb/
dictionary GPUExtent3D { dictionary GPUExtent3DDict {
required unsigned long width; required unsigned long width;
required unsigned long height; required unsigned long height;
required unsigned long depth; required unsigned long depth;
......
...@@ -22,7 +22,7 @@ DawnTextureDescriptor AsDawnType(const GPUTextureDescriptor* webgpu_desc) { ...@@ -22,7 +22,7 @@ DawnTextureDescriptor AsDawnType(const GPUTextureDescriptor* webgpu_desc) {
dawn_desc.usage = static_cast<DawnTextureUsage>(webgpu_desc->usage()); dawn_desc.usage = static_cast<DawnTextureUsage>(webgpu_desc->usage());
dawn_desc.dimension = dawn_desc.dimension =
AsDawnEnum<DawnTextureDimension>(webgpu_desc->dimension()); AsDawnEnum<DawnTextureDimension>(webgpu_desc->dimension());
dawn_desc.size = AsDawnType(webgpu_desc->size()); dawn_desc.size = AsDawnType(&webgpu_desc->size());
dawn_desc.arrayLayerCount = webgpu_desc->arrayLayerCount(); dawn_desc.arrayLayerCount = webgpu_desc->arrayLayerCount();
dawn_desc.format = AsDawnEnum<DawnTextureFormat>(webgpu_desc->format()); dawn_desc.format = AsDawnEnum<DawnTextureFormat>(webgpu_desc->format());
dawn_desc.mipLevelCount = webgpu_desc->mipLevelCount(); dawn_desc.mipLevelCount = webgpu_desc->mipLevelCount();
...@@ -53,9 +53,19 @@ DawnTextureViewDescriptor AsDawnType( ...@@ -53,9 +53,19 @@ DawnTextureViewDescriptor AsDawnType(
// static // static
GPUTexture* GPUTexture::Create(GPUDevice* device, GPUTexture* GPUTexture::Create(GPUDevice* device,
const GPUTextureDescriptor* webgpu_desc) { const GPUTextureDescriptor* webgpu_desc,
ExceptionState& exception_state) {
DCHECK(device); DCHECK(device);
DCHECK(webgpu_desc); DCHECK(webgpu_desc);
// Check size is correctly formatted before further processing.
const UnsignedLongSequenceOrGPUExtent3DDict& size = webgpu_desc->size();
if (size.IsUnsignedLongSequence() &&
size.GetAsUnsignedLongSequence().size() != 3) {
exception_state.ThrowRangeError("size length must be 3");
return nullptr;
}
DawnTextureDescriptor dawn_desc = AsDawnType(webgpu_desc); DawnTextureDescriptor dawn_desc = AsDawnType(webgpu_desc);
return MakeGarbageCollected<GPUTexture>( return MakeGarbageCollected<GPUTexture>(
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
namespace blink { namespace blink {
class ExceptionState;
class GPUTextureDescriptor; class GPUTextureDescriptor;
class GPUTextureView; class GPUTextureView;
class GPUTextureViewDescriptor; class GPUTextureViewDescriptor;
...@@ -18,7 +19,8 @@ class GPUTexture : public DawnObject<DawnTexture> { ...@@ -18,7 +19,8 @@ class GPUTexture : public DawnObject<DawnTexture> {
public: public:
static GPUTexture* Create(GPUDevice* device, static GPUTexture* Create(GPUDevice* device,
const GPUTextureDescriptor* webgpu_desc); const GPUTextureDescriptor* webgpu_desc,
ExceptionState& exception_state);
explicit GPUTexture(GPUDevice* device, DawnTexture texture); explicit GPUTexture(GPUDevice* device, DawnTexture texture);
~GPUTexture() override; ~GPUTexture() override;
......
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