Skip to content

Commit

Permalink
[dxvk] Always enable extendedDynamicState feature
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Jul 7, 2022
1 parent f19607c commit b34421b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/dxvk/dxvk_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ namespace dxvk {
DxvkNameList extensionNameList = extensionsEnabled.toNameList();

// Enable additional device features if supported
enabledFeatures.extExtendedDynamicState.extendedDynamicState = m_deviceFeatures.extExtendedDynamicState.extendedDynamicState;
enabledFeatures.extExtendedDynamicState.extendedDynamicState = VK_TRUE;

enabledFeatures.ext4444Formats.formatA4B4G4R4 = m_deviceFeatures.ext4444Formats.formatA4B4G4R4;
enabledFeatures.ext4444Formats.formatA4R4G4B4 = m_deviceFeatures.ext4444Formats.formatA4R4G4B4;
Expand Down
12 changes: 2 additions & 10 deletions src/dxvk/dxvk_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ namespace dxvk {
m_gfxBarriers (DxvkCmdBuffer::ExecBuffer),
m_queryManager(m_common->queryPool()),
m_staging (device, StagingBufferSize) {
if (m_device->features().extExtendedDynamicState.extendedDynamicState)
m_features.set(DxvkContextFeature::ExtendedDynamicState);

// Init framebuffer info with default render pass in case
// the app does not explicitly bind any render targets
m_state.om.framebufferInfo = makeFramebufferInfo(m_state.om.renderTargets);
Expand Down Expand Up @@ -4988,13 +4985,8 @@ namespace dxvk {

// Vertex bindigs get remapped when compiling the
// pipeline, so this actually does the right thing
if (m_features.test(DxvkContextFeature::ExtendedDynamicState)) {
m_cmd->cmdBindVertexBuffers2(0, m_state.gp.state.il.bindingCount(),
buffers.data(), offsets.data(), lengths.data(), nullptr);
} else {
m_cmd->cmdBindVertexBuffers(0, m_state.gp.state.il.bindingCount(),
buffers.data(), offsets.data());
}
m_cmd->cmdBindVertexBuffers2(0, m_state.gp.state.il.bindingCount(),
buffers.data(), offsets.data(), lengths.data(), nullptr);
}


Expand Down
2 changes: 1 addition & 1 deletion src/dxvk/dxvk_context_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace dxvk {
* \brief Context feature bits
*/
enum class DxvkContextFeature {
ExtendedDynamicState,
FeatureCount
};

using DxvkContextFeatures = Flags<DxvkContextFeature>;
Expand Down

0 comments on commit b34421b

Please sign in to comment.