ShaderOpTest limit commandlist6 to where supported (#3600)

Because version 6 of the command list pointer was being created whenever
the available SDK supported it, sometimes the test would try to create
version 6 where it wasn't supported.

Instead, this just stores the base pointer type and casts it up where we
know support is available.
This commit is contained in:
Greg Roth 2021-03-17 22:25:31 -06:00 коммит произвёл GitHub
Родитель 2bda44fc06
Коммит 30e306f326
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -475,7 +475,7 @@ void ShaderOpTest::CreatePipelineState() {
PDesc.SizeInBytes = sizeof(MDesc);
PDesc.pPipelineStateSubobjectStream = &MDesc;
ID3D12Device2 *pDevice2;
CComPtr<ID3D12Device2> pDevice2;
CHECK_HR(m_pDevice->QueryInterface(&pDevice2));
CHECK_HR(pDevice2->CreatePipelineState(&PDesc, IID_PPV_ARGS(&m_pPSO)));
@ -902,7 +902,12 @@ void ShaderOpTest::RunCommandList() {
#if defined(NTDDI_WIN10_VB) && WDK_NTDDI_VERSION >= NTDDI_WIN10_VB
if (m_pShaderOp->MS) {
ID3D12GraphicsCommandList6 *pList6 = m_CommandList.List.p;
#ifndef NDEBUG
D3D12_FEATURE_DATA_D3D12_OPTIONS7 O7;
DXASSERT_LOCALVAR(O7, SUCCEEDED(m_pDevice->CheckFeatureSupport((D3D12_FEATURE)D3D12_FEATURE_D3D12_OPTIONS7, &O7, sizeof(O7))), "mesh shader test enabled on platform without mesh support");
#endif
CComPtr<ID3D12GraphicsCommandList6> pList6;
CHECK_HR(m_CommandList.List.p->QueryInterface(&pList6));
pList6->BeginQuery(m_pQueryHeap, D3D12_QUERY_TYPE_PIPELINE_STATISTICS, 0);
pList6->DispatchMesh(1, 1, 1);
pList6->EndQuery(m_pQueryHeap, D3D12_QUERY_TYPE_PIPELINE_STATISTICS, 0);

Просмотреть файл

@ -240,11 +240,7 @@ public:
// Use this structure to refer to a command allocator/list/queue triple.
struct CommandListRefs {
CComPtr<ID3D12CommandAllocator> Allocator;
#if defined(NTDDI_WIN10_VB) && WDK_NTDDI_VERSION >= NTDDI_WIN10_VB
CComPtr<ID3D12GraphicsCommandList6> List;
#else
CComPtr<ID3D12GraphicsCommandList> List;
#endif
CComPtr<ID3D12CommandQueue> Queue;
void CreateForDevice(ID3D12Device *pDevice, bool compute);