mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-10-11 22:49:55 +00:00
rsx: use std::span and const ref
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user