mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-06 14:43:31 +00:00
When validation layers are enabled, D3D12 warnings and error messages are logged to the shared DBWIN_BUFFER segment of memory. This CL has makes the test environment watch for new events and logs them to stderr so they show up in the test bot logs. This helps debug problems in the D3D12 backend which previously just crashed with a general Device Lost message. Bug: none Change-Id: I0eaddf9e16303bd65579e85fe6693bd8cdfbd8da Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/26640 Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Commit-Queue: Austin Eng <enga@chromium.org>
30 lines
942 B
C++
30 lines
942 B
C++
// Copyright 2020 The Dawn Authors
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#include "utils/PlatformDebugLogger.h"
|
|
|
|
namespace utils {
|
|
|
|
class EmptyDebugLogger : public PlatformDebugLogger {
|
|
public:
|
|
EmptyDebugLogger() = default;
|
|
~EmptyDebugLogger() override = default;
|
|
};
|
|
|
|
PlatformDebugLogger* CreatePlatformDebugLogger() {
|
|
return new EmptyDebugLogger();
|
|
}
|
|
|
|
} // namespace utils
|