@@ -1382,7 +1382,7 @@ class ExecutionTest {
13821382 }
13831383
13841384 void RunRWByteBufferComputeTest (ID3D12Device *pDevice, LPCSTR shader, std::vector<uint32_t > &values);
1385- void RunLifetimeIntrinsicTest (ID3D12Device *pDevice, LPCSTR shader, D3D_SHADER_MODEL shaderModel, bool useLibTarget, llvm::ArrayRef< LPCWSTR> options , std::vector<uint32_t > &values);
1385+ void RunLifetimeIntrinsicTest (ID3D12Device *pDevice, LPCSTR shader, D3D_SHADER_MODEL shaderModel, bool useLibTarget, LPCWSTR *pOptions, int numOptions , std::vector<uint32_t > &values);
13861386 void RunLifetimeIntrinsicComputeTest (ID3D12Device *pDevice, LPCSTR pShader, CComPtr<ID3D12DescriptorHeap>& pUavHeap, CComPtr<ID3D12RootSignature>& pRootSignature,
13871387 LPCWSTR pTargetProfile, LPCWSTR *pOptions, int numOptions, std::vector<uint32_t > &values);
13881388 void RunLifetimeIntrinsicLibTest (ID3D12Device *pDevice0, LPCSTR pShader, CComPtr<ID3D12RootSignature>& pRootSignature,
@@ -1687,7 +1687,7 @@ void ExecutionTest::RunLifetimeIntrinsicLibTest(ID3D12Device *pDevice0, LPCSTR p
16871687}
16881688
16891689void ExecutionTest::RunLifetimeIntrinsicTest (ID3D12Device *pDevice, LPCSTR pShader, D3D_SHADER_MODEL shaderModel, bool useLibTarget,
1690- llvm::ArrayRef< LPCWSTR> options , std::vector<uint32_t > &values) {
1690+ LPCWSTR *pOptions, int numOptions , std::vector<uint32_t > &values) {
16911691 LPCWSTR pTargetProfile;
16921692 switch (shaderModel) {
16931693 default : pTargetProfile = useLibTarget ? L" lib_6_3" : L" cs_6_0" ; break ; // Default to 6.3 for lib, 6.0 otherwise.
@@ -1725,10 +1725,10 @@ void ExecutionTest::RunLifetimeIntrinsicTest(ID3D12Device *pDevice, LPCSTR pShad
17251725
17261726 if (useLibTarget) {
17271727 RunLifetimeIntrinsicLibTest (pDevice, pShader, pRootSignature, pTargetProfile,
1728- const_cast <LPCWSTR*>(options. data ()), static_cast < int >(options. size ()) );
1728+ pOptions, numOptions );
17291729 } else {
17301730 RunLifetimeIntrinsicComputeTest (pDevice, pShader, pUavHeap, pRootSignature, pTargetProfile,
1731- const_cast <LPCWSTR*>(options. data ()), static_cast < int >(options. size ()) , values);
1731+ pOptions, numOptions , values);
17321732 }
17331733}
17341734
@@ -1816,52 +1816,55 @@ TEST_F(ExecutionTest, LifetimeIntrinsicTest) {
18161816
18171817 VERIFY_ARE_EQUAL (values[1 ], (uint32_t )1 );
18181818
1819+ LPCWSTR optsBase[] = {L" -enable-lifetime-markers" };
1820+ LPCWSTR optsZeroStore[] = {L" -enable-lifetime-markers" , L" -force-zero-store-lifetimes" };
1821+
18191822 WEX::Logging::Log::Comment (L" ==== cs_6_0 with default translation" );
18201823 RunLifetimeIntrinsicTest (pDevice, pShader, D3D_SHADER_MODEL_6_0, false ,
1821- { L" -enable-lifetime-markers " } , values);
1824+ optsBase, _countof (optsBase) , values);
18221825 VERIFY_ARE_EQUAL (values[1 ], (uint32_t )1 );
18231826
18241827 if (bDXRSupported) {
18251828 WEX::Logging::Log::Comment (L" ==== DXR lib_6_3 with default translation" );
18261829 RunLifetimeIntrinsicTest (pDevice, pShader, D3D_SHADER_MODEL_6_3, true ,
1827- { L" -enable-lifetime-markers " } , values);
1830+ optsBase, _countof (optsBase) , values);
18281831 VERIFY_ARE_EQUAL (values[1 ], (uint32_t )1 );
18291832 }
18301833
18311834 WEX::Logging::Log::Comment (L" ==== cs_6_0 with zeroinitializer translation" );
18321835 RunLifetimeIntrinsicTest (pDevice, pShader, D3D_SHADER_MODEL_6_0, false ,
1833- { L" -enable-lifetime-markers " , L" -force-zero-store-lifetimes " } , values);
1836+ optsZeroStore, _countof (optsZeroStore) , values);
18341837 VERIFY_ARE_EQUAL (values[1 ], (uint32_t )1 );
18351838
18361839 if (bDXRSupported) {
18371840 WEX::Logging::Log::Comment (L" ==== DXR lib_6_3 with zeroinitializer translation" );
18381841 RunLifetimeIntrinsicTest (pDevice, pShader, D3D_SHADER_MODEL_6_3, true ,
1839- { L" -enable-lifetime-markers " , L" -force-zero-store-lifetimes " } , values);
1842+ optsZeroStore, _countof (optsZeroStore) , values);
18401843 VERIFY_ARE_EQUAL (values[1 ], (uint32_t )1 );
18411844 }
18421845
18431846 if (bSM_6_6_Supported) {
18441847 WEX::Logging::Log::Comment (L" ==== cs_6_6 with zeroinitializer translation" );
18451848 RunLifetimeIntrinsicTest (pDevice, pShader, D3D_SHADER_MODEL_6_6, false ,
1846- { L" -enable-lifetime-markers " , L" -force-zero-store-lifetimes " } , values);
1849+ optsZeroStore, _countof (optsZeroStore) , values);
18471850 VERIFY_ARE_EQUAL (values[1 ], (uint32_t )1 );
18481851
18491852 if (bDXRSupported) {
18501853 WEX::Logging::Log::Comment (L" ==== DXR lib_6_6 with zeroinitializer translation" );
18511854 RunLifetimeIntrinsicTest (pDevice, pShader, D3D_SHADER_MODEL_6_6, true ,
1852- { L" -enable-lifetime-markers " , L" -force-zero-store-lifetimes " } , values);
1855+ optsZeroStore, _countof (optsZeroStore) , values);
18531856 VERIFY_ARE_EQUAL (values[1 ], (uint32_t )1 );
18541857 }
18551858
18561859 WEX::Logging::Log::Comment (L" ==== cs_6_6 with native lifetime markers" );
18571860 RunLifetimeIntrinsicTest (pDevice, pShader, D3D_SHADER_MODEL_6_6, false ,
1858- { L" -enable-lifetime-markers " } , values);
1861+ optsBase, _countof (optsBase) , values);
18591862 VERIFY_ARE_EQUAL (values[1 ], (uint32_t )1 );
18601863
18611864 if (bDXRSupported) {
18621865 WEX::Logging::Log::Comment (L" ==== DXR lib_6_6 with native lifetime markers" );
18631866 RunLifetimeIntrinsicTest (pDevice, pShader, D3D_SHADER_MODEL_6_6, true ,
1864- { L" -enable-lifetime-markers " } , values);
1867+ optsBase, _countof (optsBase) , values);
18651868 VERIFY_ARE_EQUAL (values[1 ], (uint32_t )1 );
18661869 }
18671870 }
0 commit comments