mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Replace dawn::CallbackUserdata with void*
This initial reasoning for having a u64 userdata was to be able to pack two u32s in a single userdata but that was never used, and made a bunch of code uglier than it should. BUG=dawn:160 Change-Id: Ia0d20bc23f09f5d8f3748ca4edd1a331604f2ba8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7561 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
26d3cf08c2
commit
839053b90c
@@ -40,7 +40,7 @@ ValidationTest::ValidationTest() {
|
||||
DawnProcTable procs = dawn_native::GetProcs();
|
||||
dawnSetProcs(&procs);
|
||||
|
||||
device.SetErrorCallback(ValidationTest::OnDeviceError, static_cast<DawnCallbackUserdata>(reinterpret_cast<uintptr_t>(this)));
|
||||
device.SetErrorCallback(ValidationTest::OnDeviceError, this);
|
||||
}
|
||||
|
||||
ValidationTest::~ValidationTest() {
|
||||
@@ -67,8 +67,8 @@ std::string ValidationTest::GetLastDeviceErrorMessage() const {
|
||||
}
|
||||
|
||||
// static
|
||||
void ValidationTest::OnDeviceError(const char* message, DawnCallbackUserdata userdata) {
|
||||
auto self = reinterpret_cast<ValidationTest*>(static_cast<uintptr_t>(userdata));
|
||||
void ValidationTest::OnDeviceError(const char* message, void* userdata) {
|
||||
auto self = static_cast<ValidationTest*>(userdata);
|
||||
self->mDeviceErrorMessage = message;
|
||||
|
||||
ASSERT_TRUE(self->mExpectError) << "Got unexpected device error: " << message;
|
||||
|
||||
Reference in New Issue
Block a user