mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 01:46:35 +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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user