From 7ef94e2e9c497e5f99db8385a5fb8acbedfb1be9 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Thu, 17 Oct 2019 19:04:00 -0700 Subject: Fixed test app --- Tests/TestApp/src/TestApp.cpp | 16 ++++++++-------- Tests/TestApp/src/TestBufferAccess.cpp | 1 - Tests/TestApp/src/TestDrawCommands.cpp | 1 - Tests/TestApp/src/TestShaderResArrays.cpp | 1 - Tests/TestApp/src/TestTexturing.cpp | 1 - 5 files changed, 8 insertions(+), 12 deletions(-) (limited to 'Tests/TestApp/src') diff --git a/Tests/TestApp/src/TestApp.cpp b/Tests/TestApp/src/TestApp.cpp index a516e9d..9f6fc27 100644 --- a/Tests/TestApp/src/TestApp.cpp +++ b/Tests/TestApp/src/TestApp.cpp @@ -175,17 +175,17 @@ void TestApp::InitializeDiligentEngine( #endif auto *pFactoryD3D11 = GetEngineFactoryD3D11(); Uint32 NumAdapters = 0; - pFactoryD3D11->EnumerateHardwareAdapters(NumAdapters, 0); + pFactoryD3D11->EnumerateHardwareAdapters(DIRECT3D_FEATURE_LEVEL_11_0, NumAdapters, 0); Adapters.resize(NumAdapters); - pFactoryD3D11->EnumerateHardwareAdapters(NumAdapters, Adapters.data()); + pFactoryD3D11->EnumerateHardwareAdapters(DIRECT3D_FEATURE_LEVEL_11_0, NumAdapters, Adapters.data()); for(Uint32 i=0; i < Adapters.size(); ++i) { Uint32 NumDisplayModes = 0; std::vector DisplayModes; - pFactoryD3D11->EnumerateDisplayModes(i, 0, TEX_FORMAT_RGBA8_UNORM, NumDisplayModes, nullptr); + pFactoryD3D11->EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL_11_0, i, 0, TEX_FORMAT_RGBA8_UNORM, NumDisplayModes, nullptr); DisplayModes.resize(NumDisplayModes); - pFactoryD3D11->EnumerateDisplayModes(i, 0, TEX_FORMAT_RGBA8_UNORM, NumDisplayModes, DisplayModes.data()); + pFactoryD3D11->EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL_11_0, i, 0, TEX_FORMAT_RGBA8_UNORM, NumDisplayModes, DisplayModes.data()); AdapterDisplayModes.emplace_back(std::move(DisplayModes)); } @@ -209,17 +209,17 @@ void TestApp::InitializeDiligentEngine( #endif auto *pFactoryD3D12 = GetEngineFactoryD3D12(); Uint32 NumAdapters = 0; - pFactoryD3D12->EnumerateHardwareAdapters(NumAdapters, 0); + pFactoryD3D12->EnumerateHardwareAdapters(DIRECT3D_FEATURE_LEVEL_11_0, NumAdapters, 0); Adapters.resize(NumAdapters); - pFactoryD3D12->EnumerateHardwareAdapters(NumAdapters, Adapters.data()); + pFactoryD3D12->EnumerateHardwareAdapters(DIRECT3D_FEATURE_LEVEL_11_0, NumAdapters, Adapters.data()); for (Uint32 i = 0; i < Adapters.size(); ++i) { Uint32 NumDisplayModes = 0; std::vector DisplayModes; - pFactoryD3D12->EnumerateDisplayModes(i, 0, TEX_FORMAT_RGBA8_UNORM, NumDisplayModes, nullptr); + pFactoryD3D12->EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL_11_0, i, 0, TEX_FORMAT_RGBA8_UNORM, NumDisplayModes, nullptr); DisplayModes.resize(NumDisplayModes); - pFactoryD3D12->EnumerateDisplayModes(i, 0, TEX_FORMAT_RGBA8_UNORM, NumDisplayModes, DisplayModes.data()); + pFactoryD3D12->EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL_11_0, i, 0, TEX_FORMAT_RGBA8_UNORM, NumDisplayModes, DisplayModes.data()); AdapterDisplayModes.emplace_back(std::move(DisplayModes)); } diff --git a/Tests/TestApp/src/TestBufferAccess.cpp b/Tests/TestApp/src/TestBufferAccess.cpp index 54d4433..7d119dc 100644 --- a/Tests/TestApp/src/TestBufferAccess.cpp +++ b/Tests/TestApp/src/TestBufferAccess.cpp @@ -115,7 +115,6 @@ void TestBufferAccess::Init( IRenderDevice *pDevice, IDeviceContext *pContext, I RefCntAutoPtr pShaderSourceFactory; pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory(nullptr, &pShaderSourceFactory); CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory; - CreationAttrs.Desc.TargetProfile = bUseGLSL ? SHADER_PROFILE_GL_4_2 : SHADER_PROFILE_DX_5_0; CreationAttrs.UseCombinedTextureSamplers = true; RefCntAutoPtr pVSInst, pPS; diff --git a/Tests/TestApp/src/TestDrawCommands.cpp b/Tests/TestApp/src/TestDrawCommands.cpp index 23b0426..75919c8 100644 --- a/Tests/TestApp/src/TestDrawCommands.cpp +++ b/Tests/TestApp/src/TestDrawCommands.cpp @@ -159,7 +159,6 @@ void TestDrawCommands::Init(IRenderDevice *pDevice, IDeviceContext *pDeviceConte RefCntAutoPtr pShaderSourceFactory; pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory(nullptr, &pShaderSourceFactory); CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory; - CreationAttrs.Desc.TargetProfile = bUseGLSL ? SHADER_PROFILE_GL_4_2 : SHADER_PROFILE_DX_5_0; CreationAttrs.UseCombinedTextureSamplers = true; RefCntAutoPtr pVS, pVSInst, pPS; diff --git a/Tests/TestApp/src/TestShaderResArrays.cpp b/Tests/TestApp/src/TestShaderResArrays.cpp index 71e3b06..63ab383 100644 --- a/Tests/TestApp/src/TestShaderResArrays.cpp +++ b/Tests/TestApp/src/TestShaderResArrays.cpp @@ -41,7 +41,6 @@ TestShaderResArrays::TestShaderResArrays(IRenderDevice *pDevice, IDeviceContext RefCntAutoPtr pShaderSourceFactory; pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory(nullptr, &pShaderSourceFactory); CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory; - CreationAttrs.Desc.TargetProfile = SHADER_PROFILE_DX_5_0; CreationAttrs.UseCombinedTextureSamplers = true; RefCntAutoPtr pVS, pPS; diff --git a/Tests/TestApp/src/TestTexturing.cpp b/Tests/TestApp/src/TestTexturing.cpp index 2856886..df6adce 100644 --- a/Tests/TestApp/src/TestTexturing.cpp +++ b/Tests/TestApp/src/TestTexturing.cpp @@ -170,7 +170,6 @@ void TestTexturing::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceContext RefCntAutoPtr pShaderSourceFactory; pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory("Shaders", &pShaderSourceFactory); CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory; - CreationAttrs.Desc.TargetProfile = bUseGLSL ? SHADER_PROFILE_GL_4_2 : SHADER_PROFILE_DX_5_0; CreationAttrs.UseCombinedTextureSamplers = true; RefCntAutoPtr pVS, pPS; -- cgit v1.2.3