mirror of
https://github.com/dolphin-emu/fifoplayer.git
synced 2026-01-31 01:05:16 +01:00
dffclient: Add support for modifying the PE_CONTROL register.
This commit is contained in:
@@ -227,6 +227,15 @@ void LayoutStream::ActiveItemChanged(const QModelIndex& index)
|
||||
AddCheckBox(mode.alphaupdate, tr("Enable alpha writing")).endl();
|
||||
AddCheckBox(mode.dither, tr("Enable dithering")).endl();
|
||||
}
|
||||
else if (fifo_data[cmd_start+1] == BPMEM_ZCOMPARE) // 0x43
|
||||
{
|
||||
GET(PE_CONTROL, ctrl);
|
||||
|
||||
AddLabel(tr("Pixel Engine control")).endl();
|
||||
AddLabel(tr("EFB pixel format: ")).AddComboBox(ctrl.pixel_format, {"RGB8 Z24", "RGBA6 Z24", "RGB565 Z16", "Z24", "Y8", "U8", "V8", "YUV420"}).endl();
|
||||
AddLabel(tr("EFB depth format: ")).AddComboBox(ctrl.zformat, {tr("Linear"), tr("Near"), tr("Mid"), tr("Far"), tr("Inverse near"), tr("Inverse mid"), tr("Inverse far")}).endl();
|
||||
AddCheckBox(ctrl.early_ztest, tr("Early depth test")).endl();
|
||||
}
|
||||
else if (fifo_data[cmd_start+1] == BPMEM_TRIGGER_EFB_COPY) // 0x52
|
||||
{
|
||||
UPE_Copy& copy = *(UPE_Copy*)&cmddata;
|
||||
|
||||
@@ -116,7 +116,7 @@ void GetBPRegInfo(const u8* data, char* name, size_t name_size, char* desc, size
|
||||
case BPMEM_ZCOMPARE: // 0x43
|
||||
{
|
||||
SetRegName(BPMEM_ZCOMPARE);
|
||||
PE_CONTROL config; config.hex = cmddata;
|
||||
PE_CONTROL& config = *(PE_CONTROL*)&cmddata;
|
||||
const char* pixel_formats[] = { "RGB8_Z24", "RGBA6_Z24", "RGB565_Z16", "Z24", "Y8", "U8", "V8", "YUV420" };
|
||||
const char* zformats[] = { "linear", "compressed (near)", "compressed (mid)", "compressed (far)", "inv linear", "compressed (inv near)", "compressed (inv mid)", "compressed (inv far)" };
|
||||
snprintf(desc, desc_size, "EFB pixel format: %s\n"
|
||||
|
||||
@@ -765,14 +765,10 @@ union FieldMask
|
||||
|
||||
union PE_CONTROL
|
||||
{
|
||||
struct
|
||||
{
|
||||
u32 pixel_format : 3; // PIXELFMT_X
|
||||
u32 zformat : 3; // Z Compression for 16bit Z format
|
||||
u32 early_ztest : 1; // 1: before tex stage
|
||||
u32 unused : 17;
|
||||
u32 rid : 8;
|
||||
};
|
||||
BitField<0,3> pixel_format; // PIXELFMT_X
|
||||
BitField<3,3> zformat; // Z compression for 16 bit Z format
|
||||
BitField<6,1> early_ztest; // 1: before tex stage
|
||||
|
||||
u32 hex;
|
||||
};
|
||||
|
||||
@@ -781,7 +777,7 @@ union PE_CONTROL
|
||||
|
||||
union TCInfo
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 scale_minus_1 : 16;
|
||||
u32 range_bias : 1;
|
||||
|
||||
Reference in New Issue
Block a user