rsx: Gather most rsx commands pretty printing and state modification function in a single file.

rsx_decode.h implements a "rsx_decoders" template class that is specialized for most GCM command
found in rsx command buffer. 3 static members are defined : a "decode" function that turns command
value into a more meaninfull type if applicable (for instance bool for _enabled* command, surface
formats for set_surface_format command...), a "commit_rsx_state" that modifies a given rsx_state
structure when the command is parsed, and a "dump" function used in rsx_debugger for pretty printing.
Hopefully having the 3 functions in a single place for every command will act as a self documenting
list of rsx command buffer opcode.

rsx_state is also expanded into several explicit variables instead of being stored into a u32 array.
This should makes debugging easier (Visual Studio will display the exact value of these member for instance)
as well as preparing rsx_state for serialisation/deserialisation.

The vertex array and textures opcode are not concerned atm for bisecting purpose.
This commit is contained in:
Vincent Lejeune 2016-07-05 19:05:45 +02:00
parent 692d9dd4ae
commit d97cdb9fbf
8 changed files with 3990 additions and 1250 deletions

View file

@ -468,7 +468,7 @@ namespace rsx
//LOG_NOTICE(RSX, "%s(0x%x) = 0x%x", get_method_name(reg).c_str(), reg, value);
method_registers[reg] = value;
method_registers.decode(reg, value);
if (capture_current_frame)
{