mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
rsx: Use variant based draw commands.
This commit is contained in:
parent
03c86ae43b
commit
8d54bcbc0d
8 changed files with 819 additions and 634 deletions
|
@ -636,6 +636,29 @@ namespace rsx
|
|||
return result;
|
||||
}
|
||||
|
||||
std::variant<draw_array_command, draw_indexed_array_command, draw_inlined_array>
|
||||
thread::get_draw_command(const rsx::rsx_state& state) const
|
||||
{
|
||||
if (rsx::method_registers.current_draw_clause.command == rsx::draw_command::array) {
|
||||
return draw_array_command{
|
||||
rsx::method_registers.current_draw_clause.first_count_commands};
|
||||
}
|
||||
|
||||
if (rsx::method_registers.current_draw_clause.command == rsx::draw_command::indexed) {
|
||||
return draw_indexed_array_command{
|
||||
rsx::method_registers.current_draw_clause.first_count_commands,
|
||||
get_raw_index_array(
|
||||
rsx::method_registers.current_draw_clause.first_count_commands)};
|
||||
}
|
||||
|
||||
if (rsx::method_registers.current_draw_clause.command == rsx::draw_command::inlined_array) {
|
||||
return draw_inlined_array{
|
||||
rsx::method_registers.current_draw_clause.inline_vertex_array};
|
||||
}
|
||||
|
||||
fmt::throw_exception("ill-formed draw command" HERE);
|
||||
}
|
||||
|
||||
void thread::do_internal_task()
|
||||
{
|
||||
if (m_internal_tasks.empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue