Skip to content

Commit

Permalink
[dxvk] Require EXT_robustness2 and the null descriptor feature
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Jul 3, 2022
1 parent f95f541 commit 2e7e9ea
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/d3d11/d3d11_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1931,7 +1931,6 @@ namespace dxvk {

enabled.extRobustness2.robustBufferAccess2 = supported.extRobustness2.robustBufferAccess2;
enabled.extRobustness2.robustImageAccess2 = supported.extRobustness2.robustImageAccess2;
enabled.extRobustness2.nullDescriptor = supported.extRobustness2.nullDescriptor;

enabled.extShaderDemoteToHelperInvocation.shaderDemoteToHelperInvocation = supported.extShaderDemoteToHelperInvocation.shaderDemoteToHelperInvocation;

Expand Down
3 changes: 0 additions & 3 deletions src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3903,9 +3903,6 @@ namespace dxvk {
enabled.extVertexAttributeDivisor.vertexAttributeInstanceRateDivisor = supported.extVertexAttributeDivisor.vertexAttributeInstanceRateDivisor;
enabled.extVertexAttributeDivisor.vertexAttributeInstanceRateZeroDivisor = supported.extVertexAttributeDivisor.vertexAttributeInstanceRateZeroDivisor;

// Null Descriptors
enabled.extRobustness2.nullDescriptor = supported.extRobustness2.nullDescriptor;

// ProcessVertices
enabled.core.features.vertexPipelineStoresAndAtomics = supported.core.features.vertexPipelineStoresAndAtomics;

Expand Down
2 changes: 2 additions & 0 deletions src/dxvk/dxvk_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ namespace dxvk {
enabledFeatures.ext4444Formats.formatA4B4G4R4 = m_deviceFeatures.ext4444Formats.formatA4B4G4R4;
enabledFeatures.ext4444Formats.formatA4R4G4B4 = m_deviceFeatures.ext4444Formats.formatA4R4G4B4;

enabledFeatures.extRobustness2.nullDescriptor = VK_TRUE;

Logger::info(str::format("Device properties:"
"\n Device name: : ", m_deviceInfo.core.properties.deviceName,
"\n Driver version : ",
Expand Down
8 changes: 1 addition & 7 deletions src/dxvk/dxvk_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ namespace dxvk {
m_gfxBarriers (DxvkCmdBuffer::ExecBuffer),
m_queryManager(m_common->queryPool()),
m_staging (device, StagingBufferSize) {
if (m_device->features().extRobustness2.nullDescriptor)
m_features.set(DxvkContextFeature::NullDescriptors);
if (m_device->features().extExtendedDynamicState.extendedDynamicState)
m_features.set(DxvkContextFeature::ExtendedDynamicState);

Expand Down Expand Up @@ -4589,12 +4587,8 @@ namespace dxvk {

if (m_vbTracked.set(binding))
m_cmd->trackResource<DxvkAccess::Read>(m_state.vi.vertexBuffers[binding].buffer());
} else if (m_features.test(DxvkContextFeature::NullDescriptors)) {
buffers[i] = VK_NULL_HANDLE;
offsets[i] = 0;
lengths[i] = 0;
} else {
buffers[i] = m_common->dummyResources().bufferHandle();
buffers[i] = VK_NULL_HANDLE;
offsets[i] = 0;
lengths[i] = 0;
}
Expand Down
1 change: 0 additions & 1 deletion src/dxvk/dxvk_context_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ namespace dxvk {
* \brief Context feature bits
*/
enum class DxvkContextFeature {
NullDescriptors,
ExtendedDynamicState,
};

Expand Down
2 changes: 1 addition & 1 deletion src/dxvk/dxvk_extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ namespace dxvk {
DxvkExt extHostQueryReset = { VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extMemoryBudget = { VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, DxvkExtMode::Passive };
DxvkExt extMemoryPriority = { VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extRobustness2 = { VK_EXT_ROBUSTNESS_2_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extRobustness2 = { VK_EXT_ROBUSTNESS_2_EXTENSION_NAME, DxvkExtMode::Required };
DxvkExt extShaderDemoteToHelperInvocation = { VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extShaderStencilExport = { VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extShaderViewportIndexLayer = { VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME, DxvkExtMode::Optional };
Expand Down

0 comments on commit 2e7e9ea

Please sign in to comment.