From be948aa8e0b387d7b7057905f3d1c183e5290dea Mon Sep 17 00:00:00 2001 From: Yunchao He Date: Tue, 30 Oct 2018 10:03:47 +0000 Subject: [PATCH] Initialize BlendDescriptor with default values. BUG=dawn:32 TEST=dawn_end2end_tests Change-Id: Ic5ae03e06e3cc620d0fefd3858206276c3fe9980 Reviewed-on: https://dawn-review.googlesource.com/c/2061 Commit-Queue: Corentin Wallez Reviewed-by: Corentin Wallez --- src/dawn_native/BlendState.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dawn_native/BlendState.h b/src/dawn_native/BlendState.h index 67b0cf485c..72e8821b54 100644 --- a/src/dawn_native/BlendState.h +++ b/src/dawn_native/BlendState.h @@ -29,8 +29,10 @@ namespace dawn_native { struct BlendInfo { bool blendEnabled = false; - BlendDescriptor alphaBlend; - BlendDescriptor colorBlend; + BlendDescriptor alphaBlend = {dawn::BlendOperation::Add, dawn::BlendFactor::One, + dawn::BlendFactor::Zero}; + BlendDescriptor colorBlend = {dawn::BlendOperation::Add, dawn::BlendFactor::One, + dawn::BlendFactor::Zero}; dawn::ColorWriteMask colorWriteMask = dawn::ColorWriteMask::All; };