Hash :
3e997419
Author :
Date :
2024-06-25T18:41:03
Add format conversions for WebGPU formats. This CL adds a Format class, as well as a generator script to generate methods to map between WebGPU and ANGLE formats. Fallback mappings are listed but this CL only implements support for required webgpu formats. Bug: angleproject:344814096 Change-Id: I2588a57353eafc4e87f40df3bbe3f9375e5ed8c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5598178 Reviewed-by: Matthew Denton <mpdenton@chromium.org> Commit-Queue: Liza Burakova <liza@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
//
// Copyright 2024 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "libANGLE/renderer/wgpu/wgpu_format_utils.h"
namespace rx
{
namespace webgpu
{
Format::Format()
: mIntendedFormatID(angle::FormatID::NONE),
mIntendedGLFormat(GL_NONE),
mActualImageFormatID(angle::FormatID::NONE),
mActualBufferFormatID(angle::FormatID::NONE),
mImageInitializerFunction(nullptr),
mIsRenderable(false)
{}
void Format::initImageFallback(const ImageFormatInitInfo *info, int numInfo)
{
UNIMPLEMENTED();
}
void Format::initBufferFallback(const BufferFormatInitInfo *fallbackInfo, int numInfo)
{
UNIMPLEMENTED();
}
} // namespace webgpu
} // namespace rx