Update dawn.h -> webgpu.h, dawn_cpp.h -> webgpu_cpp.h.
Also fix some compile breakages from recent Skia changes. No changes to Skia API. Change-Id: Ifd0b1d89fb4ea3cf1f6a7170f2f74614276364ae Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257877 Commit-Queue: Stephen White <senorblanco@chromium.org> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
ccca30aad7
commit
a521c962b1
@ -23,7 +23,7 @@ class GrVkImageLayout;
|
||||
class GrGLTextureParameters;
|
||||
|
||||
#ifdef SK_DAWN
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
#endif
|
||||
|
||||
#ifdef SK_METAL
|
||||
|
@ -20,7 +20,7 @@ static constexpr int Success = 0;
|
||||
#undef None
|
||||
static constexpr int None = 0L;
|
||||
#endif
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
|
||||
struct GrDawnImageInfo {
|
||||
wgpu::Texture fTexture;
|
||||
|
@ -224,12 +224,12 @@ sk_sp<GrContext> GrContext::MakeMetal(void* device, void* queue, const GrContext
|
||||
#endif
|
||||
|
||||
#ifdef SK_DAWN
|
||||
sk_sp<GrContext> GrContext::MakeDawn(const dawn::Device& device) {
|
||||
sk_sp<GrContext> GrContext::MakeDawn(const wgpu::Device& device) {
|
||||
GrContextOptions defaultOptions;
|
||||
return MakeDawn(device, defaultOptions);
|
||||
}
|
||||
|
||||
sk_sp<GrContext> GrContext::MakeDawn(const dawn::Device& device, const GrContextOptions& options) {
|
||||
sk_sp<GrContext> GrContext::MakeDawn(const wgpu::Device& device, const GrContextOptions& options) {
|
||||
sk_sp<GrContext> context(new GrLegacyDirectContext(GrBackendApi::kDawn, options));
|
||||
|
||||
context->fGpu = GrDawnGpu::Make(device, options, context.get());
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define GrDawnBuffer_DEFINED
|
||||
|
||||
#include "src/gpu/GrGpuBuffer.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
|
||||
class GrDawnGpu;
|
||||
struct GrDawnStagingBuffer;
|
||||
|
@ -463,7 +463,7 @@ bool GrDawnGpu::onCopySurface(GrSurface* dst,
|
||||
return true;
|
||||
}
|
||||
|
||||
static void callback(DawnBufferMapAsyncStatus status, const void* data, uint64_t dataLength,
|
||||
static void callback(WGPUBufferMapAsyncStatus status, const void* data, uint64_t dataLength,
|
||||
void* userdata) {
|
||||
(*reinterpret_cast<const void**>(userdata)) = data;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "src/gpu/GrGpu.h"
|
||||
#include "src/gpu/GrProgramDesc.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
#include "src/core/SkLRUCache.h"
|
||||
#include "src/gpu/dawn/GrDawnRingBuffer.h"
|
||||
#include "src/gpu/dawn/GrDawnStagingManager.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "include/gpu/GrTypes.h"
|
||||
#include "src/gpu/GrColor.h"
|
||||
#include "src/gpu/GrMesh.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
|
||||
class GrDawnGpu;
|
||||
class GrDawnRenderTarget;
|
||||
|
@ -550,7 +550,7 @@ wgpu::BindGroup GrDawnProgram::setTextures(GrDawnGpu* gpu,
|
||||
&binding);
|
||||
}
|
||||
}
|
||||
GrFragmentProcessor::Iter fpIter(pipeline);
|
||||
GrFragmentProcessor::CIter fpIter(pipeline);
|
||||
GrGLSLFragmentProcessor::Iter glslIter(fFragmentProcessors.get(), fFragmentProcessorCnt);
|
||||
for (; fpIter && glslIter; ++fpIter, ++glslIter) {
|
||||
for (int i = 0; i < fpIter->numTextureSamplers(); ++i) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "src/gpu/dawn/GrDawnUniformHandler.h"
|
||||
#include "src/gpu/dawn/GrDawnVaryingHandler.h"
|
||||
#include "src/sksl/SkSLCompiler.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
#include "src/gpu/glsl/GrGLSLProgramBuilder.h"
|
||||
|
||||
class GrPipeline;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "src/gpu/dawn/GrDawnRingBuffer.h"
|
||||
#include "src/gpu/dawn/GrDawnUniformHandler.h"
|
||||
#include "src/gpu/glsl/GrGLSLProgramDataManager.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
|
||||
#include "src/core/SkAutoMalloc.h"
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "src/gpu/GrBuffer.h"
|
||||
#include "src/gpu/dawn/GrDawnBuffer.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
|
||||
class GrDawnGpu;
|
||||
|
||||
|
@ -40,7 +40,7 @@ GrDawnStagingBuffer* GrDawnStagingManager::findOrCreateStagingBuffer(size_t size
|
||||
return stagingBuffer;
|
||||
}
|
||||
|
||||
static void callback(DawnBufferMapAsyncStatus status, void* data, uint64_t dataLength,
|
||||
static void callback(WGPUBufferMapAsyncStatus status, void* data, uint64_t dataLength,
|
||||
void* userData) {
|
||||
GrDawnStagingBuffer* buffer = static_cast<GrDawnStagingBuffer*>(userData);
|
||||
buffer->fData = data;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
|
||||
struct GrDawnStagingBuffer;
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "src/gpu/GrStencilAttachment.h"
|
||||
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
|
||||
class GrDawnGpu;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define GrDawnTexture_DEFINED
|
||||
|
||||
#include "include/gpu/GrTexture.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
|
||||
class GrDawnGpu;
|
||||
struct GrDawnImageInfo;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define GrDawnUtil_DEFINED
|
||||
|
||||
#include "include/private/GrTypesPriv.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
|
||||
size_t GrDawnBytesPerPixel(wgpu::TextureFormat format);
|
||||
bool GrDawnFormatIsRenderable(wgpu::TextureFormat format);
|
||||
|
@ -5,7 +5,7 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
#include "dawn_native/DawnNative.h"
|
||||
#include "tools/gpu/dawn/DawnTestContext.h"
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
#define USE_OPENGL_BACKEND 0
|
||||
|
||||
#ifdef SK_DAWN
|
||||
#include "dawn/dawn.h"
|
||||
#include "dawn/webgpu.h"
|
||||
#include "dawn/dawn_proc.h"
|
||||
#include "include/gpu/GrContext.h"
|
||||
#include "tools/AutoreleasePool.h"
|
||||
@ -95,7 +95,7 @@ public:
|
||||
~DawnFence() {
|
||||
}
|
||||
|
||||
static void callback(DawnBufferMapAsyncStatus status, const void* data, uint64_t dataLength,
|
||||
static void callback(WGPUBufferMapAsyncStatus status, const void* data, uint64_t dataLength,
|
||||
void* userData) {
|
||||
DawnFence* fence = static_cast<DawnFence*>(userData);
|
||||
fence->fCalled = true;
|
||||
|
@ -16,7 +16,7 @@
|
||||
static wgpu::TextureUsage kUsage = wgpu::TextureUsage::OutputAttachment |
|
||||
wgpu::TextureUsage::CopySrc;
|
||||
|
||||
static void PrintDeviceError(DawnErrorType, const char* message, void*) {
|
||||
static void PrintDeviceError(WGPUErrorType, const char* message, void*) {
|
||||
printf("Device error: %s\n", message);
|
||||
SkASSERT(false);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "include/core/SkSurface.h"
|
||||
|
||||
#include "tools/sk_app/WindowContext.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
#include "dawn_native/DawnNative.h"
|
||||
#include "dawn/dawn_wsi.h"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "tools/sk_app/DawnWindowContext.h"
|
||||
#include "tools/sk_app/mac/WindowContextFactory_mac.h"
|
||||
#include "common/SwapChainUtils.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
#include "dawn/dawn_wsi.h"
|
||||
#include "dawn_native/DawnNative.h"
|
||||
#include "dawn_native/MetalBackend.h"
|
||||
|
@ -9,9 +9,9 @@
|
||||
#ifndef WindowContextFactory_unix_DEFINED
|
||||
#define WindowContextFactory_unix_DEFINED
|
||||
|
||||
// dawncpp.h and X.h don't get along. Include this first, before X11 defines None, Success etc.
|
||||
// webgpu_cpp.h and X.h don't get along. Include this first, before X11 defines None, Success etc.
|
||||
#ifdef SK_DAWN
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
#include <GL/glx.h>
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "tools/sk_app/DawnWindowContext.h"
|
||||
#include "tools/sk_app/win/WindowContextFactory_win.h"
|
||||
#include "dawn/dawncpp.h"
|
||||
#include "dawn/webgpu_cpp.h"
|
||||
#include "dawn/dawn_wsi.h"
|
||||
#include "dawn_native/DawnNative.h"
|
||||
#include "dawn_native/D3D12Backend.h"
|
||||
|
Loading…
Reference in New Issue
Block a user