|
|
|
@ -1160,11 +1160,14 @@ void BufferCache<P>::BindHostGraphicsStorageBuffers(size_t stage) { |
|
|
|
if constexpr (USE_UNIFIED_DIRECT_BINDING && !NEEDS_BIND_STORAGE_INDEX) { |
|
|
|
u64 window_index = 0; |
|
|
|
u64 window_offset = 0; |
|
|
|
if (!is_written && runtime.SupportsUnifiedDescriptorBinding() && |
|
|
|
if (runtime.SupportsUnifiedDescriptorBinding() && |
|
|
|
size <= runtime.UnifiedMaxStorageBufferRange() && |
|
|
|
ResolveUnifiedDirectBinding(binding.device_addr, size, |
|
|
|
runtime.UnifiedStorageBufferAlignment(), window_index, |
|
|
|
window_offset)) { |
|
|
|
if (is_written) { |
|
|
|
MarkWrittenBufferInPlace(binding.device_addr, size); |
|
|
|
} |
|
|
|
runtime.BindStorageBufferFromWindow(window_index, static_cast<u32>(window_offset), |
|
|
|
size); |
|
|
|
return; |
|
|
|
@ -1312,11 +1315,14 @@ void BufferCache<P>::BindHostComputeStorageBuffers() { |
|
|
|
if constexpr (USE_UNIFIED_DIRECT_BINDING && !NEEDS_BIND_STORAGE_INDEX) { |
|
|
|
u64 window_index = 0; |
|
|
|
u64 window_offset = 0; |
|
|
|
if (!is_written && runtime.SupportsUnifiedDescriptorBinding() && |
|
|
|
if (runtime.SupportsUnifiedDescriptorBinding() && |
|
|
|
size <= runtime.UnifiedMaxStorageBufferRange() && |
|
|
|
ResolveUnifiedDirectBinding(binding.device_addr, size, |
|
|
|
runtime.UnifiedStorageBufferAlignment(), window_index, |
|
|
|
window_offset)) { |
|
|
|
if (is_written) { |
|
|
|
MarkWrittenBufferInPlace(binding.device_addr, size); |
|
|
|
} |
|
|
|
runtime.BindStorageBufferFromWindow(window_index, static_cast<u32>(window_offset), |
|
|
|
size); |
|
|
|
return; |
|
|
|
|