fix(test): zero-initialize state structs to avoid stack corruption
This commit is contained in:
@@ -150,7 +150,7 @@ TEST_F(OpenGLTestFixture, CommandList_SetPrimitiveTopology) {
|
|||||||
TEST_F(OpenGLTestFixture, CommandList_SetDepthStencilState) {
|
TEST_F(OpenGLTestFixture, CommandList_SetDepthStencilState) {
|
||||||
OpenGLCommandList cmdList;
|
OpenGLCommandList cmdList;
|
||||||
|
|
||||||
DepthStencilState state;
|
DepthStencilState state = {};
|
||||||
state.depthEnable = true;
|
state.depthEnable = true;
|
||||||
state.depthWriteMask = true;
|
state.depthWriteMask = true;
|
||||||
state.depthFunc = ComparisonFunc::Less;
|
state.depthFunc = ComparisonFunc::Less;
|
||||||
@@ -165,7 +165,7 @@ TEST_F(OpenGLTestFixture, CommandList_SetDepthStencilState) {
|
|||||||
TEST_F(OpenGLTestFixture, CommandList_SetBlendState) {
|
TEST_F(OpenGLTestFixture, CommandList_SetBlendState) {
|
||||||
OpenGLCommandList cmdList;
|
OpenGLCommandList cmdList;
|
||||||
|
|
||||||
BlendState state;
|
BlendState state = {};
|
||||||
state.renderTargets[0].blendEnable = true;
|
state.renderTargets[0].blendEnable = true;
|
||||||
state.renderTargets[0].srcBlend = BlendFactor::SrcAlpha;
|
state.renderTargets[0].srcBlend = BlendFactor::SrcAlpha;
|
||||||
state.renderTargets[0].dstBlend = BlendFactor::InvSrcAlpha;
|
state.renderTargets[0].dstBlend = BlendFactor::InvSrcAlpha;
|
||||||
|
|||||||
Reference in New Issue
Block a user