Skip to content

Commit

Permalink
[dawn][emscripten] Fix missing constructor initializations for events.
Browse files Browse the repository at this point in the history
- Adds crucial initializers in some of the events that were missed
  in the initial implementation.

Bug: 369445681, 372080121
Change-Id: Id5d8502d59e2441266a7866ed39f29f494e18747
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/211939
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
  • Loading branch information
lokokung authored and Dawn LUCI CQ committed Oct 24, 2024
1 parent e6f35ad commit fba87da
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions third_party/emdawnwebgpu/webgpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,11 @@ class CompilationInfoEvent final : public TrackedEvent {
CompilationInfoEvent(InstanceID instance,
WGPUShaderModule shader,
const WGPUCompilationInfoCallbackInfo2& callbackInfo)
: TrackedEvent(instance, callbackInfo.mode), mShader(shader) {}
: TrackedEvent(instance, callbackInfo.mode),
mCallback(callbackInfo.callback),
mUserdata1(callbackInfo.userdata1),
mUserdata2(callbackInfo.userdata2),
mShader(shader) {}

EventType GetType() override { return kType; }

Expand Down Expand Up @@ -946,7 +950,11 @@ class MapAsyncEvent final : public TrackedEvent {
MapAsyncEvent(InstanceID instance,
WGPUBuffer buffer,
const WGPUBufferMapCallbackInfo2& callbackInfo)
: TrackedEvent(instance, callbackInfo.mode), mBuffer(buffer) {}
: TrackedEvent(instance, callbackInfo.mode),
mCallback(callbackInfo.callback),
mUserdata1(callbackInfo.userdata1),
mUserdata2(callbackInfo.userdata2),
mBuffer(buffer) {}

EventType GetType() override { return kType; }

Expand Down

0 comments on commit fba87da

Please sign in to comment.