mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-11-01 11:58:19 +00:00
Just a quick test
This commit is contained in:
@@ -1079,17 +1079,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]);
|
const u32 size = (std::min)(binding.size, (*channel_state->uniform_buffer_sizes)[stage][index]);
|
||||||
Buffer& buffer = slot_buffers[binding.buffer_id];
|
Buffer& buffer = slot_buffers[binding.buffer_id];
|
||||||
TouchBuffer(buffer, 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 bool has_host_buffer = binding.buffer_id != NULL_BUFFER_ID;
|
||||||
const u32 offset = has_host_buffer ? buffer.Offset(device_addr) : 0;
|
const u32 offset = has_host_buffer ? buffer.Offset(device_addr) : 0;
|
||||||
const bool needs_alignment_stream = [&]() {
|
const bool needs_alignment_stream = [&]() {
|
||||||
|
|||||||
@@ -241,10 +241,6 @@ public:
|
|||||||
BindBuffer(buffer, offset, size);
|
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,
|
void BindStorageBuffer(const Buffer& buffer, u32 offset, u32 size,
|
||||||
[[maybe_unused]] bool is_written) {
|
[[maybe_unused]] bool is_written) {
|
||||||
BindBuffer(buffer, offset, size);
|
BindBuffer(buffer, offset, size);
|
||||||
@@ -273,11 +269,6 @@ public:
|
|||||||
(offset % device.GetStorageBufferAlignment()) == 0;
|
(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,
|
[[nodiscard]] bool IsUnifiedIndexRange(PrimitiveTopology topology, IndexFormat index_format,
|
||||||
u64 offset) const;
|
u64 offset) const;
|
||||||
|
|
||||||
|
|||||||
@@ -360,10 +360,6 @@ public:
|
|||||||
return properties.properties.limits.maxStorageBufferRange;
|
return properties.properties.limits.maxStorageBufferRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkDeviceSize GetMaxUniformBufferRange() const {
|
|
||||||
return properties.properties.limits.maxUniformBufferRange;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::array<u32, 3> GetMaxComputeWorkGroupCount() const {
|
std::array<u32, 3> GetMaxComputeWorkGroupCount() const {
|
||||||
const auto& count = properties.properties.limits.maxComputeWorkGroupCount;
|
const auto& count = properties.properties.limits.maxComputeWorkGroupCount;
|
||||||
return {count[0], count[1], count[2]};
|
return {count[0], count[1], count[2]};
|
||||||
|
|||||||
Reference in New Issue
Block a user