PCSX2 Documentation/GSdx Debug: Difference between revisions

Jump to navigation Jump to search
m
 
(3 intermediate revisions by 2 users not shown)
Line 12: Line 12:
You can represent the emotion engine (CPU) and the graphics synthesiser (GPU) as 2 separates black-boxed blocks linked together with an unique channel. GSdump is a recording of all communications + an initial GS reset state (AKA GS save state).
You can represent the emotion engine (CPU) and the graphics synthesiser (GPU) as 2 separates black-boxed blocks linked together with an unique channel. GSdump is a recording of all communications + an initial GS reset state (AKA GS save state).


Note: edit wiki to see correct format (TODO nice picture)
[[File:GSdump debug.png]]
<pre>
Round 1: recording
------        ------
| EE |  <=>  | GS |
------    v  ------
          |
          v
        GSdump record
 
Round 2: replaying
        ------
    >  | GS |
    ^  ------
    |
    ^
GSdump data</pre>
 


The EE/GS state depends on the user input (from the keyboard/pad). It is quite difficult to replay the same scene, angle of the 3d scene could be different. Some lighting effects could be also different. The GSdump saves a couple of frames to allow constant replay. This way you can compare renderer precisely. For example you can check that pixel (32, 456) of draw call 45 is exactly the same colour. If the value is slightly different it is likely a rounding bug. If the value is completely different, it is a bug.
The EE/GS state depends on the user input (from the keyboard/pad). It is quite difficult to replay the same scene, angle of the 3d scene could be different. Some lighting effects could be also different. The GSdump saves a couple of frames to allow constant replay. This way you can compare renderer precisely. For example you can check that pixel (32, 456) of draw call 45 is exactly the same colour. If the value is slightly different it is likely a rounding bug. If the value is completely different, it is a bug.
Line 58: Line 41:


=== Advance debug capabilities ===
=== Advance debug capabilities ===
=> gs register state dump
=> gs register state dump + other txt dump


=> gs texture/buffer dump. Explain naming convention
=> gs texture/buffer dump. Explain naming convention
* linux_replay = n <= replay the trace n times
* dump = 1 <= Enable dumping infrastructure
* save = 1 <= dump render (color) target
* savez = 1 <= dump depth target
* savet = 1 <= dump input texture
* savef = 1 <= dump renderer frame (before GS CRTC processing)
* saven = nnn <= first draw call to dump
* savel = nnn <= number of draw call to dump
s = format("%05d_f%lld_rt0_%05x_%s.bmp", s_n, frame, context->FRAME.Block(), psm_str(context->FRAME.PSM));
Texture dump naming convention
<draw_call_number>_f<frame_number>_<keyword>_<block_address>_<format>
Possible keyword are (search format("%05d keyword in source, mostly in GSRenderer*);
* rt0: color buffer before draw
* rt1: color buffer after draw
* ... to be continued ...
Possible format are (TODO formatting)
// Normal color
case PSM_PSMCT32:  return "C_32";
case PSM_PSMCT24:  return "C_24";
case PSM_PSMCT16:  return "C_16";
case PSM_PSMCT16S: return "C_16S";
// Palette color
case PSM_PSMT8:    return "P_8";
case PSM_PSMT4:    return "P_4";
case PSM_PSMT8H:  return "P_8H";
case PSM_PSMT4HL:  return "P_4HL";
case PSM_PSMT4HH:  return "P_4HH";
// Depth
case PSM_PSMZ32:  return "Z_32";
case PSM_PSMZ24:  return "Z_24";
case PSM_PSMZ16:  return "Z_16";
case PSM_PSMZ16S:  return "Z_16S";
                case PSM_PSGPU24: return "PS24";
Note: frame_number starts at 5000


=> OpenGL trace
=> OpenGL trace
ninja
56

edits

Navigation menu