Roll third_party/gpuweb/ 67edc187f..0aadaca4c (519 commits)

- Adds supports for the ETC2 and ASTC extensions.
 - Adds support for all texture formats supported by the spec.
 - Removes pipeline statistic queries.
 - Removes support for depthClamping since it has been reworked in a
   depthClipControl extension that Dawn doesn't implement yet.
 - Removes GPUCommandBuffer.getExecutionTime.
 - Adds support for GPUCommandBuffer.clearBuffer.
 - Removes writeTimestamp inside passes and adds TODO to add support for
   timestampWrites.

67edc187f5...0aadaca4c5

$ git log 67edc187f..0aadaca4c --date=short --no-merges --format='%ad %ae %s'
2022-01-07 dneto Clarify fract (#2485)
2022-01-07 dneto Clarify fract (#2485)
2022-01-07 dneto Clarify fract (#2485)
2022-01-06 dneto Behaviors: Ban obviously infinite loops (#2430)
2022-01-06 dneto Fix declaration-and-scope section for out-of-order decls (#2479)
2022-01-06 dneto Behaviors: Ban obviously infinite loops (#2430)
2022-01-06 dneto Fix declaration-and-scope section for out-of-order decls (#2479)
2022-01-06 dneto Behaviors: Ban obviously infinite loops (#2430)
2022-01-06 dneto Fix declaration-and-scope section for out-of-order decls (#2479)
2022-01-06 dneto Move Limits section to under "WGSL Program" (#2480)
2022-01-06 dneto Move Limits section to under "WGSL Program" (#2480)
2022-01-06 dneto Move Limits section to under "WGSL Program" (#2480)
2022-01-05 dneto [editorial] Rename "built-in variable" -> "built-in value" (#2476)
2022-01-05 dneto [editorial] Rename "built-in variable" -> "built-in value" (#2476)
2022-01-05 dneto [editorial] Rename "built-in variable" -> "built-in value" (#2476)
2022-01-05 dneto Only define image format names usable for storage textures (#2475)
2022-01-05 dneto Only define image format names usable for storage textures (#2475)
2022-01-05 dneto Only define image format names usable for storage textures (#2475)
2022-01-04 dneto Remove 'read','read_write','write' as keywords, image formats as keywords (#2474)
2022-01-04 dneto Remove 'read','read_write','write' as keywords, image formats as keywords (#2474)
2022-01-04 dneto Remove 'read','read_write','write' as keywords, image formats as keywords (#2474)
2022-01-04 jrprice [editorial] wgsl: left shifts are logical (#2472)
2022-01-04 jrprice [editorial] wgsl: left shifts are logical (#2472)
2022-01-04 jrprice [editorial] wgsl: left shifts are logical (#2472)
2022-01-04 dneto Deploying to gh-pages from @ gpuweb/gpuweb@7371fbf6d3 🚀
2021-12-30 kvarkus Texture format caps for MSAA and resolve (#2463)
2021-12-30 kvarkus Texture format caps for MSAA and resolve (#2463)
2021-12-30 kvarkus Texture format caps for MSAA and resolve (#2463)
2021-12-30 kainino Fully describe validation of render attachments (#2458)
2021-12-30 kainino Fully describe validation of render attachments (#2458)
2021-12-30 kainino Fully describe validation of render attachments (#2458)
2021-12-29 kainino Rework encoder state and mixins (#2452)
2021-12-29 kainino Rework encoder state and mixins (#2452)
2021-12-29 kainino Rework encoder state and mixins (#2452)
2021-12-29 kainino1 Deploying to gh-pages from @ gpuweb/gpuweb@68fe77316d 🚀
2021-12-29 mehmetoguzderin Fix examples classes, globals, and previews (#2412)
2021-12-29 mehmetoguzderin Fix examples classes, globals, and previews (#2412)
2021-12-29 mehmetoguzderin Fix examples classes, globals, and previews (#2412)
2021-12-28 kainino Clarify that attachments may not alias (#2454)
2021-12-28 kainino Clarify that attachments may not alias (#2454)
2021-12-28 kainino Clarify that attachments may not alias (#2454)
2021-12-28 shaobo.yan Add source image orientation to copyExternalImageToTexture (#2376)
2021-12-28 shaobo.yan Add source image orientation to copyExternalImageToTexture (#2376)
2021-12-28 shaobo.yan Add source image orientation to copyExternalImageToTexture (#2376)
2021-12-28 kainino1 Deploying to gh-pages from @ gpuweb/gpuweb@e7224b9949 🚀
2021-12-24 kainino Restore the box around algorithm divs (#2453)
2021-12-24 kainino Restore the box around algorithm divs (#2453)
2021-12-24 kainino Restore the box around algorithm divs (#2453)
2021-12-24 kainino Define GPUTextureViewDimension values (#2455)
2021-12-24 kainino Define GPUTextureViewDimension values (#2455)
(...)
2021-10-14 dneto Deploying to gh-pages from @ gpuweb/gpuweb@6f239ffda6 🚀
2021-10-14 lokokung Add ETC2 and ASTC texture formats and feature name documentation (#2180)
2021-10-14 lokokung Add ETC2 and ASTC texture formats and feature name documentation (#2180)
2021-10-14 lokokung Add ETC2 and ASTC texture formats and feature name documentation (#2180)
2021-10-14 kvark Deploying to gh-pages from @ gpuweb/gpuweb@ab71f65a80 🚀
2021-10-13 dneto describe builtin functions as prototypes (#2178)
2021-10-13 dneto describe builtin functions as prototypes (#2178)
2021-10-13 dneto describe builtin functions as prototypes (#2178)
2021-10-13 dneto Integral pipeline IO must be specified interpolate(flat) (#2183)
2021-10-13 dneto Integral pipeline IO must be specified interpolate(flat) (#2183)
2021-10-13 dneto Integral pipeline IO must be specified interpolate(flat) (#2183)
2021-10-12 mehmetoguzderin Fix render by closing table (#2177)
2021-10-12 mehmetoguzderin Fix render by closing table (#2177)
2021-10-12 mehmetoguzderin Fix render by closing table (#2177)
2021-10-12 mehmetoguzderin Allow syntactic navigation and styling (#2143)
2021-10-12 mehmetoguzderin Allow syntactic navigation and styling (#2143)
2021-10-12 mehmetoguzderin Allow syntactic navigation and styling (#2143)
2021-10-12 dneto Deploying to gh-pages from @ gpuweb/gpuweb@59d839d767 🚀
2021-10-06 dneto wgsl: remove ignore, add phony-assignment (#2127)
2021-10-06 dneto wgsl: remove ignore, add phony-assignment (#2127)
2021-10-06 dneto wgsl: remove ignore, add phony-assignment (#2127)
2021-10-06 dneto wgsl: editorial cleanup: memory vs. storage (#2155)
2021-10-06 dneto wgsl: editorial cleanup: memory vs. storage (#2155)
2021-10-06 dneto wgsl: editorial cleanup: memory vs. storage (#2155)
2021-10-06 mehmetoguzderin Make hex exponent suffix optional for floats (#2164)
2021-10-06 mehmetoguzderin Make hex exponent suffix optional for floats (#2164)
2021-10-06 mehmetoguzderin Make hex exponent suffix optional for floats (#2164)
2021-10-06 dneto wgsl: Add limits section, and "spurious" failure (#1997)
2021-10-06 dneto wgsl: Add limits section, and "spurious" failure (#1997)
2021-10-06 dneto wgsl: Add limits section, and "spurious" failure (#1997)
2021-10-06 alanbaker Clarify memory locations accessed when writing a vector component (#2152)
2021-10-06 alanbaker Clarify memory locations accessed when writing a vector component (#2152)
2021-10-06 alanbaker Clarify memory locations accessed when writing a vector component (#2152)
2021-10-04 jrprice Fix inequality symbol in compute shader grid bound (#2153)
2021-10-04 jrprice Fix inequality symbol in compute shader grid bound (#2153)
2021-10-04 jrprice Fix inequality symbol in compute shader grid bound (#2153)
2021-10-04 jimb Fix some misplaced characters in the `select` description. (#2154)
2021-10-04 jimb Fix some misplaced characters in the `select` description. (#2154)
2021-10-04 jimb Fix some misplaced characters in the `select` description. (#2154)
2021-09-29 dneto wgsl: Function call statement may call non-void functions (#2148)
2021-09-29 dneto wgsl: Function call statement may call non-void functions (#2148)
2021-09-29 bclayton wgsl: Update README.md (#2150)
2021-09-29 dneto wgsl: Function call statement may call non-void functions (#2148)
2021-09-29 dneto Deploying to gh-pages from @ gpuweb/gpuweb@7e87583853 🚀
2021-09-28 kainino Remove no-op minBindingSize text (#2141)
2021-09-28 kainino Remove no-op minBindingSize text (#2141)
2021-09-28 kainino Remove no-op minBindingSize text (#2141)
2021-09-28 kainino Clarify copies into -srgb formats (#2146)
2021-09-28 kainino Clarify copies into -srgb formats (#2146)
2021-09-28 kainino Clarify copies into -srgb formats (#2146)

Created with:
  roll-dep third_party/gpuweb

Fixed: dawn:1130
Bug: dawn:1123
Change-Id: I9a9539696fbd0a4d15a7e3369959ac97b262d9d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75902
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2022-01-10 15:26:31 +00:00 committed by Dawn LUCI CQ
parent 6d9ee4254b
commit 0275a4c83b
13 changed files with 177 additions and 122 deletions

2
DEPS
View File

@ -162,7 +162,7 @@ deps = {
'condition': 'dawn_node',
},
'third_party/gpuweb': {
'url': '{github_git}/gpuweb/gpuweb.git@67edc187f5305a72456663c34d51153601b79f3b',
'url': '{github_git}/gpuweb/gpuweb.git@0aadaca4c53ca131aa19708c1d2b1bed56da1118',
'condition': 'dawn_node',
},

View File

@ -283,7 +283,8 @@ namespace wgpu::binding {
out = wgpu::TextureFormat::Stencil8;
return true;
case interop::GPUTextureFormat::kDepth16Unorm:
break; // TODO(crbug.com/dawn/1130): Unsupported.
out = wgpu::TextureFormat::Depth16Unorm;
return true;
case interop::GPUTextureFormat::kDepth24Plus:
out = wgpu::TextureFormat::Depth24Plus;
return true;
@ -293,6 +294,12 @@ namespace wgpu::binding {
case interop::GPUTextureFormat::kDepth32Float:
out = wgpu::TextureFormat::Depth32Float;
return true;
case interop::GPUTextureFormat::kDepth24UnormStencil8:
out = wgpu::TextureFormat::Depth24UnormStencil8;
return true;
case interop::GPUTextureFormat::kDepth32FloatStencil8:
out = wgpu::TextureFormat::Depth32FloatStencil8;
return true;
case interop::GPUTextureFormat::kBc1RgbaUnorm:
out = wgpu::TextureFormat::BC1RGBAUnorm;
return true;
@ -335,12 +342,121 @@ namespace wgpu::binding {
case interop::GPUTextureFormat::kBc7RgbaUnormSrgb:
out = wgpu::TextureFormat::BC7RGBAUnormSrgb;
return true;
case interop::GPUTextureFormat::kDepth24UnormStencil8:
break; // TODO(crbug.com/dawn/1130): Unsupported.
case interop::GPUTextureFormat::kDepth32FloatStencil8:
break; // TODO(crbug.com/dawn/1130): Unsupported.
case interop::GPUTextureFormat::kEtc2Rgb8Unorm:
out = wgpu::TextureFormat::ETC2RGB8Unorm;
return true;
case interop::GPUTextureFormat::kEtc2Rgb8UnormSrgb:
out = wgpu::TextureFormat::ETC2RGB8UnormSrgb;
return true;
case interop::GPUTextureFormat::kEtc2Rgb8A1Unorm:
out = wgpu::TextureFormat::ETC2RGB8A1Unorm;
return true;
case interop::GPUTextureFormat::kEtc2Rgb8A1UnormSrgb:
out = wgpu::TextureFormat::ETC2RGB8A1UnormSrgb;
return true;
case interop::GPUTextureFormat::kEtc2Rgba8Unorm:
out = wgpu::TextureFormat::ETC2RGBA8Unorm;
return true;
case interop::GPUTextureFormat::kEtc2Rgba8UnormSrgb:
out = wgpu::TextureFormat::ETC2RGBA8UnormSrgb;
return true;
case interop::GPUTextureFormat::kEacR11Unorm:
out = wgpu::TextureFormat::EACR11Unorm;
return true;
case interop::GPUTextureFormat::kEacR11Snorm:
out = wgpu::TextureFormat::EACR11Snorm;
return true;
case interop::GPUTextureFormat::kEacRg11Unorm:
out = wgpu::TextureFormat::EACRG11Unorm;
return true;
case interop::GPUTextureFormat::kEacRg11Snorm:
out = wgpu::TextureFormat::EACRG11Snorm;
return true;
case interop::GPUTextureFormat::kAstc4X4Unorm:
out = wgpu::TextureFormat::ASTC4x4Unorm;
return true;
case interop::GPUTextureFormat::kAstc4X4UnormSrgb:
out = wgpu::TextureFormat::ASTC4x4UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc5X4Unorm:
out = wgpu::TextureFormat::ASTC5x4Unorm;
return true;
case interop::GPUTextureFormat::kAstc5X4UnormSrgb:
out = wgpu::TextureFormat::ASTC5x4UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc5X5Unorm:
out = wgpu::TextureFormat::ASTC5x5Unorm;
return true;
case interop::GPUTextureFormat::kAstc5X5UnormSrgb:
out = wgpu::TextureFormat::ASTC5x5UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc6X5Unorm:
out = wgpu::TextureFormat::ASTC6x5Unorm;
return true;
case interop::GPUTextureFormat::kAstc6X5UnormSrgb:
out = wgpu::TextureFormat::ASTC6x5UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc6X6Unorm:
out = wgpu::TextureFormat::ASTC6x6Unorm;
return true;
case interop::GPUTextureFormat::kAstc6X6UnormSrgb:
out = wgpu::TextureFormat::ASTC6x6UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc8X5Unorm:
out = wgpu::TextureFormat::ASTC8x5Unorm;
return true;
case interop::GPUTextureFormat::kAstc8X5UnormSrgb:
out = wgpu::TextureFormat::ASTC8x5UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc8X6Unorm:
out = wgpu::TextureFormat::ASTC8x6Unorm;
return true;
case interop::GPUTextureFormat::kAstc8X6UnormSrgb:
out = wgpu::TextureFormat::ASTC8x6UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc8X8Unorm:
out = wgpu::TextureFormat::ASTC8x8Unorm;
return true;
case interop::GPUTextureFormat::kAstc8X8UnormSrgb:
out = wgpu::TextureFormat::ASTC8x8UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc10X5Unorm:
out = wgpu::TextureFormat::ASTC10x5Unorm;
return true;
case interop::GPUTextureFormat::kAstc10X5UnormSrgb:
out = wgpu::TextureFormat::ASTC10x5UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc10X6Unorm:
out = wgpu::TextureFormat::ASTC10x6Unorm;
return true;
case interop::GPUTextureFormat::kAstc10X6UnormSrgb:
out = wgpu::TextureFormat::ASTC10x6UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc10X8Unorm:
out = wgpu::TextureFormat::ASTC10x8Unorm;
return true;
case interop::GPUTextureFormat::kAstc10X8UnormSrgb:
out = wgpu::TextureFormat::ASTC10x8UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc10X10Unorm:
out = wgpu::TextureFormat::ASTC10x10Unorm;
return true;
case interop::GPUTextureFormat::kAstc10X10UnormSrgb:
out = wgpu::TextureFormat::ASTC10x10UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc12X10Unorm:
out = wgpu::TextureFormat::ASTC12x10Unorm;
return true;
case interop::GPUTextureFormat::kAstc12X10UnormSrgb:
out = wgpu::TextureFormat::ASTC12x12UnormSrgb;
return true;
case interop::GPUTextureFormat::kAstc12X12Unorm:
out = wgpu::TextureFormat::ASTC12x12Unorm;
return true;
case interop::GPUTextureFormat::kAstc12X12UnormSrgb:
out = wgpu::TextureFormat::ASTC12x12UnormSrgb;
return true;
}
// TODO(crbug.com/dawn/1130): Add ASTC and ETC formats.
Napi::Error::New(env, "invalid value for GPUTextureFormat").ThrowAsJavaScriptException();
return false;
}
@ -1064,9 +1180,6 @@ namespace wgpu::binding {
case interop::GPUQueryType::kOcclusion:
out = wgpu::QueryType::Occlusion;
return true;
case interop::GPUQueryType::kPipelineStatistics:
out = wgpu::QueryType::PipelineStatistics;
return true;
case interop::GPUQueryType::kTimestamp:
out = wgpu::QueryType::Timestamp;
return true;
@ -1075,31 +1188,6 @@ namespace wgpu::binding {
return false;
}
bool Converter::Convert(wgpu::PipelineStatisticName& out,
const interop::GPUPipelineStatisticName& in) {
out = wgpu::PipelineStatisticName::VertexShaderInvocations;
switch (in) {
case interop::GPUPipelineStatisticName::kVertexShaderInvocations:
out = wgpu::PipelineStatisticName::VertexShaderInvocations;
return true;
case interop::GPUPipelineStatisticName::kClipperInvocations:
out = wgpu::PipelineStatisticName::ClipperInvocations;
return true;
case interop::GPUPipelineStatisticName::kClipperPrimitivesOut:
out = wgpu::PipelineStatisticName::ClipperPrimitivesOut;
return true;
case interop::GPUPipelineStatisticName::kFragmentShaderInvocations:
out = wgpu::PipelineStatisticName::FragmentShaderInvocations;
return true;
case interop::GPUPipelineStatisticName::kComputeShaderInvocations:
out = wgpu::PipelineStatisticName::ComputeShaderInvocations;
return true;
}
Napi::Error::New(env, "invalid value for GPUPipelineStatisticName")
.ThrowAsJavaScriptException();
return false;
}
bool Converter::Convert(wgpu::AddressMode& out, const interop::GPUAddressMode& in) {
out = wgpu::AddressMode::Repeat;
switch (in) {

View File

@ -241,9 +241,6 @@ namespace wgpu::binding {
[[nodiscard]] bool Convert(wgpu::QueryType& out, const interop::GPUQueryType& in);
[[nodiscard]] bool Convert(wgpu::PipelineStatisticName& out,
const interop::GPUPipelineStatisticName& in);
[[nodiscard]] bool Convert(wgpu::AddressMode& out, const interop::GPUAddressMode& in);
[[nodiscard]] bool Convert(wgpu::FilterMode& out, const interop::GPUFilterMode& in);

View File

@ -59,22 +59,31 @@ namespace wgpu::binding {
class Features : public interop::GPUSupportedFeatures {
public:
Features(WGPUDeviceProperties properties) {
if (properties.depthClamping) {
enabled_.emplace(interop::GPUFeatureName::kDepthClamping);
if (properties.depth24UnormStencil8) {
enabled_.emplace(interop::GPUFeatureName::kDepth24UnormStencil8);
}
if (properties.pipelineStatisticsQuery) {
enabled_.emplace(interop::GPUFeatureName::kPipelineStatisticsQuery);
if (properties.depth32FloatStencil8) {
enabled_.emplace(interop::GPUFeatureName::kDepth32FloatStencil8);
}
if (properties.timestampQuery) {
enabled_.emplace(interop::GPUFeatureName::kTimestampQuery);
}
if (properties.textureCompressionBC) {
enabled_.emplace(interop::GPUFeatureName::kTextureCompressionBc);
}
if (properties.textureCompressionETC2) {
enabled_.emplace(interop::GPUFeatureName::kTextureCompressionEtc2);
}
if (properties.textureCompressionASTC) {
enabled_.emplace(interop::GPUFeatureName::kTextureCompressionAstc);
}
if (properties.timestampQuery) {
enabled_.emplace(interop::GPUFeatureName::kTimestampQuery);
}
// TODO(crbug.com/dawn/1130)
// interop::GPUFeatureName::kDepth24UnormStencil8:
// interop::GPUFeatureName::kDepth32FloatStencil8:
// TODO(dawn:1123) add support for these extensions when possible.
// wgpu::interop::GPUFeatureName::kIndirectFirstInstance
// wgpu::interop::GPUFeatureName::kDepthClipControl
}
bool has(interop::GPUFeatureName feature) {
@ -175,21 +184,28 @@ namespace wgpu::binding {
// See src/dawn_native/Features.cpp for enum <-> string mappings.
for (auto required : descriptor.requiredFeatures) {
switch (required) {
case interop::GPUFeatureName::kDepthClamping:
requiredFeatures.emplace_back(wgpu::FeatureName::DepthClamping);
continue;
case interop::GPUFeatureName::kPipelineStatisticsQuery:
requiredFeatures.emplace_back(wgpu::FeatureName::PipelineStatisticsQuery);
continue;
case interop::GPUFeatureName::kTextureCompressionBc:
requiredFeatures.emplace_back(wgpu::FeatureName::TextureCompressionBC);
continue;
case interop::GPUFeatureName::kTextureCompressionEtc2:
requiredFeatures.emplace_back(wgpu::FeatureName::TextureCompressionETC2);
continue;
case interop::GPUFeatureName::kTextureCompressionAstc:
requiredFeatures.emplace_back(wgpu::FeatureName::TextureCompressionASTC);
continue;
case interop::GPUFeatureName::kTimestampQuery:
requiredFeatures.emplace_back(wgpu::FeatureName::TimestampQuery);
continue;
case interop::GPUFeatureName::kDepth24UnormStencil8:
requiredFeatures.emplace_back(wgpu::FeatureName::Depth24UnormStencil8);
continue;
case interop::GPUFeatureName::kDepth32FloatStencil8:
continue; // TODO(crbug.com/dawn/1130)
requiredFeatures.emplace_back(wgpu::FeatureName::Depth32FloatStencil8);
continue;
case interop::GPUFeatureName::kDepthClipControl:
case interop::GPUFeatureName::kIndirectFirstInstance:
// TODO(dawn:1123) Add support for these extensions when possible.
continue;
}
UNIMPLEMENTED("required: ", required);
}

View File

@ -25,10 +25,6 @@ namespace wgpu::binding {
GPUCommandBuffer::GPUCommandBuffer(wgpu::CommandBuffer cmd_buf) : cmd_buf_(std::move(cmd_buf)) {
}
interop::Promise<double> GPUCommandBuffer::getExecutionTime(Napi::Env) {
UNIMPLEMENTED();
};
std::optional<std::string> GPUCommandBuffer::getLabel(Napi::Env) {
UNIMPLEMENTED();
}

View File

@ -34,7 +34,6 @@ namespace wgpu::binding {
}
// interop::GPUCommandBuffer interface compliance
interop::Promise<double> getExecutionTime(Napi::Env) override;
std::optional<std::string> getLabel(Napi::Env) override;
void setLabel(Napi::Env, std::optional<std::string> value) override;

View File

@ -38,12 +38,14 @@ namespace wgpu::binding {
Converter conv(env);
wgpu::RenderPassDescriptor desc{};
// TODO(dawn:1250) handle timestampWrites
if (!conv(desc.colorAttachments, desc.colorAttachmentCount, descriptor.colorAttachments) ||
!conv(desc.depthStencilAttachment, descriptor.depthStencilAttachment) ||
!conv(desc.label, descriptor.label) ||
!conv(desc.occlusionQuerySet, descriptor.occlusionQuerySet)) {
return {};
}
return interop::GPURenderPassEncoder::Create<GPURenderPassEncoder>(
env, enc_.BeginRenderPass(&desc));
}
@ -52,10 +54,27 @@ namespace wgpu::binding {
Napi::Env env,
interop::GPUComputePassDescriptor descriptor) {
wgpu::ComputePassDescriptor desc{};
// TODO(dawn:1250) handle timestampWrites
return interop::GPUComputePassEncoder::Create<GPUComputePassEncoder>(
env, enc_.BeginComputePass(&desc));
}
void GPUCommandEncoder::clearBuffer(Napi::Env env,
interop::Interface<interop::GPUBuffer> buffer,
interop::GPUSize64 offset,
std::optional<interop::GPUSize64> size) {
Converter conv(env);
wgpu::Buffer b{};
uint64_t s = wgpu::kWholeSize;
if (!conv(b, buffer) || //
!conv(s, size)) {
return;
}
enc_.ClearBuffer(b, offset, s);
}
void GPUCommandEncoder::copyBufferToBuffer(Napi::Env env,
interop::Interface<interop::GPUBuffer> source,
interop::GPUSize64 sourceOffset,

View File

@ -35,6 +35,10 @@ namespace wgpu::binding {
interop::Interface<interop::GPUComputePassEncoder> beginComputePass(
Napi::Env,
interop::GPUComputePassDescriptor descriptor) override;
void clearBuffer(Napi::Env,
interop::Interface<interop::GPUBuffer> buffer,
interop::GPUSize64 offset,
std::optional<interop::GPUSize64> size) override;
void copyBufferToBuffer(Napi::Env,
interop::Interface<interop::GPUBuffer> source,
interop::GPUSize64 sourceOffset,

View File

@ -50,30 +50,6 @@ namespace wgpu::binding {
enc_.DispatchIndirect(*indirectBuffer.As<GPUBuffer>(), indirectOffset);
}
void GPUComputePassEncoder::beginPipelineStatisticsQuery(
Napi::Env,
interop::Interface<interop::GPUQuerySet> querySet,
interop::GPUSize32 queryIndex) {
UNIMPLEMENTED();
}
void GPUComputePassEncoder::endPipelineStatisticsQuery(Napi::Env) {
UNIMPLEMENTED();
}
void GPUComputePassEncoder::writeTimestamp(Napi::Env env,
interop::Interface<interop::GPUQuerySet> querySet,
interop::GPUSize32 queryIndex) {
Converter conv(env);
wgpu::QuerySet q{};
if (!conv(q, querySet)) {
return;
}
enc_.WriteTimestamp(q, queryIndex);
}
void GPUComputePassEncoder::endPass(Napi::Env) {
enc_.EndPass();
}

View File

@ -43,13 +43,6 @@ namespace wgpu::binding {
void dispatchIndirect(Napi::Env,
interop::Interface<interop::GPUBuffer> indirectBuffer,
interop::GPUSize64 indirectOffset) override;
void beginPipelineStatisticsQuery(Napi::Env,
interop::Interface<interop::GPUQuerySet> querySet,
interop::GPUSize32 queryIndex) override;
void endPipelineStatisticsQuery(Napi::Env) override;
void writeTimestamp(Napi::Env,
interop::Interface<interop::GPUQuerySet> querySet,
interop::GPUSize32 queryIndex) override;
void endPass(Napi::Env) override;
void setBindGroup(Napi::Env,
interop::GPUIndex32 index,

View File

@ -413,9 +413,7 @@ namespace wgpu::binding {
wgpu::QuerySetDescriptor desc{};
if (!conv(desc.label, descriptor.label) || !conv(desc.type, descriptor.type) ||
!conv(desc.count, descriptor.count) ||
!conv(desc.pipelineStatistics, desc.pipelineStatisticsCount,
descriptor.pipelineStatistics)) {
!conv(desc.count, descriptor.count)) {
return {};
}

View File

@ -71,30 +71,6 @@ namespace wgpu::binding {
enc_.EndOcclusionQuery();
}
void GPURenderPassEncoder::beginPipelineStatisticsQuery(
Napi::Env,
interop::Interface<interop::GPUQuerySet> querySet,
interop::GPUSize32 queryIndex) {
UNIMPLEMENTED();
}
void GPURenderPassEncoder::endPipelineStatisticsQuery(Napi::Env) {
UNIMPLEMENTED();
}
void GPURenderPassEncoder::writeTimestamp(Napi::Env env,
interop::Interface<interop::GPUQuerySet> querySet,
interop::GPUSize32 queryIndex) {
Converter conv(env);
wgpu::QuerySet q{};
if (!conv(q, querySet)) {
return;
}
enc_.WriteTimestamp(q, queryIndex);
}
void GPURenderPassEncoder::executeBundles(
Napi::Env env,
std::vector<interop::Interface<interop::GPURenderBundle>> bundles_in) {

View File

@ -50,13 +50,6 @@ namespace wgpu::binding {
void setStencilReference(Napi::Env, interop::GPUStencilValue reference) override;
void beginOcclusionQuery(Napi::Env, interop::GPUSize32 queryIndex) override;
void endOcclusionQuery(Napi::Env) override;
void beginPipelineStatisticsQuery(Napi::Env,
interop::Interface<interop::GPUQuerySet> querySet,
interop::GPUSize32 queryIndex) override;
void endPipelineStatisticsQuery(Napi::Env) override;
void writeTimestamp(Napi::Env,
interop::Interface<interop::GPUQuerySet> querySet,
interop::GPUSize32 queryIndex) override;
void executeBundles(
Napi::Env,
std::vector<interop::Interface<interop::GPURenderBundle>> bundles) override;