mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 03:02:53 +01:00
Savestates/RSX: Save drawing context
This commit is contained in:
parent
5f8f9e33f1
commit
4ac88fa8d3
@ -1,4 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
#include "Utilities/JIT.h"
|
||||
#include "Utilities/date_time.h"
|
||||
#include "Emu/Memory/vm.h"
|
||||
|
@ -457,6 +457,7 @@ namespace rsx
|
||||
if (ar.is_writing() || GET_SERIALIZATION_VERSION(rsx) != 1u)
|
||||
{
|
||||
ar(unsent_gcm_events);
|
||||
ar(rsx::method_registers.current_draw_clause);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2837,6 +2837,11 @@ namespace rsx
|
||||
return registers[reg] == value;
|
||||
}
|
||||
|
||||
void draw_clause::operator()(utils::serial& ar)
|
||||
{
|
||||
ar(draw_command_ranges, draw_command_barriers, current_range_index, primitive, command, is_immediate_draw, is_disjoint_primitive, primitive_barrier_enable, inline_vertex_array);
|
||||
}
|
||||
|
||||
void draw_clause::insert_command_barrier(command_barrier_type type, u32 arg, u32 index)
|
||||
{
|
||||
ensure(!draw_command_ranges.empty());
|
||||
|
@ -55,6 +55,8 @@ namespace rsx
|
||||
|
||||
return timestamp < other.timestamp;
|
||||
}
|
||||
|
||||
ENABLE_BITWISE_SERIALIZATION;
|
||||
};
|
||||
|
||||
struct draw_range_t
|
||||
@ -62,6 +64,8 @@ namespace rsx
|
||||
u32 command_data_offset = 0;
|
||||
u32 first = 0;
|
||||
u32 count = 0;
|
||||
|
||||
ENABLE_BITWISE_SERIALIZATION;
|
||||
};
|
||||
|
||||
class draw_clause
|
||||
@ -115,6 +119,8 @@ namespace rsx
|
||||
|
||||
simple_array<u32> inline_vertex_array{};
|
||||
|
||||
void operator()(utils::serial& ar);
|
||||
|
||||
void insert_command_barrier(command_barrier_type type, u32 arg, u32 register_index = 0);
|
||||
|
||||
/**
|
||||
|
@ -258,6 +258,13 @@ namespace utils
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename T> requires requires (T& obj) { (obj.*(&T::operator()))(std::declval<stx::exact_t<utils::serial&>>()); }
|
||||
bool serialize(T& obj)
|
||||
{
|
||||
obj(*this);
|
||||
return is_valid();
|
||||
}
|
||||
|
||||
template <usz i = 0, typename T>
|
||||
bool serialize_tuple(T& obj)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user