Commit 3744f228 authored by Austin Eng's avatar Austin Eng Committed by Commit Bot

Roll src/third_party/dawn b9b088f57e3d..f0b17d00b98d (5 commits)

https://dawn.googlesource.com/dawn.git/+log/b9b088f57e3d..f0b17d00b98d

git log b9b088f57e3d..f0b17d00b98d --date=short --no-merges --format='%ad %ae %s'
2019-08-27 kainino@chromium.org Use TextureFormat::None for RenderBundleEncoder and AttachmentState
2019-08-27 enga@chromium.org Rename SetErrorCallback to SetUncapturedErrorCallback
2019-08-27 enga@chromium.org Rename DeviceErrorCallback to ErrorCallback and add ErrorType arg
2019-08-27 enga@chromium.org Rename ContextLost to DeviceLost
2019-08-27 kainino@chromium.org Remove Texture::createDefaultView

Created with:
  gclient setdep -r src/third_party/dawn@f0b17d00b98d

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-chromium-autoroll
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

CQ_INCLUDE_TRYBOTS=luci.chromium.try:dawn-linux-x64-deps-rel;luci.chromium.try:dawn-mac-x64-deps-rel;luci.chromium.try:dawn-win10-x64-deps-rel;luci.chromium.try:dawn-win10-x86-deps-rel
Bug: None
TBR=cwallez@chromium.org

