summaryrefslogtreecommitdiff
path: root/tools/gfx/d3d11
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/d3d11')
-rw-r--r--tools/gfx/d3d11/d3d11-device.cpp8
-rw-r--r--tools/gfx/d3d11/d3d11-query.cpp4
2 files changed, 8 insertions, 4 deletions
diff --git a/tools/gfx/d3d11/d3d11-device.cpp b/tools/gfx/d3d11/d3d11-device.cpp
index e6a348dc1..4ab26725e 100644
--- a/tools/gfx/d3d11/d3d11-device.cpp
+++ b/tools/gfx/d3d11/d3d11-device.cpp
@@ -47,10 +47,10 @@ SlangResult DeviceImpl::initialize(const Desc& desc)
// Rather than statically link against D3D, we load it dynamically.
SharedLibrary::Handle d3dModule;
-#if SLANG_WINDOWS_FAMILY
- const char* libName = "d3d11";
-#else
+#if SLANG_ENABLE_DXVK
const char* libName = "dxvk_d3d11";
+#else
+ const char* libName = "d3d11";
#endif
if (SLANG_FAILED(SharedLibrary::load(libName, d3dModule)))
{
@@ -1428,6 +1428,8 @@ void DeviceImpl::bindRootShaderObject(IShaderObject* shaderObject)
{
RootShaderObjectImpl* rootShaderObjectImpl = static_cast<RootShaderObjectImpl*>(shaderObject);
RefPtr<PipelineStateBase> specializedPipeline;
+ // TODO: Do something less crappy than just asserting on failure here
+ SLANG_ASSERT_VOID_ON_FAIL(maybeSpecializePipeline(m_currentPipelineState, rootShaderObjectImpl, specializedPipeline));
maybeSpecializePipeline(m_currentPipelineState, rootShaderObjectImpl, specializedPipeline);
PipelineStateImpl* specializedPipelineImpl = static_cast<PipelineStateImpl*>(specializedPipeline.Ptr());
setPipelineState(specializedPipelineImpl);
diff --git a/tools/gfx/d3d11/d3d11-query.cpp b/tools/gfx/d3d11/d3d11-query.cpp
index 37b8ddc25..c917ccbca 100644
--- a/tools/gfx/d3d11/d3d11-query.cpp
+++ b/tools/gfx/d3d11/d3d11-query.cpp
@@ -1,6 +1,8 @@
// d3d11-query.cpp
#include "d3d11-query.h"
+#include "core/slang-process.h"
+
namespace gfx
{
@@ -39,7 +41,7 @@ SLANG_NO_THROW Result SLANG_MCALL QueryPoolImpl::getResult(
while (S_OK != m_device->m_immediateContext->GetData(
m_device->m_disjointQuery, &disjointData, sizeof(D3D11_QUERY_DATA_TIMESTAMP_DISJOINT), 0))
{
- Sleep(1);
+ Process::sleepCurrentThread(1);
}
m_device->m_info.timestampFrequency = disjointData.Frequency;