mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[d3d11] Move sType/pNext initialization for dev.features to backend
There's no good reason to have this code in the D3D11 module.
This commit is contained in:
parent
f7ed7b7118
commit
cbaeca8f43
@ -1351,21 +1351,12 @@ namespace dxvk {
|
||||
DxvkDeviceFeatures supported = adapter->features();
|
||||
DxvkDeviceFeatures enabled = {};
|
||||
|
||||
enabled.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
|
||||
enabled.core.pNext = nullptr;
|
||||
// Geometry shaders are used for some meta ops
|
||||
enabled.core.features.geometryShader = VK_TRUE;
|
||||
enabled.core.features.robustBufferAccess = VK_TRUE;
|
||||
|
||||
enabled.extMemoryPriority.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT;
|
||||
enabled.extMemoryPriority.pNext = nullptr;
|
||||
enabled.extMemoryPriority.memoryPriority = supported.extMemoryPriority.memoryPriority;
|
||||
enabled.extMemoryPriority.memoryPriority = supported.extMemoryPriority.memoryPriority;
|
||||
|
||||
enabled.extTransformFeedback.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT;
|
||||
enabled.extTransformFeedback.pNext = nullptr;
|
||||
|
||||
enabled.extVertexAttributeDivisor.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT;
|
||||
enabled.extVertexAttributeDivisor.pNext = nullptr;
|
||||
enabled.extVertexAttributeDivisor.vertexAttributeInstanceRateDivisor = supported.extVertexAttributeDivisor.vertexAttributeInstanceRateDivisor;
|
||||
enabled.extVertexAttributeDivisor.vertexAttributeInstanceRateZeroDivisor = supported.extVertexAttributeDivisor.vertexAttributeInstanceRateZeroDivisor;
|
||||
|
||||
|
@ -268,19 +268,23 @@ namespace dxvk {
|
||||
this->logNameList(extensionNameList);
|
||||
|
||||
// Create pNext chain for additional device features
|
||||
enabledFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
|
||||
enabledFeatures.core.pNext = nullptr;
|
||||
|
||||
if (devExtensions.extMemoryPriority) {
|
||||
enabledFeatures.extMemoryPriority.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT;
|
||||
enabledFeatures.extMemoryPriority.pNext = enabledFeatures.core.pNext;
|
||||
enabledFeatures.core.pNext = &enabledFeatures.extMemoryPriority;
|
||||
}
|
||||
|
||||
if (devExtensions.extTransformFeedback) {
|
||||
enabledFeatures.extTransformFeedback.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT;
|
||||
enabledFeatures.extTransformFeedback.pNext = enabledFeatures.core.pNext;
|
||||
enabledFeatures.core.pNext = &enabledFeatures.extTransformFeedback;
|
||||
}
|
||||
|
||||
if (devExtensions.extVertexAttributeDivisor.revision() >= 3) {
|
||||
enabledFeatures.extVertexAttributeDivisor.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT;
|
||||
enabledFeatures.extVertexAttributeDivisor.pNext = enabledFeatures.core.pNext;
|
||||
enabledFeatures.core.pNext = &enabledFeatures.extVertexAttributeDivisor;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user