mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
Implement WGPUTextureDescriptor.viewFormats and sampling reinterpretation
Reinterpretation for render/resolve attachments not yet implemented. Bug: dawn:1276 Change-Id: I43d73ce5c943c4ba49df06c6865867f378f2de25 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84280 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
@@ -681,7 +681,7 @@ namespace dawn::native {
|
||||
}
|
||||
|
||||
ResultOrError<const Format*> DeviceBase::GetInternalFormat(wgpu::TextureFormat format) const {
|
||||
size_t index = ComputeFormatIndex(format);
|
||||
FormatIndex index = ComputeFormatIndex(format);
|
||||
DAWN_INVALID_IF(index >= mFormatTable.size(), "Unknown texture format %s.", format);
|
||||
|
||||
const Format* internalFormat = &mFormatTable[index];
|
||||
@@ -691,7 +691,13 @@ namespace dawn::native {
|
||||
}
|
||||
|
||||
const Format& DeviceBase::GetValidInternalFormat(wgpu::TextureFormat format) const {
|
||||
size_t index = ComputeFormatIndex(format);
|
||||
FormatIndex index = ComputeFormatIndex(format);
|
||||
ASSERT(index < mFormatTable.size());
|
||||
ASSERT(mFormatTable[index].isSupported);
|
||||
return mFormatTable[index];
|
||||
}
|
||||
|
||||
const Format& DeviceBase::GetValidInternalFormat(FormatIndex index) const {
|
||||
ASSERT(index < mFormatTable.size());
|
||||
ASSERT(mFormatTable[index].isSupported);
|
||||
return mFormatTable[index];
|
||||
|
||||
Reference in New Issue
Block a user