Skip to content

Commit 9fe3d7b

Browse files
committed
SPIRV Version CVulkanPhysicalDevice fix
1 parent 81b8d18 commit 9fe3d7b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/nbl/video/CVulkanPhysicalDevice.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class CVulkanPhysicalDevice final : public IPhysicalDevice
8181
m_limits.maxResidentInvocations = beefyGPUWorkgroupMaxOccupancy*m_limits.maxOptimallyResidentWorkgroupInvocations;
8282

8383
m_limits.spirvVersion = asset::IGLSLCompiler::ESV_1_3;
84-
#if 0
84+
8585
switch (VK_API_VERSION_MINOR(deviceProperties.properties.apiVersion))
8686
{
8787
case 0:
@@ -94,7 +94,6 @@ class CVulkanPhysicalDevice final : public IPhysicalDevice
9494
_NBL_DEBUG_BREAK_IF("Invalid Vulkan minor version!");
9595
break;
9696
}
97-
#endif
9897

9998
// AccelerationStructure
10099
if (m_availableFeatureSet.find(VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME) != m_availableFeatureSet.end())
@@ -221,7 +220,8 @@ class CVulkanPhysicalDevice final : public IPhysicalDevice
221220
}
222221

223222
std::ostringstream pool;
224-
addCommonGLSLDefines(pool,false/*TODO: @achal detect if RenderDoc is running*/);
223+
bool runningRDoc = (m_rdoc_api != nullptr);
224+
addCommonGLSLDefines(pool,runningRDoc);
225225
finalizeGLSLDefinePool(std::move(pool));
226226
}
227227

@@ -347,11 +347,11 @@ class CVulkanPhysicalDevice final : public IPhysicalDevice
347347
if (!insertFeatureIfAvailable(params.optionalFeatures[i], selectedFeatureSet))
348348
continue;
349349
}
350-
351-
if (selectedFeatureSet.find(VK_KHR_SPIRV_1_4_EXTENSION_NAME) != selectedFeatureSet.end()
352-
&& (m_limits.spirvVersion < asset::IGLSLCompiler::ESV_1_4))
350+
351+
if (m_availableFeatureSet.find(VK_KHR_SPIRV_1_4_EXTENSION_NAME) != m_availableFeatureSet.end() && (m_limits.spirvVersion < asset::IGLSLCompiler::ESV_1_4))
353352
{
354353
m_limits.spirvVersion = asset::IGLSLCompiler::ESV_1_4;
354+
selectedFeatureSet.insert(VK_KHR_SPIRV_1_4_EXTENSION_NAME);
355355
}
356356

357357
core::vector<const char*> selectedFeatures(selectedFeatureSet.size());

0 commit comments

Comments
 (0)