mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-01 12:46:01 +00:00
gnmdriver: Add workload functions
This commit is contained in:
parent
cef37be33d
commit
729d7b8ccc
|
@ -376,12 +376,12 @@ int PS4_SYSV_ABI sceGnmAreSubmitsAllowed() {
|
||||||
return submission_lock == 0;
|
return submission_lock == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceGnmBeginWorkload(uint param_1, ulong* param_2) {
|
int PS4_SYSV_ABI sceGnmBeginWorkload(u32 workload_stream, u64* workload) {
|
||||||
if (param_2 != (ulong*)0x0) {
|
if (workload) {
|
||||||
*param_2 = (ulong)(-(uint)(param_1 < 0x10) & 1);
|
*workload = (-(u32)(workload_stream < 0x10) & 1);
|
||||||
return 0xf < param_1;
|
return 0xf < workload_stream;
|
||||||
}
|
}
|
||||||
return (bool)3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI sceGnmComputeWaitOnAddress(u32* cmdbuf, u32 size, uintptr_t addr, u32 mask,
|
s32 PS4_SYSV_ABI sceGnmComputeWaitOnAddress(u32* cmdbuf, u32 size, uintptr_t addr, u32 mask,
|
||||||
|
@ -415,9 +415,12 @@ int PS4_SYSV_ABI sceGnmComputeWaitSemaphore() {
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceGnmCreateWorkloadStream() {
|
int PS4_SYSV_ABI sceGnmCreateWorkloadStream(u64 param1, u32* workload_stream) {
|
||||||
LOG_ERROR(Lib_GnmDriver, "(STUBBED) called");
|
if (param1 != 0 && workload_stream) {
|
||||||
return ORBIS_OK;
|
*workload_stream = 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceGnmDebuggerGetAddressWatch() {
|
int PS4_SYSV_ABI sceGnmDebuggerGetAddressWatch() {
|
||||||
|
@ -954,9 +957,9 @@ int PS4_SYSV_ABI sceGnmDriverTriggerCapture() {
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceGnmEndWorkload(long param_1) {
|
int PS4_SYSV_ABI sceGnmEndWorkload(u64 workload) {
|
||||||
if (param_1 != 0) {
|
if (workload != 0) {
|
||||||
return (0xf < (u8)((ulong)param_1 >> 0x38)) * 2;
|
return (0xf < ((workload >> 0x38) & 0xff)) * 2;
|
||||||
}
|
}
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -2128,6 +2131,14 @@ s32 PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffers(u32 count, u32* dcb_gpu_addrs
|
||||||
u32* dcb_sizes_in_bytes, u32* ccb_gpu_addrs[],
|
u32* dcb_sizes_in_bytes, u32* ccb_gpu_addrs[],
|
||||||
u32* ccb_sizes_in_bytes, u32 vo_handle,
|
u32* ccb_sizes_in_bytes, u32 vo_handle,
|
||||||
u32 buf_idx, u32 flip_mode, u32 flip_arg) {
|
u32 buf_idx, u32 flip_mode, u32 flip_arg) {
|
||||||
|
return sceGnmSubmitAndFlipCommandBuffersForWorkload(
|
||||||
|
count, count, dcb_gpu_addrs, dcb_sizes_in_bytes, ccb_gpu_addrs, ccb_sizes_in_bytes,
|
||||||
|
vo_handle, buf_idx, flip_mode, flip_arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffersForWorkload(
|
||||||
|
u32 workload, u32 count, u32* dcb_gpu_addrs[], u32* dcb_sizes_in_bytes, u32* ccb_gpu_addrs[],
|
||||||
|
u32* ccb_sizes_in_bytes, u32 vo_handle, u32 buf_idx, u32 flip_mode, u32 flip_arg) {
|
||||||
LOG_DEBUG(Lib_GnmDriver, "called [buf = {}]", buf_idx);
|
LOG_DEBUG(Lib_GnmDriver, "called [buf = {}]", buf_idx);
|
||||||
|
|
||||||
auto* cmdbuf = dcb_gpu_addrs[count - 1];
|
auto* cmdbuf = dcb_gpu_addrs[count - 1];
|
||||||
|
@ -2144,11 +2155,6 @@ s32 PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffers(u32 count, u32* dcb_gpu_addrs
|
||||||
ccb_sizes_in_bytes);
|
ccb_sizes_in_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffersForWorkload() {
|
|
||||||
LOG_ERROR(Lib_GnmDriver, "(STUBBED) called");
|
|
||||||
return ORBIS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI sceGnmSubmitCommandBuffers(u32 count, const u32* dcb_gpu_addrs[],
|
s32 PS4_SYSV_ABI sceGnmSubmitCommandBuffers(u32 count, const u32* dcb_gpu_addrs[],
|
||||||
u32* dcb_sizes_in_bytes, const u32* ccb_gpu_addrs[],
|
u32* dcb_sizes_in_bytes, const u32* ccb_gpu_addrs[],
|
||||||
u32* ccb_sizes_in_bytes) {
|
u32* ccb_sizes_in_bytes) {
|
||||||
|
|
|
@ -16,11 +16,11 @@ using namespace Kernel;
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI sceGnmAddEqEvent(SceKernelEqueue eq, u64 id, void* udata);
|
s32 PS4_SYSV_ABI sceGnmAddEqEvent(SceKernelEqueue eq, u64 id, void* udata);
|
||||||
int PS4_SYSV_ABI sceGnmAreSubmitsAllowed();
|
int PS4_SYSV_ABI sceGnmAreSubmitsAllowed();
|
||||||
int PS4_SYSV_ABI sceGnmBeginWorkload(uint param_1, ulong* param_2);
|
int PS4_SYSV_ABI sceGnmBeginWorkload(u32 workload_stream, u64* workload);
|
||||||
s32 PS4_SYSV_ABI sceGnmComputeWaitOnAddress(u32* cmdbuf, u32 size, uintptr_t addr, u32 mask,
|
s32 PS4_SYSV_ABI sceGnmComputeWaitOnAddress(u32* cmdbuf, u32 size, uintptr_t addr, u32 mask,
|
||||||
u32 cmp_func, u32 ref);
|
u32 cmp_func, u32 ref);
|
||||||
int PS4_SYSV_ABI sceGnmComputeWaitSemaphore();
|
int PS4_SYSV_ABI sceGnmComputeWaitSemaphore();
|
||||||
int PS4_SYSV_ABI sceGnmCreateWorkloadStream();
|
int PS4_SYSV_ABI sceGnmCreateWorkloadStream(u64 param1, u32* workload_stream);
|
||||||
int PS4_SYSV_ABI sceGnmDebuggerGetAddressWatch();
|
int PS4_SYSV_ABI sceGnmDebuggerGetAddressWatch();
|
||||||
int PS4_SYSV_ABI sceGnmDebuggerHaltWavefront();
|
int PS4_SYSV_ABI sceGnmDebuggerHaltWavefront();
|
||||||
int PS4_SYSV_ABI sceGnmDebuggerReadGds();
|
int PS4_SYSV_ABI sceGnmDebuggerReadGds();
|
||||||
|
@ -77,7 +77,7 @@ int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForValidation();
|
||||||
int PS4_SYSV_ABI sceGnmDriverInternalVirtualQuery();
|
int PS4_SYSV_ABI sceGnmDriverInternalVirtualQuery();
|
||||||
int PS4_SYSV_ABI sceGnmDriverTraceInProgress();
|
int PS4_SYSV_ABI sceGnmDriverTraceInProgress();
|
||||||
int PS4_SYSV_ABI sceGnmDriverTriggerCapture();
|
int PS4_SYSV_ABI sceGnmDriverTriggerCapture();
|
||||||
int PS4_SYSV_ABI sceGnmEndWorkload(long param_1);
|
int PS4_SYSV_ABI sceGnmEndWorkload(u64 workload);
|
||||||
s32 PS4_SYSV_ABI sceGnmFindResourcesPublic();
|
s32 PS4_SYSV_ABI sceGnmFindResourcesPublic();
|
||||||
void PS4_SYSV_ABI sceGnmFlushGarlic();
|
void PS4_SYSV_ABI sceGnmFlushGarlic();
|
||||||
int PS4_SYSV_ABI sceGnmGetCoredumpAddress();
|
int PS4_SYSV_ABI sceGnmGetCoredumpAddress();
|
||||||
|
@ -210,7 +210,9 @@ s32 PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffers(u32 count, u32* dcb_gpu_addrs
|
||||||
u32* dcb_sizes_in_bytes, u32* ccb_gpu_addrs[],
|
u32* dcb_sizes_in_bytes, u32* ccb_gpu_addrs[],
|
||||||
u32* ccb_sizes_in_bytes, u32 vo_handle,
|
u32* ccb_sizes_in_bytes, u32 vo_handle,
|
||||||
u32 buf_idx, u32 flip_mode, u32 flip_arg);
|
u32 buf_idx, u32 flip_mode, u32 flip_arg);
|
||||||
int PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffersForWorkload();
|
int PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffersForWorkload(
|
||||||
|
u32 workload, u32 count, u32* dcb_gpu_addrs[], u32* dcb_sizes_in_bytes, u32* ccb_gpu_addrs[],
|
||||||
|
u32* ccb_sizes_in_bytes, u32 vo_handle, u32 buf_idx, u32 flip_mode, u32 flip_arg);
|
||||||
s32 PS4_SYSV_ABI sceGnmSubmitCommandBuffers(u32 count, const u32* dcb_gpu_addrs[],
|
s32 PS4_SYSV_ABI sceGnmSubmitCommandBuffers(u32 count, const u32* dcb_gpu_addrs[],
|
||||||
u32* dcb_sizes_in_bytes, const u32* ccb_gpu_addrs[],
|
u32* dcb_sizes_in_bytes, const u32* ccb_gpu_addrs[],
|
||||||
u32* ccb_sizes_in_bytes);
|
u32* ccb_sizes_in_bytes);
|
||||||
|
|
Loading…
Reference in a new issue