Skip to content

Commit e3a7834

Browse files
committed
Merge remote-tracking branch 'ms/main' into ser_hlslaccessors_patch
2 parents 37e9243 + b4a3076 commit e3a7834

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ stages:
5252

5353
variables:
5454
macOS: macOS-latest
55-
linux: Ubuntu-latest
55+
linux: Ubuntu-22.04 # FIXME: #7364, DXC does not build correctly with GCC 13+
5656

5757
strategy:
5858
matrix:

tools/clang/unittests/HLSLExec/ShaderOpTest.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,15 @@ void CommandListRefs::CreateForDevice(ID3D12Device *pDevice, bool compute) {
258258
IID_PPV_ARGS(&List)));
259259
}
260260

261+
ShaderOpTest::ShaderOpTest() {
262+
m_hFence = CreateEvent(nullptr, FALSE, FALSE, nullptr);
263+
if (m_hFence == nullptr) {
264+
AtlThrow(HRESULT_FROM_WIN32(GetLastError()));
265+
}
266+
}
267+
268+
ShaderOpTest::~ShaderOpTest() { CloseHandle(m_hFence); }
269+
261270
void ShaderOpTest::CopyBackResources() {
262271
CommandListRefs ResCommandList;
263272
ResCommandList.CreateForDevice(m_pDevice, m_pShaderOp->IsCompute());
@@ -423,10 +432,6 @@ void ShaderOpTest::CreateDevice() {
423432
CHECK_HR(m_pDevice->CreateFence(0, D3D12_FENCE_FLAG_NONE,
424433
__uuidof(ID3D12Fence), (void **)&m_pFence));
425434
m_pFence->SetName(L"ShaderOpTest Fence");
426-
m_hFence = CreateEvent(nullptr, FALSE, FALSE, nullptr);
427-
if (m_hFence == nullptr) {
428-
AtlThrow(HRESULT_FROM_WIN32(GetLastError()));
429-
}
430435
}
431436

432437
static void InitByteCode(D3D12_SHADER_BYTECODE *pBytecode, ID3D10Blob *pBlob) {

tools/clang/unittests/HLSLExec/ShaderOpTest.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ class ShaderOpTest {
275275
typedef std::function<void(LPCSTR Name, LPCSTR pText, IDxcBlob **ppShaderBlob,
276276
ShaderOp *pShaderOp)>
277277
TShaderCallbackFn;
278+
279+
ShaderOpTest();
280+
~ShaderOpTest();
278281
void GetPipelineStats(D3D12_QUERY_DATA_PIPELINE_STATISTICS *pStats);
279282
void GetReadBackData(LPCSTR pResourceName, MappedData *pData);
280283
void RunShaderOp(ShaderOp *pShaderOp);

0 commit comments

Comments
 (0)