Change-Id: I415cce5f3e1e5210ed61ff77c69c044bebfd0b58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772492
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: default avatarAustin Eng <enga@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691026}
parent 38d7bb60
......@@ -297,7 +297,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling feed
# and whatever else without interference from each other.
'dawn_revision': 'b9b088f57e3d4567b9441251170cf1719125b2d1',
'dawn_revision': 'f0b17d00b98d13918cd24a865fcef8dcbf66adbd',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling feed
# and whatever else without interference from each other.
......
......@@ -294,7 +294,7 @@ TEST_F(SharedImageBackingFactoryIOSurfaceTest, Dawn_SkiaGL) {
dawn_representation->BeginAccess(DAWN_TEXTURE_USAGE_OUTPUT_ATTACHMENT));
dawn::RenderPassColorAttachmentDescriptor color_desc;
color_desc.attachment = texture.CreateDefaultView();
color_desc.attachment = texture.CreateView();
color_desc.resolveTarget = nullptr;
color_desc.loadOp = dawn::LoadOp::Clear;
color_desc.storeOp = dawn::StoreOp::Store;
......
......@@ -36,14 +36,18 @@ void ToMockBufferMapReadCallback(DawnBufferMapAsyncStatus status,
data_length, userdata);
}
class MockDeviceErrorCallback {
class MockUncapturedErrorCallback {
public:
MOCK_METHOD2(Call, void(const char* message, void* userdata));
MOCK_METHOD3(Call,
void(DawnErrorType type, const char* message, void* userdata));
};
std::unique_ptr<StrictMock<MockDeviceErrorCallback>> mock_device_error_callback;
void ToMockDeviceErrorCallback(const char* message, void* userdata) {
mock_device_error_callback->Call(message, userdata);
std::unique_ptr<StrictMock<MockUncapturedErrorCallback>>
mock_device_error_callback;
void ToMockUncapturedErrorCallback(DawnErrorType type,
const char* message,
void* userdata) {
mock_device_error_callback->Call(type, message, userdata);
}
} // namespace
......@@ -56,7 +60,7 @@ class WebGPUMailboxTest : public WebGPUTest {
mock_buffer_map_read_callback =
std::make_unique<StrictMock<MockBufferMapReadCallback>>();
mock_device_error_callback =
std::make_unique<StrictMock<MockDeviceErrorCallback>>();
std::make_unique<StrictMock<MockUncapturedErrorCallback>>();
}
void TearDown() override {
......@@ -103,7 +107,7 @@ TEST_F(WebGPUMailboxTest, WriteToMailboxThenReadFromIt) {
// Clear the texture using a render pass.
dawn::RenderPassColorAttachmentDescriptor color_desc;
color_desc.attachment = texture.CreateDefaultView();
color_desc.attachment = texture.CreateView();
color_desc.resolveTarget = nullptr;
color_desc.loadOp = dawn::LoadOp::Clear;
color_desc.storeOp = dawn::StoreOp::Store;
......@@ -209,7 +213,7 @@ TEST_F(WebGPUMailboxTest, ErrorWhenUsingTextureAfterDissociate) {
// Create the device, and expect a validation error.
dawn::Device device = dawn::Device::Acquire(webgpu()->GetDefaultDevice());
device.SetErrorCallback(ToMockDeviceErrorCallback, 0);
device.SetUncapturedErrorCallback(ToMockUncapturedErrorCallback, 0);
// Associate and immediately dissociate the image.
gpu::webgpu::ReservedTexture reservation =
......@@ -222,8 +226,10 @@ TEST_F(WebGPUMailboxTest, ErrorWhenUsingTextureAfterDissociate) {
webgpu()->DissociateMailbox(reservation.id, reservation.generation);
// Try using the texture, it should produce a validation error.
dawn::TextureView view = texture.CreateDefaultView();
EXPECT_CALL(*mock_device_error_callback, Call(_, _)).Times(1);
dawn::TextureView view = texture.CreateView();
EXPECT_CALL(*mock_device_error_callback,
Call(DAWN_ERROR_TYPE_VALIDATION, _, _))
.Times(1);
WaitForCompletion(device);
}
......
......@@ -169,7 +169,7 @@ void GPUBuffer::OnMapAsyncCallback(ScriptPromiseResolver* resolver,
DOMExceptionCode::kOperationError));
break;
case DAWN_BUFFER_MAP_ASYNC_STATUS_UNKNOWN:
case DAWN_BUFFER_MAP_ASYNC_STATUS_CONTEXT_LOST:
case DAWN_BUFFER_MAP_ASYNC_STATUS_DEVICE_LOST:
resolver->Reject(
MakeGarbageCollected<DOMException>(DOMExceptionCode::kAbortError));
break;
......
......@@ -46,11 +46,11 @@ GPUDevice::GPUDevice(ExecutionContext* execution_context,
adapter_(adapter),
queue_(GPUQueue::Create(this, GetProcs().deviceCreateQueue(GetHandle()))),
error_callback_(
BindRepeatingDawnCallback(&GPUDevice::OnError,
BindRepeatingDawnCallback(&GPUDevice::OnUncapturedError,
WrapWeakPersistent(this),
WrapWeakPersistent(execution_context))) {
GetProcs().deviceSetErrorCallback(GetHandle(),
error_callback_->UnboundRepeatingCallback(),
GetProcs().deviceSetUncapturedErrorCallback(
GetHandle(), error_callback_->UnboundRepeatingCallback(),
error_callback_->AsUserdata());
}
......@@ -61,9 +61,11 @@ GPUDevice::~GPUDevice() {
GetProcs().deviceRelease(GetHandle());
}
void GPUDevice::OnError(ExecutionContext* execution_context,
void GPUDevice::OnUncapturedError(ExecutionContext* execution_context,
DawnErrorType errorType,
const char* message) {
if (execution_context) {
DCHECK_NE(errorType, DAWN_ERROR_TYPE_NO_ERROR);
LOG(ERROR) << "GPUDevice: " << message;
ConsoleMessage* console_message =
ConsoleMessage::Create(mojom::ConsoleMessageSource::kRendering,
......
......@@ -94,11 +94,14 @@ class GPUDevice final : public DawnObject<DawnDevice> {
GPUQueue* getQueue();
private:
void OnError(ExecutionContext* execution_context, const char* message);
void OnUncapturedError(ExecutionContext* execution_context,
DawnErrorType errorType,
const char* message);
Member<GPUAdapter> adapter_;
Member<GPUQueue> queue_;
std::unique_ptr<DawnCallback<base::RepeatingCallback<void(const char*)>>>
std::unique_ptr<
DawnCallback<base::RepeatingCallback<void(DawnErrorType, const char*)>>>
error_callback_;
DISALLOW_COPY_AND_ASSIGN(GPUDevice);
......
......@@ -43,7 +43,7 @@ void GPUFence::OnCompletionCallback(ScriptPromiseResolver* resolver,
DOMExceptionCode::kOperationError));
break;
case DAWN_FENCE_COMPLETION_STATUS_UNKNOWN:
case DAWN_FENCE_COMPLETION_STATUS_CONTEXT_LOST:
case DAWN_FENCE_COMPLETION_STATUS_DEVICE_LOST:
resolver->Reject(
MakeGarbageCollected<DOMException>(DOMExceptionCode::kAbortError));
break;
......
......@@ -26,19 +26,17 @@ GPURenderBundleEncoder* GPURenderBundleEncoder::Create(
std::unique_ptr<DawnTextureFormat[]> color_formats =
AsDawnEnum<DawnTextureFormat>(webgpu_desc->colorFormats());
DawnTextureFormat depth_stencil_format = {};
const DawnTextureFormat* depth_stencil_format_ptr = nullptr;
DawnTextureFormat depth_stencil_format = DAWN_TEXTURE_FORMAT_NONE;
if (webgpu_desc->hasDepthStencilFormat()) {
depth_stencil_format =
AsDawnEnum<DawnTextureFormat>(webgpu_desc->depthStencilFormat());
depth_stencil_format_ptr = &depth_stencil_format;
}
DawnRenderBundleEncoderDescriptor dawn_desc = {};
dawn_desc.nextInChain = nullptr;
dawn_desc.colorFormatsCount = color_formats_count;
dawn_desc.colorFormats = color_formats.get();
dawn_desc.depthStencilFormat = depth_stencil_format_ptr;
dawn_desc.depthStencilFormat = depth_stencil_format;
dawn_desc.sampleCount = webgpu_desc->sampleCount();
return MakeGarbageCollected<GPURenderBundleEncoder>(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment