[dawn][headers] Remove ifdefs to for InstanceDropped renames.
- Dawn change has landed and rolled so remove the ifdefs. Bug: 403612359 Change-Id: Iaf01e0771c7c077a6d3883918e241567b3dd4ba7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6410274 Commit-Queue: Loko Kung <lokokung@google.com> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Auto-Submit: Loko Kung <lokokung@google.com> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Cr-Commit-Position: refs/heads/main@{#1439827}
This commit is contained in:
parent
2ccca9e31f
commit
a29762124d
gpu/command_buffer/service
third_party/blink/renderer/modules/webgpu
@ -1612,17 +1612,10 @@ WebGPUDecoderImpl::CreateQueuedRequestDeviceCallback(
|
||||
decoder->RequestDeviceImpl(adapter.Get(), descriptor.get(),
|
||||
callback_info);
|
||||
} else {
|
||||
#ifdef WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
callback_info.callback(
|
||||
WGPURequestDeviceStatus_CallbackCancelled, nullptr,
|
||||
MakeStringView("Queued device request cancelled."),
|
||||
callback_info.userdata1, callback_info.userdata2);
|
||||
#else
|
||||
callback_info.callback(
|
||||
WGPURequestDeviceStatus_InstanceDropped, nullptr,
|
||||
MakeStringView("Queued device request cancelled."),
|
||||
callback_info.userdata1, callback_info.userdata2);
|
||||
#endif // WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
}
|
||||
},
|
||||
base::Unretained(this), adapter, std::move(desc), callback_info);
|
||||
|
@ -215,11 +215,7 @@ void GPU::OnRequestAdapterCallback(
|
||||
// there are error messages.
|
||||
case wgpu::RequestAdapterStatus::Unavailable:
|
||||
case wgpu::RequestAdapterStatus::Error:
|
||||
#ifdef WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
case wgpu::RequestAdapterStatus::CallbackCancelled:
|
||||
#else
|
||||
case wgpu::RequestAdapterStatus::InstanceDropped:
|
||||
#endif // WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
break;
|
||||
}
|
||||
if (error_message.length != 0) {
|
||||
|
@ -236,11 +236,7 @@ void GPUAdapter::OnRequestDeviceCallback(
|
||||
}
|
||||
|
||||
case wgpu::RequestDeviceStatus::Error:
|
||||
#ifdef WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
case wgpu::RequestDeviceStatus::CallbackCancelled:
|
||||
#else
|
||||
case wgpu::RequestDeviceStatus::InstanceDropped:
|
||||
#endif // WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
if (dawn_device) {
|
||||
// A device provided with an error is already a lost device on the Dawn
|
||||
// side, reflect that by resolving the lost property immediately.
|
||||
|
@ -382,11 +382,7 @@ void GPUBuffer::OnMapAsyncCallback(
|
||||
case wgpu::MapAsyncStatus::Success:
|
||||
resolver->Resolve();
|
||||
break;
|
||||
#ifdef WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
case wgpu::MapAsyncStatus::CallbackCancelled:
|
||||
#else
|
||||
case wgpu::MapAsyncStatus::InstanceDropped:
|
||||
#endif // WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
resolver->RejectWithDOMException(DOMExceptionCode::kAbortError,
|
||||
String::FromUTF8(message));
|
||||
break;
|
||||
|
@ -445,12 +445,7 @@ void GPUDevice::OnCreateRenderPipelineAsyncCallback(
|
||||
}
|
||||
|
||||
case wgpu::CreatePipelineAsyncStatus::InternalError:
|
||||
#ifdef WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
case wgpu::CreatePipelineAsyncStatus::CallbackCancelled:
|
||||
#else
|
||||
case wgpu::CreatePipelineAsyncStatus::InstanceDropped:
|
||||
#endif // WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
{
|
||||
case wgpu::CreatePipelineAsyncStatus::CallbackCancelled: {
|
||||
resolver->Reject(GPUPipelineError::Create(
|
||||
script_state->GetIsolate(), StringFromASCIIAndUTF8(message),
|
||||
V8GPUPipelineErrorReason::Enum::kInternal));
|
||||
@ -482,12 +477,7 @@ void GPUDevice::OnCreateComputePipelineAsyncCallback(
|
||||
}
|
||||
|
||||
case wgpu::CreatePipelineAsyncStatus::InternalError:
|
||||
#ifdef WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
case wgpu::CreatePipelineAsyncStatus::CallbackCancelled:
|
||||
#else
|
||||
case wgpu::CreatePipelineAsyncStatus::InstanceDropped:
|
||||
#endif // WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
{
|
||||
case wgpu::CreatePipelineAsyncStatus::CallbackCancelled: {
|
||||
resolver->Reject(GPUPipelineError::Create(
|
||||
script_state->GetIsolate(), StringFromASCIIAndUTF8(message),
|
||||
V8GPUPipelineErrorReason::Enum::kInternal));
|
||||
@ -702,11 +692,7 @@ void GPUDevice::OnPopErrorScopeCallback(
|
||||
wgpu::ErrorType type,
|
||||
wgpu::StringView message) {
|
||||
switch (status) {
|
||||
#ifdef WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
case wgpu::PopErrorScopeStatus::CallbackCancelled:
|
||||
#else
|
||||
case wgpu::PopErrorScopeStatus::InstanceDropped:
|
||||
#endif // WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
resolver->RejectWithDOMException(DOMExceptionCode::kOperationError,
|
||||
"Instance dropped in popErrorScope");
|
||||
return;
|
||||
|
@ -10,11 +10,7 @@ GPUDeviceLostInfo::GPUDeviceLostInfo(const wgpu::DeviceLostReason reason,
|
||||
const String& message) {
|
||||
switch (reason) {
|
||||
case wgpu::DeviceLostReason::Unknown:
|
||||
#ifdef WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
case wgpu::DeviceLostReason::CallbackCancelled:
|
||||
#else
|
||||
case wgpu::DeviceLostReason::InstanceDropped:
|
||||
#endif // WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
case wgpu::DeviceLostReason::FailedCreation:
|
||||
reason_ = V8GPUDeviceLostReason::Enum::kUnknown;
|
||||
break;
|
||||
|
@ -445,11 +445,7 @@ void OnWorkDoneCallback(ScriptPromiseResolver<IDLUndefined>* resolver,
|
||||
DOMExceptionCode::kOperationError,
|
||||
"Unexpected failure in onSubmittedWorkDone");
|
||||
break;
|
||||
#ifdef WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
case wgpu::QueueWorkDoneStatus::CallbackCancelled:
|
||||
#else
|
||||
case wgpu::QueueWorkDoneStatus::InstanceDropped:
|
||||
#endif // WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
resolver->RejectWithDOMException(
|
||||
DOMExceptionCode::kOperationError,
|
||||
"Instance dropped in onSubmittedWorkDone");
|
||||
|
@ -91,11 +91,7 @@ void GPUShaderModule::OnCompilationInfoCallback(
|
||||
switch (status) {
|
||||
case wgpu::CompilationInfoRequestStatus::Success:
|
||||
NOTREACHED();
|
||||
#ifdef WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
case wgpu::CompilationInfoRequestStatus::CallbackCancelled:
|
||||
#else
|
||||
case wgpu::CompilationInfoRequestStatus::InstanceDropped:
|
||||
#endif // WGPU_BREAKING_CHANGE_INSTANCE_DROPPED_RENAME
|
||||
message = "Instance dropped error in getCompilationInfo";
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user