mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-28 01:39:05 +00:00
Just a quick test
This commit is contained in:
@@ -1072,17 +1072,6 @@ void BufferCache<P>::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32
|
||||
const u32 size = (std::min)(binding.size, (*channel_state->uniform_buffer_sizes)[stage][index]);
|
||||
Buffer& buffer = slot_buffers[binding.buffer_id];
|
||||
TouchBuffer(buffer, binding.buffer_id);
|
||||
if constexpr (USE_UNIFIED_MEMORY) {
|
||||
const auto window = TryResolveUnifiedRange(device_addr, size);
|
||||
if (window && runtime.IsUnifiedUniformRange(size, window->offset)) {
|
||||
channel_state->fast_bound_uniform_buffers[stage] &= ~(1u << binding_index);
|
||||
channel_state->uniform_buffer_binding_sizes[stage][binding_index] = size;
|
||||
runtime.BindUniformBuffer(runtime.UnifiedWindowBuffer(window->window),
|
||||
runtime.UnifiedWindowAddress(window->window),
|
||||
static_cast<u32>(window->offset), size);
|
||||
return;
|
||||
}
|
||||
}
|
||||
const bool has_host_buffer = binding.buffer_id != NULL_BUFFER_ID;
|
||||
const u32 offset = has_host_buffer ? buffer.Offset(device_addr) : 0;
|
||||
const bool needs_alignment_stream = [&]() {
|
||||
|
||||
@@ -190,10 +190,6 @@ public:
|
||||
BindBuffer(buffer, offset, size);
|
||||
}
|
||||
|
||||
void BindUniformBuffer(VkBuffer buffer, VkDeviceAddress address, u32 offset, u32 size) {
|
||||
guest_descriptor_queue.AddBuffer(buffer, address, offset, size);
|
||||
}
|
||||
|
||||
void BindStorageBuffer(const Buffer& buffer, u32 offset, u32 size,
|
||||
[[maybe_unused]] bool is_written) {
|
||||
BindBuffer(buffer, offset, size);
|
||||
@@ -222,11 +218,6 @@ public:
|
||||
(offset % device.GetStorageBufferAlignment()) == 0;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool IsUnifiedUniformRange(u32 size, u64 offset) const {
|
||||
return size <= device.GetMaxUniformBufferRange() &&
|
||||
(offset % device.GetUniformBufferAlignment()) == 0;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool IsUnifiedIndexRange(PrimitiveTopology topology, IndexFormat index_format,
|
||||
u64 offset) const;
|
||||
|
||||
|
||||
@@ -351,10 +351,6 @@ public:
|
||||
return properties.properties.limits.maxStorageBufferRange;
|
||||
}
|
||||
|
||||
VkDeviceSize GetMaxUniformBufferRange() const {
|
||||
return properties.properties.limits.maxUniformBufferRange;
|
||||
}
|
||||
|
||||
std::array<u32, 3> GetMaxComputeWorkGroupCount() const {
|
||||
const auto& count = properties.properties.limits.maxComputeWorkGroupCount;
|
||||
return {count[0], count[1], count[2]};
|
||||
|
||||
Reference in New Issue
Block a user