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:
Austin Eng
2022-03-31 03:53:04 +00:00
committed by Dawn LUCI CQ
parent 10ec4ee7ef
commit 8e02ebf6c6
18 changed files with 555 additions and 91 deletions

View File

@@ -23,7 +23,7 @@ namespace dawn::native::opengl {
auto AddFormat = [&table](wgpu::TextureFormat dawnFormat, GLenum internalFormat,
GLenum format, GLenum type, Type componentType) {
size_t index = ComputeFormatIndex(dawnFormat);
FormatIndex index = ComputeFormatIndex(dawnFormat);
ASSERT(index < table.size());
table[index].internalFormat = internalFormat;

View File

@@ -34,7 +34,7 @@ namespace dawn::native::opengl {
ComponentType componentType;
};
using GLFormatTable = std::array<GLFormat, kKnownFormatCount>;
using GLFormatTable = ityp::array<FormatIndex, GLFormat, kKnownFormatCount>;
GLFormatTable BuildGLFormatTable();
} // namespace dawn::native::opengl