Skip to content

Commit 44b1ce9

Browse files
Move PipelineState closer to first use
1 parent 1e4662c commit 44b1ce9

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tools/clang/unittests/HLSLExec/ExecutionTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12446,9 +12446,6 @@ void ExecutionTest::runCoopVecMulSubtest(
1244612446
I == 0 ? MulProps.InputType : D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT32);
1244712447
}
1244812448

12449-
// Create the compute pipeline state for the CoopVec shader
12450-
CComPtr<ID3D12PipelineState> PipelineState;
12451-
1245212449
std::string ShaderSource = R"(
1245312450
#include "dx/linalg.h"
1245412451

@@ -12661,6 +12658,9 @@ float4 ps_main() : SV_Target {
1266112658
CComPtr<LinAlgHeaderIncludeHandler> IncludeHandler =
1266212659
new LinAlgHeaderIncludeHandler(m_support);
1266312660

12661+
// Create the pipeline state for the CoopVec shaders
12662+
CComPtr<ID3D12PipelineState> PipelineState;
12663+
1266412664
if (RunCompute) {
1266512665
CreateComputePSO(D3DDevice, RootSignature, ShaderSource.c_str(), L"cs_6_9",
1266612666
&PipelineState, Options.data(), (int)Options.size(),
@@ -13123,9 +13123,6 @@ void ExecutionTest::runCoopVecOuterProductSubtest(
1312313123
return;
1312413124
}
1312513125

13126-
// Create a compute pipeline state object.
13127-
CComPtr<ID3D12PipelineState> PipelineState;
13128-
1312913126
std::string ShaderSource = R"(
1313013127
#include "dx/linalg.h"
1313113128

@@ -13261,6 +13258,9 @@ float4 ps_main() : SV_Target {
1326113258
CComPtr<LinAlgHeaderIncludeHandler> IncludeHandler =
1326213259
new LinAlgHeaderIncludeHandler(m_support);
1326313260

13261+
// Create the pipeline state for the CoopVec shaders
13262+
CComPtr<ID3D12PipelineState> PipelineState;
13263+
1326413264
if (RunCompute) {
1326513265
CreateComputePSO(D3DDevice, RootSignature, ShaderSource.c_str(), L"cs_6_9",
1326613266
&PipelineState, Options, _countof(Options),

0 commit comments

Comments
 (0)