rsx: use std::span and const ref

This commit is contained in:
Megamouse
2026-09-30 16:33:05 +02:00
parent a8fabaf570
commit da0dc28841
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -743,7 +743,7 @@ namespace rsx
// indirection table size
const auto full_reupload = !prog || prog->has_indexed_constants;
const auto reloc_table = full_reupload ? decltype(prog->constant_ids){} : prog->constant_ids;
const auto reloc_table = full_reupload ? std::span<const u16>{} : std::span<const u16>(prog->constant_ids);
const auto redirection_table_size = full_reupload ? 468u : ::size32(prog->constant_ids);
instancing_indirection_table.resize(redirection_table_size);
+1 -1
View File
@@ -839,7 +839,7 @@ void GLGSRender::emit_geometry(u32 sub_index)
}
else
{
const auto subranges = draw_call.get_subranges();
const auto& subranges = draw_call.get_subranges();
const auto draw_count = subranges.size();
const u32 type_scale = (index_type == GL_UNSIGNED_SHORT) ? 1 : 2;
uptr index_ptr = index_offset;
+4 -4
View File
@@ -1166,14 +1166,14 @@ void VKGSRender::emit_geometry(u32 sub_index)
}
else if (m_device->get_multidraw_support())
{
const auto subranges = draw_call.get_subranges();
const auto& subranges = draw_call.get_subranges();
auto ptr = utils::bless<const VkMultiDrawInfoEXT>(&subranges.front().first);
_vkCmdDrawMultiEXT(*m_current_command_buffer, ::size32(subranges), ptr, 1, 0, sizeof(rsx::draw_range_t));
}
else
{
u32 vertex_offset = 0;
const auto subranges = draw_call.get_subranges();
const auto& subranges = draw_call.get_subranges();
for (const auto& range : subranges)
{
vkCmdDraw(*m_current_command_buffer, range.count, 1, vertex_offset, 0);
@@ -1198,7 +1198,7 @@ void VKGSRender::emit_geometry(u32 sub_index)
}
else if (m_device->get_multidraw_support())
{
const auto subranges = draw_call.get_subranges();
const auto& subranges = draw_call.get_subranges();
const auto subranges_count = ::size32(subranges);
const auto allocation_size = subranges_count * sizeof(VkMultiDrawIndexedInfoEXT);
@@ -1223,7 +1223,7 @@ void VKGSRender::emit_geometry(u32 sub_index)
else
{
u32 vertex_offset = 0;
const auto subranges = draw_call.get_subranges();
const auto& subranges = draw_call.get_subranges();
for (const auto& range : subranges)
{
const auto count = get_index_count(draw_call.primitive, range.count);