summaryrefslogtreecommitdiffstats
path: root/dom/webgpu/ComputePassEncoder.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/webgpu/ComputePassEncoder.cpp
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/webgpu/ComputePassEncoder.cpp')
-rw-r--r--dom/webgpu/ComputePassEncoder.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/dom/webgpu/ComputePassEncoder.cpp b/dom/webgpu/ComputePassEncoder.cpp
index 2820a575e8..190bbf00a7 100644
--- a/dom/webgpu/ComputePassEncoder.cpp
+++ b/dom/webgpu/ComputePassEncoder.cpp
@@ -17,13 +17,13 @@ GPU_IMPL_CYCLE_COLLECTION(ComputePassEncoder, mParent, mUsedBindGroups,
mUsedPipelines)
GPU_IMPL_JS_WRAP(ComputePassEncoder)
-void ffiWGPUComputePassDeleter::operator()(ffi::WGPUComputePass* raw) {
+void ffiWGPUComputePassDeleter::operator()(ffi::WGPURecordedComputePass* raw) {
if (raw) {
ffi::wgpu_compute_pass_destroy(raw);
}
}
-ffi::WGPUComputePass* BeginComputePass(
+ffi::WGPURecordedComputePass* BeginComputePass(
RawId aEncoderId, const dom::GPUComputePassDescriptor& aDesc) {
MOZ_RELEASE_ASSERT(aEncoderId);
ffi::WGPUComputePassDescriptor desc = {};
@@ -31,7 +31,7 @@ ffi::WGPUComputePass* BeginComputePass(
webgpu::StringHelper label(aDesc.mLabel);
desc.label = label.Get();
- return ffi::wgpu_command_encoder_begin_compute_pass(aEncoderId, &desc);
+ return ffi::wgpu_command_encoder_begin_compute_pass(&desc);
}
ComputePassEncoder::ComputePassEncoder(
@@ -49,16 +49,16 @@ void ComputePassEncoder::SetBindGroup(
const dom::Sequence<uint32_t>& aDynamicOffsets) {
if (mValid) {
mUsedBindGroups.AppendElement(&aBindGroup);
- ffi::wgpu_compute_pass_set_bind_group(mPass.get(), aSlot, aBindGroup.mId,
- aDynamicOffsets.Elements(),
- aDynamicOffsets.Length());
+ ffi::wgpu_recorded_compute_pass_set_bind_group(
+ mPass.get(), aSlot, aBindGroup.mId, aDynamicOffsets.Elements(),
+ aDynamicOffsets.Length());
}
}
void ComputePassEncoder::SetPipeline(const ComputePipeline& aPipeline) {
if (mValid) {
mUsedPipelines.AppendElement(&aPipeline);
- ffi::wgpu_compute_pass_set_pipeline(mPass.get(), aPipeline.mId);
+ ffi::wgpu_recorded_compute_pass_set_pipeline(mPass.get(), aPipeline.mId);
}
}
@@ -66,7 +66,7 @@ void ComputePassEncoder::DispatchWorkgroups(uint32_t workgroupCountX,
uint32_t workgroupCountY,
uint32_t workgroupCountZ) {
if (mValid) {
- ffi::wgpu_compute_pass_dispatch_workgroups(
+ ffi::wgpu_recorded_compute_pass_dispatch_workgroups(
mPass.get(), workgroupCountX, workgroupCountY, workgroupCountZ);
}
}
@@ -74,7 +74,7 @@ void ComputePassEncoder::DispatchWorkgroups(uint32_t workgroupCountX,
void ComputePassEncoder::DispatchWorkgroupsIndirect(
const Buffer& aIndirectBuffer, uint64_t aIndirectOffset) {
if (mValid) {
- ffi::wgpu_compute_pass_dispatch_workgroups_indirect(
+ ffi::wgpu_recorded_compute_pass_dispatch_workgroups_indirect(
mPass.get(), aIndirectBuffer.mId, aIndirectOffset);
}
}
@@ -82,18 +82,20 @@ void ComputePassEncoder::DispatchWorkgroupsIndirect(
void ComputePassEncoder::PushDebugGroup(const nsAString& aString) {
if (mValid) {
const NS_ConvertUTF16toUTF8 utf8(aString);
- ffi::wgpu_compute_pass_push_debug_group(mPass.get(), utf8.get(), 0);
+ ffi::wgpu_recorded_compute_pass_push_debug_group(mPass.get(), utf8.get(),
+ 0);
}
}
void ComputePassEncoder::PopDebugGroup() {
if (mValid) {
- ffi::wgpu_compute_pass_pop_debug_group(mPass.get());
+ ffi::wgpu_recorded_compute_pass_pop_debug_group(mPass.get());
}
}
void ComputePassEncoder::InsertDebugMarker(const nsAString& aString) {
if (mValid) {
const NS_ConvertUTF16toUTF8 utf8(aString);
- ffi::wgpu_compute_pass_insert_debug_marker(mPass.get(), utf8.get(), 0);
+ ffi::wgpu_recorded_compute_pass_insert_debug_marker(mPass.get(), utf8.get(),
+ 0);
}
}