mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
Use const*const* to annotate color state descriptors
Color state descriptors are a sequence of descriptors embedded in RenderPipeline descriptor. We should use const*const* to annotate them for supporting potential extended features added in color state descriptors in future. BUG=dawn:77 Change-Id: Id755569fa5076668c3db7b219b699845bc2a1d69 Reviewed-on: https://dawn-review.googlesource.com/c/4880 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
committed by
Commit Bot service account
parent
f20f5b9493
commit
938811eef9
@@ -52,7 +52,8 @@ namespace utils {
|
||||
colorStateDescriptor.colorBlend = blend;
|
||||
colorStateDescriptor.colorWriteMask = dawn::ColorWriteMask::All;
|
||||
for (uint32_t i = 0; i < kMaxColorAttachments; ++i) {
|
||||
cColorStates[i] = colorStateDescriptor;
|
||||
mColorStates[i] = colorStateDescriptor;
|
||||
cColorStates[i] = &mColorStates[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,10 +30,11 @@ namespace utils {
|
||||
dawn::PipelineStageDescriptor cVertexStage;
|
||||
dawn::PipelineStageDescriptor cFragmentStage;
|
||||
|
||||
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