test: zero-initialize states in test's body

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-05-24 15:39:21 +00:00
committed by Compute-Runtime-Automation
parent 7d3fc9ab74
commit 5b297ba860
2 changed files with 4 additions and 4 deletions

View File

@@ -445,8 +445,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe
uint32_t dims[] = {2, 1, 1};
uint32_t numBindingTable = 1;
uint32_t numSamplers = 1;
SAMPLER_STATE samplerState;
BINDING_TABLE_STATE bindingTable;
SAMPLER_STATE samplerState{};
BINDING_TABLE_STATE bindingTable{};
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
dispatchInterface->kernelDescriptor.payloadMappings.bindingTable.numEntries = numBindingTable;

View File

@@ -30,7 +30,7 @@ HWTEST_F(CommandEncodeStatesTest, GivenCommandStreamWhenEncodeCopySamplerStateTh
}
using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE;
uint32_t numSamplers = 1;
SAMPLER_STATE samplerState;
SAMPLER_STATE samplerState{};
auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE);
auto usedBefore = dsh->getUsed();
@@ -440,4 +440,4 @@ HWTEST2_F(CommandEncodeStatesTest, whenGetCmdSizeForComputeModeThenCorrectValueI
auto &csr = deviceFactory.rootDevices[0]->getUltCommandStreamReceiver<FamilyType>();
csr.streamProperties.stateComputeMode.setProperties(false, 0, ThreadArbitrationPolicy::AgeBased, *defaultHwInfo);
EXPECT_EQ(expectedScmSize, csr.getCmdSizeForComputeMode());
}
}