mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-06 00:59:18 +00:00
RSX : log NV4097_SET_CONTEXT_DMA_REPORT
This commit is contained in:
parent
0388ba5032
commit
8690c02972
@ -11,6 +11,7 @@
|
||||
#include "Emu/SysCalls/lv2/sys_time.h"
|
||||
|
||||
#define ARGS(x) (x >= count ? OutOfArgsCount(x, cmd, count, args.addr()) : args[x].ToLE())
|
||||
#define CMD_DEBUG 0
|
||||
|
||||
u32 methodRegisters[0xffff];
|
||||
|
||||
@ -169,14 +170,6 @@ u32 RSXVertexData::GetTypeSize()
|
||||
}
|
||||
}
|
||||
|
||||
#define CMD_DEBUG 0
|
||||
|
||||
#if CMD_DEBUG
|
||||
#define CMD_LOG(...) LOG_NOTICE(RSX, __VA_ARGS__)
|
||||
#else
|
||||
#define CMD_LOG(...)
|
||||
#endif
|
||||
|
||||
u32 RSXThread::OutOfArgsCount(const uint x, const u32 cmd, const u32 count, const u32 args_addr)
|
||||
{
|
||||
auto args = vm::ptr<u32>::make(args_addr);
|
||||
@ -255,11 +248,11 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
auto args = vm::ptr<u32>::make(args_addr);
|
||||
|
||||
#if CMD_DEBUG
|
||||
std::string debug = GetMethodName(cmd);
|
||||
debug += "(";
|
||||
for (u32 i = 0; i < count; ++i) debug += (i ? ", " : "") + fmt::Format("0x%x", ARGS(i));
|
||||
debug += ")";
|
||||
LOG_NOTICE(RSX, debug);
|
||||
std::string debug = GetMethodName(cmd);
|
||||
debug += "(";
|
||||
for (u32 i = 0; i < count; ++i) debug += (i ? ", " : "") + fmt::Format("0x%x", ARGS(i));
|
||||
debug += ")";
|
||||
LOG_NOTICE(RSX, debug);
|
||||
#endif
|
||||
|
||||
u32 index = 0;
|
||||
@ -278,7 +271,9 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV406E_SET_CONTEXT_DMA_SEMAPHORE:
|
||||
{
|
||||
if (ARGS(0))
|
||||
LOG_WARNING(RSX, "NV406E_SET_CONTEXT_DMA_SEMAPHORE: 0x%x", ARGS(0));
|
||||
{
|
||||
LOG_WARNING(RSX, "TODO: NV406E_SET_CONTEXT_DMA_SEMAPHORE: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -293,7 +288,9 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV406E_SEMAPHORE_ACQUIRE:
|
||||
{
|
||||
if (ARGS(0))
|
||||
LOG_WARNING(RSX, "NV406E_SEMAPHORE_ACQUIRE: 0x%x", ARGS(0));
|
||||
{
|
||||
LOG_WARNING(RSX, "TODO: NV406E_SEMAPHORE_ACQUIRE: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -323,76 +320,88 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
|
||||
// NV4097
|
||||
case 0x0003fead:
|
||||
//if (cmd == 0xfeadffff)
|
||||
{
|
||||
Flip();
|
||||
|
||||
m_last_flip_time = get_system_time();
|
||||
m_gcm_current_buffer = ARGS(0);
|
||||
m_read_buffer = true;
|
||||
m_flip_status = 0;
|
||||
|
||||
if (m_flip_handler)
|
||||
{
|
||||
//LOG_WARNING(RSX, "Flip()");
|
||||
Flip();
|
||||
|
||||
m_last_flip_time = get_system_time();
|
||||
|
||||
m_gcm_current_buffer = ARGS(0);
|
||||
m_read_buffer = true;
|
||||
m_flip_status = 0;
|
||||
|
||||
if (m_flip_handler)
|
||||
auto cb = m_flip_handler;
|
||||
Emu.GetCallbackManager().Async([cb]()
|
||||
{
|
||||
auto cb = m_flip_handler;
|
||||
Emu.GetCallbackManager().Async([cb]()
|
||||
{
|
||||
cb(1);
|
||||
});
|
||||
cb(1);
|
||||
});
|
||||
}
|
||||
|
||||
auto sync = [&]()
|
||||
{
|
||||
double limit;
|
||||
switch (Ini.GSFrameLimit.GetValue())
|
||||
{
|
||||
case 1: limit = 50.; break;
|
||||
case 2: limit = 59.94; break;
|
||||
case 3: limit = 30.; break;
|
||||
case 4: limit = 60.; break;
|
||||
case 5: limit = m_fps_limit; break; //TODO
|
||||
|
||||
case 0:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
auto sync = [&]()
|
||||
{
|
||||
double limit;
|
||||
switch (Ini.GSFrameLimit.GetValue())
|
||||
{
|
||||
case 1: limit = 50.; break;
|
||||
case 2: limit = 59.94; break;
|
||||
case 3: limit = 30.; break;
|
||||
case 4: limit = 60.; break;
|
||||
case 5: limit = m_fps_limit; break; //TODO
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds((s64)(1000.0 / limit - m_timer_sync.GetElapsedTimeInMilliSec())));
|
||||
m_timer_sync.Start();
|
||||
};
|
||||
|
||||
case 0:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
sync();
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds((s64)(1000.0 / limit - m_timer_sync.GetElapsedTimeInMilliSec())));
|
||||
m_timer_sync.Start();
|
||||
};
|
||||
|
||||
sync();
|
||||
|
||||
//Emu.Pause();
|
||||
}
|
||||
//Emu.Pause();
|
||||
}
|
||||
break;
|
||||
|
||||
case NV4097_NO_OPERATION:
|
||||
{
|
||||
// Nothing to do here
|
||||
}
|
||||
break;
|
||||
|
||||
case NV4097_SET_CONTEXT_DMA_REPORT:
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_CONTEXT_DMA_REPORT: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NV4097_NOTIFY:
|
||||
{
|
||||
if (ARGS(0))
|
||||
LOG_WARNING(RSX, "NV4097_NOTIFY: 0x%x", ARGS(0));
|
||||
{
|
||||
LOG_WARNING(RSX, "TODO: NV4097_NOTIFY: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NV4097_WAIT_FOR_IDLE:
|
||||
{
|
||||
if (ARGS(0))
|
||||
LOG_WARNING(RSX, "NV4097_WAIT_FOR_IDLE: 0x%x", ARGS(0));
|
||||
{
|
||||
LOG_WARNING(RSX, "TODO: NV4097_WAIT_FOR_IDLE: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NV4097_PM_TRIGGER:
|
||||
{
|
||||
if (ARGS(0))
|
||||
LOG_WARNING(RSX, "NV4097_PM_TRIGGER: 0x%x", ARGS(0));
|
||||
{
|
||||
LOG_WARNING(RSX, "TODO: NV4097_PM_TRIGGER: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -412,7 +421,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
|
||||
case_16(NV4097_SET_TEX_COORD_CONTROL, 4) :
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_TEX_COORD_CONTROL");
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_TEX_COORD_CONTROL");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -465,6 +474,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
m_vertex_data[index].data.push_back(v1);
|
||||
m_vertex_data[index].data.push_back(v2);
|
||||
m_vertex_data[index].data.push_back(v3);
|
||||
|
||||
//LOG_WARNING(RSX, "NV4097_SET_VERTEX_DATA4UB_M: index = %d, v0 = 0x%x, v1 = 0x%x, v2 = 0x%x, v3 = 0x%x", index, v0, v1, v2, v3);
|
||||
}
|
||||
break;
|
||||
@ -518,7 +528,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case_16(NV4097_SET_VERTEX_DATA_ARRAY_OFFSET, 4) :
|
||||
{
|
||||
const u32 addr = GetAddress(ARGS(0) & 0x7fffffff, ARGS(0) >> 31);
|
||||
CMD_LOG("num=%d, addr=0x%x", index, addr);
|
||||
|
||||
m_vertex_data[index].addr = addr;
|
||||
m_vertex_data[index].data.clear();
|
||||
|
||||
@ -534,8 +544,6 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
u8 size = (a0 >> 4) & 0xf;
|
||||
u8 type = a0 & 0xf;
|
||||
|
||||
CMD_LOG("index=%d, frequency=%d, stride=%d, size=%d, type=%d", index, frequency, stride, size, type);
|
||||
|
||||
RSXVertexData& cv = m_vertex_data[index];
|
||||
cv.frequency = frequency;
|
||||
cv.stride = stride;
|
||||
@ -543,6 +551,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
cv.type = type;
|
||||
|
||||
//LOG_WARNING(RSX, "NV4097_SET_VERTEX_DATA_ARRAY_FORMAT: index=%d, frequency=%d, stride=%d, size=%d, type=%d", index, frequency, stride, size, type);
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
@ -551,7 +560,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_VERTEX_ATTRIB_INPUT_MASK: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_VERTEX_ATTRIB_INPUT_MASK: 0x%x", ARGS(0));
|
||||
}
|
||||
|
||||
//VertexData[0].prog.attributeInputMask = ARGS(0);
|
||||
@ -562,7 +571,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_VERTEX_ATTRIB_OUTPUT_MASK: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_VERTEX_ATTRIB_OUTPUT_MASK: 0x%x", ARGS(0));
|
||||
}
|
||||
|
||||
//VertexData[0].prog.attributeOutputMask = ARGS(0);
|
||||
@ -587,7 +596,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_COLOR_MASK_MRT: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_COLOR_MASK_MRT: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -693,7 +702,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_BLEND_COLOR2: 0x % x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO : NV4097_SET_BLEND_COLOR2: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -710,7 +719,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_REDUCE_DST_COLOR: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_REDUCE_DST_COLOR: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -758,7 +767,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
m_viewport_h = ARGS(1) >> 16;
|
||||
}
|
||||
|
||||
CMD_LOG("x=%d, y=%d, w=%d, h=%d", m_viewport_x, m_viewport_y, m_viewport_w, m_viewport_h);
|
||||
//LOG_NOTICE(RSX, "NV4097_SET_VIEWPORT_HORIZONTAL: x=%d, y=%d, w=%d, h=%d", m_viewport_x, m_viewport_y, m_viewport_w, m_viewport_h);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -767,6 +776,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
m_set_viewport_vertical = true;
|
||||
m_viewport_y = ARGS(0) & 0xffff;
|
||||
m_viewport_h = ARGS(0) >> 16;
|
||||
|
||||
//LOG_NOTICE(RSX, "NV4097_SET_VIEWPORT_VERTICAL: y=%d, h=%d", m_viewport_y, m_viewport_h);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -787,7 +798,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
m_clip_min = (float&)a0;
|
||||
m_clip_max = (float&)a1;
|
||||
|
||||
CMD_LOG("clip_min=%.01f, clip_max=%.01f", m_clip_min, m_clip_max);
|
||||
//LOG_NOTICE(RSX, "NV4097_SET_CLIP_MIN: clip_min=%.01f, clip_max=%.01f", m_clip_min, m_clip_max);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -798,7 +809,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
m_set_clip = true;
|
||||
m_clip_max = (float&)a0;
|
||||
|
||||
CMD_LOG("clip_max=%.01f", m_clip_max);
|
||||
//LOG_NOTICE(RSX, "NV4097_SET_CLIP_MAX: clip_max=%.01f", m_clip_max);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -932,7 +943,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_CLEAR_RECT_HORIZONTAL: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_CLEAR_RECT_HORIZONTAL: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -941,7 +952,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_CLEAR_RECT_VERTICAL: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_CLEAR_RECT_VERTICAL: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1023,11 +1034,13 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV4097_SET_VERTEX_DATA_BASE_OFFSET:
|
||||
{
|
||||
m_vertex_data_base_offset = ARGS(0);
|
||||
if (count >= 2) {
|
||||
|
||||
if (count >= 2)
|
||||
{
|
||||
m_vertex_data_base_index = ARGS(1);
|
||||
}
|
||||
|
||||
//LOG_ERROR(RSX, "NV4097_SET_VERTEX_DATA_BASE_OFFSET: 0x%x", m_vertex_data_base_offset);
|
||||
//LOG_WARNING(RSX, "NV4097_SET_VERTEX_DATA_BASE_OFFSET: 0x%x", m_vertex_data_base_offset);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1042,6 +1055,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
const u32 a0 = ARGS(0);
|
||||
|
||||
//LOG_WARNING(RSX, "NV4097_SET_BEGIN_END: 0x%x", a0);
|
||||
|
||||
if (!m_indexed_array.m_count && !m_draw_array_count)
|
||||
{
|
||||
u32 min_vertex_size = ~0;
|
||||
@ -1079,7 +1093,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV4097_SET_SHADER_PROGRAM:
|
||||
{
|
||||
m_cur_shader_prog = &m_shader_progs[m_cur_shader_prog_num];
|
||||
//m_cur_shader_prog_num = (m_cur_shader_prog_num + 1) % 16;
|
||||
|
||||
const u32 a0 = ARGS(0);
|
||||
m_cur_shader_prog->offset = a0 & ~0x3;
|
||||
m_cur_shader_prog->addr = GetAddress(m_cur_shader_prog->offset, (a0 & 0x3) - 1);
|
||||
@ -1142,11 +1156,14 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
|
||||
if (!m_cur_vertex_prog)
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_TRANSFORM_PROGRAM: m_cur_vertex_prog == NULL");
|
||||
LOG_ERROR(RSX, "NV4097_SET_TRANSFORM_PROGRAM: m_cur_vertex_prog is null");
|
||||
break;
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < count; ++i) m_cur_vertex_prog->data.push_back(ARGS(i));
|
||||
for (u32 i = 0; i < count; ++i)
|
||||
{
|
||||
m_cur_vertex_prog->data.push_back(ARGS(i));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1157,7 +1174,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
|
||||
if (!m_cur_vertex_prog)
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_TRANSFORM_TIMEOUT: m_cur_vertex_prog == NULL");
|
||||
LOG_ERROR(RSX, "NV4097_SET_TRANSFORM_TIMEOUT: m_cur_vertex_prog is null");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1169,7 +1186,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if ((count - 1) % 4)
|
||||
{
|
||||
CMD_LOG("NV4097_SET_TRANSFORM_CONSTANT_LOAD [%d]", count);
|
||||
LOG_ERROR(RSX, "NV4097_SET_TRANSFORM_CONSTANT_LOAD: bad count %d", count);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1182,8 +1199,9 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
|
||||
RSXTransformConstant c(id, (float&)x, (float&)y, (float&)z, (float&)w);
|
||||
|
||||
CMD_LOG("SET_TRANSFORM_CONSTANT_LOAD[%d : %d] = (%f, %f, %f, %f)", i, id, c.x, c.y, c.z, c.w);
|
||||
m_transform_constants.push_back(c);
|
||||
|
||||
//LOG_NOTICE(RSX, "NV4097_SET_TRANSFORM_CONSTANT_LOAD: [%d : %d] = (%f, %f, %f, %f)", i, id, c.x, c.y, c.z, c.w);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1193,7 +1211,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_INVALIDATE_L2: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_INVALIDATE_L2: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1214,7 +1232,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_INVALIDATE_ZCULL: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_INVALIDATE_ZCULL: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1380,16 +1398,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_SCULL_CONTROL: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_SCULL_CONTROL: 0x%x", ARGS(0));
|
||||
}
|
||||
|
||||
//This is stencil culling , nothing to do with stencil masking on regular color or depth buffer
|
||||
//const u32 a0 = ARGS(0);
|
||||
//m_set_stencil_func = m_set_stencil_func_ref = m_set_stencil_func_mask = true;
|
||||
|
||||
//m_stencil_func = a0 & 0xffff;
|
||||
//m_stencil_func_ref = (a0 >> 16) & 0xff;
|
||||
//m_stencil_func_mask = (a0 >> 24) & 0xff;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1420,7 +1430,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_ERROR(RSX, "NV4097_SET_POINT_PARAMS_ENABLE: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_POINT_PARAMS_ENABLE: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1490,7 +1500,6 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
m_width = buffers[m_gcm_current_buffer].width;
|
||||
m_height = buffers[m_gcm_current_buffer].height;
|
||||
|
||||
// Rescale native resolution to fit 1080p/720p/480p/576p window size
|
||||
NativeRescale((float)m_width, (float)m_height);
|
||||
}
|
||||
break;
|
||||
@ -1547,7 +1556,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (count != 4)
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_SURFACE_PITCH_C: Bad count (%d)", count);
|
||||
LOG_ERROR(RSX, "NV4097_SET_SURFACE_PITCH_C: Bad count (%d)", count);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1564,7 +1573,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
|
||||
if (count != 1)
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_SURFACE_PITCH_D: Bad count (%d)", count);
|
||||
LOG_ERROR(RSX, "NV4097_SET_SURFACE_PITCH_D: Bad count (%d)", count);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1573,9 +1582,10 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV4097_SET_SURFACE_PITCH_Z:
|
||||
{
|
||||
m_surface_pitch_z = ARGS(0);
|
||||
|
||||
if (count != 1)
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_SURFACE_PITCH_Z: Bad count (%d)", count);
|
||||
LOG_ERROR(RSX, "NV4097_SET_SURFACE_PITCH_Z: Bad count (%d)", count);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1588,7 +1598,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
|
||||
if (count != 1)
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_CONTEXT_DMA_COLOR_A: Bad count (%d)", count);
|
||||
LOG_ERROR(RSX, "NV4097_SET_CONTEXT_DMA_COLOR_A: Bad count (%d)", count);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1618,7 +1628,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_CONTEXT_DMA_COLOR_D: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_CONTEXT_DMA_COLOR_D: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1634,7 +1644,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_CONTEXT_DMA_SEMAPHORE: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_CONTEXT_DMA_SEMAPHORE: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1643,7 +1653,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_CONTEXT_DMA_NOTIFIES: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_CONTEXT_DMA_NOTIFIES: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1685,7 +1695,10 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
const u8 alphaToOne = (a0 >> 8) & 0xf;
|
||||
const u16 sampleMask = a0 >> 16;
|
||||
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_ANTI_ALIASING_CONTROL: 0x%x", a0);
|
||||
if (a0)
|
||||
{
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_ANTI_ALIASING_CONTROL: 0x%x", a0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1756,11 +1769,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_ZCULL_CONTROL0: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_ZCULL_CONTROL0: 0x%x", ARGS(0));
|
||||
}
|
||||
|
||||
//m_set_depth_func = true;
|
||||
//m_depth_func = ARGS(0) >> 4;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1768,11 +1778,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_ZCULL_CONTROL1: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_ZCULL_CONTROL1: 0x%x", ARGS(0));
|
||||
}
|
||||
|
||||
//m_set_depth_func = true;
|
||||
//m_depth_func = ARGS(0) >> 4;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1780,7 +1787,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_SET_ZCULL_STATS_ENABLE: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_ZCULL_STATS_ENABLE: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1789,7 +1796,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV4097_ZCULL_SYNC: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV4097_ZCULL_SYNC: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1810,12 +1817,12 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case CELL_GCM_ZCULL_STATS2:
|
||||
case CELL_GCM_ZCULL_STATS3:
|
||||
value = 0;
|
||||
LOG_WARNING(RSX, "NV4097_GET_REPORT: Unimplemented type %d", type);
|
||||
LOG_ERROR(RSX, "NV4097_GET_REPORT: Unimplemented type %d", type);
|
||||
break;
|
||||
|
||||
default:
|
||||
value = 0;
|
||||
LOG_WARNING(RSX, "NV4097_GET_REPORT: Bad type %d", type);
|
||||
LOG_ERROR(RSX, "NV4097_GET_REPORT: Bad type %d", type);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1843,6 +1850,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR(RSX, "NV4097_CLEAR_REPORT_VALUE: Bad type: %d", type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1885,22 +1893,25 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
const u8 cullNearFarEnable = ARGS(0) & 0xf;
|
||||
const u8 zclampEnable = (ARGS(0) >> 4) & 0xf;
|
||||
const u8 cullIgnoreW = (ARGS(0) >> 8) & 0xf;
|
||||
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_ZMIN_MAX_CONTROL: cullNearFarEnable=%d, zclampEnable=%d, cullIgnoreW=%d", cullNearFarEnable, zclampEnable, cullIgnoreW);
|
||||
}
|
||||
break;
|
||||
|
||||
// Windows Clipping (Doesn't seem to be relevant?)
|
||||
case NV4097_SET_WINDOW_OFFSET:
|
||||
{
|
||||
const u16 x = ARGS(0);
|
||||
const u16 y = ARGS(0) >> 16;
|
||||
//LOG_WARNING(RSX, "TODO: NV4097_SET_WINDOW_OFFSET: x=%d, y=%d", x, y);
|
||||
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_WINDOW_OFFSET: x=%d, y=%d", x, y);
|
||||
}
|
||||
break;
|
||||
|
||||
case NV4097_SET_FREQUENCY_DIVIDER_OPERATION:
|
||||
{
|
||||
m_set_frequency_divider_operation = ARGS(0);
|
||||
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_FREQUENCY_DIVIDER_OPERATION: %d", m_set_frequency_divider_operation);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1908,13 +1919,15 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
const u32 offset = ARGS(0) & 0xffffff;
|
||||
const u8 mode = ARGS(0) >> 24;
|
||||
LOG_WARNING(RSX, "NV4097_SET_RENDER_ENABLE: Offset=0x%06x, Mode=0x%x", offset, mode);
|
||||
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_RENDER_ENABLE: Offset=0x%06x, Mode=0x%x", offset, mode);
|
||||
}
|
||||
break;
|
||||
|
||||
case NV4097_SET_ZPASS_PIXEL_COUNT_ENABLE:
|
||||
{
|
||||
const u32 enable = ARGS(0);
|
||||
const u32 enable = ARGS(0);
|
||||
|
||||
LOG_WARNING(RSX, "TODO: NV4097_SET_ZPASS_PIXEL_COUNT_ENABLE: %d", enable);
|
||||
}
|
||||
break;
|
||||
@ -1942,7 +1955,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
const u32 notify = ARGS(7);
|
||||
|
||||
// The existing GCM commands use only the value 0x1 for inFormat and outFormat
|
||||
if (inFormat != 0x01 || outFormat != 0x01) {
|
||||
if (inFormat != 0x01 || outFormat != 0x01)
|
||||
{
|
||||
LOG_ERROR(RSX, "NV0039_OFFSET_IN: Unsupported format: inFormat=%d, outFormat=%d", inFormat, outFormat);
|
||||
}
|
||||
|
||||
@ -1952,7 +1966,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR(RSX, "NV0039_OFFSET_IN: TODO: offset(in=0x%x, out=0x%x), pitch(in=0x%x, out=0x%x), line(len=0x%x, cnt=0x%x), fmt(in=0x%x, out=0x%x), notify=0x%x",
|
||||
LOG_ERROR(RSX, "NV0039_OFFSET_IN: bad offset(in=0x%x, out=0x%x), pitch(in=0x%x, out=0x%x), line(len=0x%x, cnt=0x%x), fmt(in=0x%x, out=0x%x), notify=0x%x",
|
||||
inOffset, outOffset, inPitch, outPitch, lineLength, lineCount, inFormat, outFormat, notify);
|
||||
}
|
||||
}
|
||||
@ -1964,11 +1978,11 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
|
||||
if (!offset)
|
||||
{
|
||||
//
|
||||
LOG_WARNING(RSX, "TODO: NV0039_OFFSET_OUT: offset=0x%x", offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR(RSX, "NV0039_OFFSET_OUT: TODO: offset=0x%x", offset);
|
||||
LOG_ERROR(RSX, "NV0039_OFFSET_OUT: Bad offset=0x%x", offset);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1977,7 +1991,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV0039_PITCH_IN: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV0039_PITCH_IN: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1986,7 +2000,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV0039_BUFFER_NOTIFY: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV0039_BUFFER_NOTIFY: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -2017,7 +2031,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0))
|
||||
{
|
||||
LOG_WARNING(RSX, "NV309E_SET_CONTEXT_DMA_IMAGE: 0x%x", ARGS(0));
|
||||
LOG_WARNING(RSX, "TODO: NV309E_SET_CONTEXT_DMA_IMAGE: 0x%x", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -2028,7 +2042,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
const u8 width = ARGS(0) >> 16;
|
||||
const u8 format = ARGS(0);
|
||||
const u32 offset = ARGS(1);
|
||||
LOG_WARNING(RSX, "NV309E_SET_FORMAT: Format:0x%x, Width:%d, Height:%d, Offset:0x%x", format, width, height, offset);
|
||||
|
||||
LOG_WARNING(RSX, "TODO: NV309E_SET_FORMAT: Format:0x%x, Width:%d, Height:%d, Offset:0x%x", format, width, height, offset);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2079,8 +2094,9 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
LOG_WARNING(RSX, "NV308A_COLOR: count = %d", count);
|
||||
}
|
||||
|
||||
//LOG_WARNING(RSX, "NV308A_COLOR: [%d]: %f, %f, %f, %f", c.id, c.x, c.y, c.z, c.w);
|
||||
m_fragment_constants.push_back(c);
|
||||
|
||||
//LOG_WARNING(RSX, "NV308A_COLOR: [%d]: %f, %f, %f, %f", c.id, c.x, c.y, c.z, c.w);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2095,7 +2111,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
{
|
||||
if (ARGS(0) != CELL_GCM_CONTEXT_SURFACE2D)
|
||||
{
|
||||
LOG_WARNING(RSX, "NV3089_SET_CONTEXT_SURFACE: Unsupported surface (0x%x)", ARGS(0));
|
||||
LOG_ERROR(RSX, "NV3089_SET_CONTEXT_SURFACE: Unsupported surface (0x%x)", ARGS(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -2118,7 +2134,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
u8* pixels_dst = vm::get_ptr<u8>(GetAddress(m_dst_offset, m_context_dma_img_dst - 0xfeed0000));
|
||||
|
||||
LOG_WARNING(RSX, "NV3089_IMAGE_IN_SIZE: width=%d, height=%d, pitch=%d, origin=%d, inter=%d, offset=0x%x, u=%d, v=%d", width, height, pitch, origin, inter, offset, u, v);
|
||||
LOG_WARNING(RSX, "*** m_dst_offset=0x%x, m_color: conv_in_h=0x%x, format_src_pitch=0x%x, conv_in_x=0x%x, conv_in_y=0x%x, conv_out_x=0x%x, conv_out_y=0x%x",
|
||||
LOG_WARNING(RSX, "NV3089_IMAGE_IN_SIZE: m_dst_offset=0x%x, m_color: conv_in_h=0x%x, format_src_pitch=0x%x, conv_in_x=0x%x, conv_in_y=0x%x, conv_out_x=0x%x, conv_out_y=0x%x",
|
||||
m_dst_offset, m_color_conv_in_h, m_color_format_src_pitch, m_color_conv_in_x, m_color_conv_in_y, m_color_conv_out_x, m_color_conv_out_y);
|
||||
|
||||
for (u16 y = 0; y < m_color_conv_in_h; ++y)
|
||||
@ -2148,6 +2164,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
m_color_conv_out_h = ARGS(6) >> 16;
|
||||
m_color_conv_dsdx = ARGS(7);
|
||||
m_color_conv_dtdy = ARGS(8);
|
||||
|
||||
LOG_WARNING(RSX, "TODO: NV3089_SET_COLOR_CONVERSION");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2177,7 +2195,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV4097_SET_WINDOW_CLIP_HORIZONTAL:
|
||||
case NV4097_SET_WINDOW_CLIP_VERTICAL:
|
||||
{
|
||||
LOG_WARNING(RSX, "Unused NV4097 method 0x%x detected!", cmd);
|
||||
LOG_WARNING(RSX, "Unused NV4097 windows clipping methods 0x%x detected!", cmd);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2189,7 +2207,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV0039_SET_OBJECT:
|
||||
case NV0039_SET_CONTEXT_DMA_NOTIFIES:
|
||||
{
|
||||
LOG_WARNING(RSX, "Unused NV0039 method 0x%x detected!", cmd);
|
||||
LOG_WARNING(RSX, "Unused NV0039 methods 0x%x detected!", cmd);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2199,7 +2217,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV3062_SET_PITCH:
|
||||
case NV3062_SET_OFFSET_SOURCE:
|
||||
{
|
||||
LOG_WARNING(RSX, "Unused NV3062 method 0x%x detected!", cmd);
|
||||
LOG_WARNING(RSX, "Unused NV3062 methods 0x%x detected!", cmd);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2218,7 +2236,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV308A_SIZE_OUT:
|
||||
case NV308A_SIZE_IN:
|
||||
{
|
||||
LOG_WARNING(RSX, "Unused NV308A method 0x%x detected!", cmd);
|
||||
LOG_WARNING(RSX, "Unused NV308A methods 0x%x detected!", cmd);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2226,7 +2244,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV309E_SET_CONTEXT_DMA_NOTIFIES:
|
||||
case NV309E_SET_OFFSET:
|
||||
{
|
||||
LOG_WARNING(RSX, "Unused NV309E method 0x%x detected!", cmd);
|
||||
LOG_WARNING(RSX, "Unused NV309E methods 0x%x detected!", cmd);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2248,7 +2266,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||
case NV3089_IMAGE_IN_OFFSET:
|
||||
case NV3089_IMAGE_IN:
|
||||
{
|
||||
LOG_WARNING(RSX, "Unused NV3089 method 0x%x detected!", cmd);
|
||||
LOG_WARNING(RSX, "Unused NV3089 methods 0x%x detected!", cmd);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user