File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -3548,7 +3548,7 @@ namespace dxvk {
3548
3548
m_state.lazy .shadersUsed .set (ShaderStage);
3549
3549
m_state.lazy .bindingsUsed [ShaderStage] = pShaderModule->GetBindingMask ();
3550
3550
3551
- if (!m_state.lazy .shadersDirty .test (ShaderStage)) {
3551
+ if (!m_state.lazy .shadersDirty .test (ShaderStage) && (DebugLazyBinding != Tristate::False) ) {
3552
3552
if (!(m_state.lazy .bindingsDirty [ShaderStage] & m_state.lazy .bindingsUsed [ShaderStage]).empty ())
3553
3553
m_state.lazy .shadersDirty .set (ShaderStage);
3554
3554
}
@@ -4368,11 +4368,15 @@ namespace dxvk {
4368
4368
T& DirtyMask,
4369
4369
T DirtyBit,
4370
4370
bool IsNull) {
4371
+ // Forward immediately if lazy binding is forced off
4372
+ if (DebugLazyBinding == Tristate::False)
4373
+ return false ;
4374
+
4371
4375
if ((BoundMask & ~DirtyMask) & DirtyBit) {
4372
4376
// If we're binding a non-null resource to an active slot that has not been
4373
4377
// marked for lazy binding yet, forward the call immediately in order to
4374
4378
// avoid tracking overhead. This is by far the most common case.
4375
- if (likely (!IsNull))
4379
+ if (likely (!IsNull && DebugLazyBinding != Tristate::True ))
4376
4380
return false ;
4377
4381
4378
4382
// If we are binding a null resource to an active slot, the app will likely
Original file line number Diff line number Diff line change @@ -75,6 +75,11 @@ namespace dxvk {
75
75
// Use a local staging buffer to handle tiny uploads, most
76
76
// of the time we're fine with hitting the global allocator
77
77
constexpr static VkDeviceSize StagingBufferSize = 256ull << 10 ;
78
+
79
+ protected:
80
+ // Compile-time debug flag to force lazy binding on (True) or off (False)
81
+ constexpr static Tristate DebugLazyBinding = Tristate::Auto;
82
+
78
83
public:
79
84
80
85
D3D11CommonContext (
Original file line number Diff line number Diff line change @@ -1053,6 +1053,10 @@ namespace dxvk {
1053
1053
1054
1054
void D3D11ImmediateContext::ConsiderFlush (
1055
1055
GpuFlushType FlushType) {
1056
+ // In stress test mode, behave as if this would always flush
1057
+ if (DebugLazyBinding == Tristate::True)
1058
+ ApplyDirtyNullBindings ();
1059
+
1056
1060
uint64_t chunkId = GetCurrentSequenceNumber ();
1057
1061
uint64_t submissionId = m_submissionFence->value ();
1058
1062
You can’t perform that action at this time.
0 commit comments