mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
DawnTest: Allow checking for device errors.
The previous assumption is that all validation tests would be unittests and that the end2end tests would always produce valid sequences of commands. This not true because we can't test the validation of backend-specific entrypoints in the unittests. BUG=dawn:112 Change-Id: I89e2fe017bf3ecf6a83c9e8cdf4324c33f95a721 Reviewed-on: https://dawn-review.googlesource.com/c/5100 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
31ac9850ad
commit
2dfb3f01e7
@@ -84,6 +84,7 @@ std::string ValidationTest::GetLastDeviceErrorMessage() const {
|
||||
return mDeviceErrorMessage;
|
||||
}
|
||||
|
||||
// static
|
||||
void ValidationTest::OnDeviceError(const char* message, dawnCallbackUserdata userdata) {
|
||||
auto self = reinterpret_cast<ValidationTest*>(static_cast<uintptr_t>(userdata));
|
||||
self->mDeviceErrorMessage = message;
|
||||
@@ -100,6 +101,7 @@ void ValidationTest::OnDeviceError(const char* message, dawnCallbackUserdata use
|
||||
self->mError = true;
|
||||
}
|
||||
|
||||
// static
|
||||
void ValidationTest::OnBuilderErrorStatus(dawnBuilderErrorStatus status, const char* message, dawn::CallbackUserdata userdata1, dawn::CallbackUserdata userdata2) {
|
||||
auto* self = reinterpret_cast<ValidationTest*>(static_cast<uintptr_t>(userdata1));
|
||||
size_t index = static_cast<size_t>(userdata2);
|
||||
|
||||
Reference in New Issue
Block a user