libraries: gnmdriver: sceGnmSetVgtControl added

This commit is contained in:
psucien 2024-08-03 22:17:36 +02:00
parent 5940b1e517
commit 96aad1c6c1
3 changed files with 15 additions and 3 deletions

View file

@ -1706,8 +1706,18 @@ int PS4_SYSV_ABI sceGnmSetupMipStatsReport() {
return ORBIS_OK;
}
int PS4_SYSV_ABI sceGnmSetVgtControl() {
LOG_ERROR(Lib_GnmDriver, "(STUBBED) called");
s32 PS4_SYSV_ABI sceGnmSetVgtControl(u32* cmdbuf, u32 size, u32 prim_group_sz_minus_one,
u32 partial_vs_wave_mode, u32 wd_switch_only_on_eop_mode) {
LOG_TRACE(Lib_GnmDriver, "called");
if (!cmdbuf || size != 3 || (prim_group_sz_minus_one >= 0x100) ||
((wd_switch_only_on_eop_mode | partial_vs_wave_mode) >= 2)) {
return -1;
}
const u32 reg_value =
((partial_vs_wave_mode & 1) << 0x10) | (prim_group_sz_minus_one & 0xffffu);
PM4CmdSetData::SetContextReg(cmdbuf, 0x2aau, reg_value); // IA_MULTI_VGT_PARAM
return ORBIS_OK;
}

View file

@ -161,7 +161,8 @@ int PS4_SYSV_ABI sceGnmSetResourceUserData();
int PS4_SYSV_ABI sceGnmSetSpiEnableSqCounters();
int PS4_SYSV_ABI sceGnmSetSpiEnableSqCountersForUnitInstance();
int PS4_SYSV_ABI sceGnmSetupMipStatsReport();
int PS4_SYSV_ABI sceGnmSetVgtControl();
s32 PS4_SYSV_ABI sceGnmSetVgtControl(u32* cmdbuf, u32 size, u32 prim_group_sz_minus_one,
u32 partial_vs_wave_mode, u32 wd_switch_only_on_eop_mode);
s32 PS4_SYSV_ABI sceGnmSetVsShader(u32* cmdbuf, u32 size, const u32* vs_regs, u32 shader_modifier);
int PS4_SYSV_ABI sceGnmSetWaveLimitMultiplier();
int PS4_SYSV_ABI sceGnmSetWaveLimitMultipliers();

View file

@ -41,6 +41,7 @@ enum class PM4ItOpcode : u32 {
CondIndirectBuffer = 0x3F,
CopyData = 0x40,
CommandProcessorDma = 0x41,
PfpSyncMe = 0x42,
SurfaceSync = 0x43,
CondWrite = 0x45,
EventWrite = 0x46,