mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Remove indirection for colorStates
This is to match the work in progress webgpu.h header. BUG=dawn:22 Change-Id: Ia1077fef95e6bda541cddbd2f6ce40b79138e960 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9383 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
b8dbada76d
commit
c81a717379
@@ -78,7 +78,7 @@ namespace utils {
|
||||
// Set defaults for the color state descriptors.
|
||||
{
|
||||
descriptor->colorStateCount = 1;
|
||||
descriptor->colorStates = &cColorStates[0];
|
||||
descriptor->colorStates = cColorStates.data();
|
||||
|
||||
dawn::BlendDescriptor blend;
|
||||
blend.operation = dawn::BlendOperation::Add;
|
||||
@@ -90,8 +90,7 @@ namespace utils {
|
||||
colorStateDescriptor.colorBlend = blend;
|
||||
colorStateDescriptor.writeMask = dawn::ColorWriteMask::All;
|
||||
for (uint32_t i = 0; i < kMaxColorAttachments; ++i) {
|
||||
mColorStates[i] = colorStateDescriptor;
|
||||
cColorStates[i] = &mColorStates[i];
|
||||
cColorStates[i] = colorStateDescriptor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,11 +44,8 @@ namespace utils {
|
||||
|
||||
ComboVertexInputDescriptor cVertexInput;
|
||||
dawn::RasterizationStateDescriptor cRasterizationState;
|
||||
std::array<dawn::ColorStateDescriptor*, kMaxColorAttachments> cColorStates;
|
||||
std::array<dawn::ColorStateDescriptor, kMaxColorAttachments> cColorStates;
|
||||
dawn::DepthStencilStateDescriptor cDepthStencilState;
|
||||
|
||||
private:
|
||||
dawn::ColorStateDescriptor mColorStates[kMaxColorAttachments];
|
||||
};
|
||||
|
||||
} // namespace utils
|
||||
|
||||
Reference in New Issue
Block a user