mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-03 15:46:20 +00:00
gnmdriver: Add sceGnmSubmitCommandBuffersForWorkload
This commit is contained in:
parent
2adef6e23c
commit
0e59cda70c
7 changed files with 23 additions and 14 deletions
|
@ -2155,8 +2155,10 @@ s32 PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffersForWorkload(
|
||||||
ccb_sizes_in_bytes);
|
ccb_sizes_in_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI sceGnmSubmitCommandBuffers(u32 count, const u32* dcb_gpu_addrs[],
|
int PS4_SYSV_ABI sceGnmSubmitCommandBuffersForWorkload(u32 workload, u32 count,
|
||||||
u32* dcb_sizes_in_bytes, const u32* ccb_gpu_addrs[],
|
const u32* dcb_gpu_addrs[],
|
||||||
|
u32* dcb_sizes_in_bytes,
|
||||||
|
const u32* ccb_gpu_addrs[],
|
||||||
u32* ccb_sizes_in_bytes) {
|
u32* ccb_sizes_in_bytes) {
|
||||||
LOG_DEBUG(Lib_GnmDriver, "called");
|
LOG_DEBUG(Lib_GnmDriver, "called");
|
||||||
|
|
||||||
|
@ -2242,9 +2244,11 @@ s32 PS4_SYSV_ABI sceGnmSubmitCommandBuffers(u32 count, const u32* dcb_gpu_addrs[
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceGnmSubmitCommandBuffersForWorkload() {
|
s32 PS4_SYSV_ABI sceGnmSubmitCommandBuffers(u32 count, const u32* dcb_gpu_addrs[],
|
||||||
LOG_ERROR(Lib_GnmDriver, "(STUBBED) called");
|
u32* dcb_sizes_in_bytes, const u32* ccb_gpu_addrs[],
|
||||||
return ORBIS_OK;
|
u32* ccb_sizes_in_bytes) {
|
||||||
|
return sceGnmSubmitCommandBuffersForWorkload(count, count, dcb_gpu_addrs, dcb_sizes_in_bytes,
|
||||||
|
ccb_gpu_addrs, ccb_sizes_in_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceGnmSubmitDone() {
|
int PS4_SYSV_ABI sceGnmSubmitDone() {
|
||||||
|
|
|
@ -216,7 +216,11 @@ int PS4_SYSV_ABI sceGnmSubmitAndFlipCommandBuffersForWorkload(
|
||||||
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);
|
||||||
int PS4_SYSV_ABI sceGnmSubmitCommandBuffersForWorkload();
|
int PS4_SYSV_ABI sceGnmSubmitCommandBuffersForWorkload(u32 workload, u32 count,
|
||||||
|
const u32* dcb_gpu_addrs[],
|
||||||
|
u32* dcb_sizes_in_bytes,
|
||||||
|
const u32* ccb_gpu_addrs[],
|
||||||
|
u32* ccb_sizes_in_bytes);
|
||||||
int PS4_SYSV_ABI sceGnmSubmitDone();
|
int PS4_SYSV_ABI sceGnmSubmitDone();
|
||||||
int PS4_SYSV_ABI sceGnmUnmapComputeQueue();
|
int PS4_SYSV_ABI sceGnmUnmapComputeQueue();
|
||||||
int PS4_SYSV_ABI sceGnmUnregisterAllResourcesForOwner();
|
int PS4_SYSV_ABI sceGnmUnregisterAllResourcesForOwner();
|
||||||
|
|
|
@ -239,7 +239,7 @@ s32 PS4_SYSV_ABI sceKernelGetModuleInfoForUnwind(VAddr addr, int flags,
|
||||||
if (!info) {
|
if (!info) {
|
||||||
return ORBIS_KERNEL_ERROR_EFAULT;
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
}
|
}
|
||||||
if (info->st_size <= sizeof(OrbisModuleInfoForUnwind)) {
|
if (info->st_size < sizeof(OrbisModuleInfoForUnwind)) {
|
||||||
return ORBIS_KERNEL_ERROR_EINVAL;
|
return ORBIS_KERNEL_ERROR_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,6 +250,7 @@ s32 PS4_SYSV_ABI sceKernelGetModuleInfoForUnwind(VAddr addr, int flags,
|
||||||
const auto mod_info = module->GetModuleInfoEx();
|
const auto mod_info = module->GetModuleInfoEx();
|
||||||
|
|
||||||
// Fill in module info.
|
// Fill in module info.
|
||||||
|
std::memset(info, 0, sizeof(OrbisModuleInfoForUnwind));
|
||||||
info->name = mod_info.name;
|
info->name = mod_info.name;
|
||||||
info->eh_frame_hdr_addr = mod_info.eh_frame_hdr_addr;
|
info->eh_frame_hdr_addr = mod_info.eh_frame_hdr_addr;
|
||||||
info->eh_frame_addr = mod_info.eh_frame_addr;
|
info->eh_frame_addr = mod_info.eh_frame_addr;
|
||||||
|
|
|
@ -37,7 +37,7 @@ struct WrapperImpl<name, PS4_SYSV_ABI R (*)(Args...), f> {
|
||||||
static R PS4_SYSV_ABI wrap(Args... args) {
|
static R PS4_SYSV_ABI wrap(Args... args) {
|
||||||
u32 ret = f(args...);
|
u32 ret = f(args...);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
LOG_ERROR(Lib_Kernel, "Function {} returned {}", std::string_view{name.value}, ret);
|
// LOG_ERROR(Lib_Kernel, "Function {} returned {}", std::string_view{name.value}, ret);
|
||||||
ret += SCE_KERNEL_ERROR_UNKNOWN;
|
ret += SCE_KERNEL_ERROR_UNKNOWN;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -45,8 +45,8 @@ struct wrapper_impl<name, PS4_SYSV_ABI R (*)(Args...), f> {
|
||||||
template <StringLiteral name, class F, F f>
|
template <StringLiteral name, class F, F f>
|
||||||
constexpr auto wrapper = wrapper_impl<name, F, f>::wrap;
|
constexpr auto wrapper = wrapper_impl<name, F, f>::wrap;
|
||||||
|
|
||||||
#define W(foo) wrapper<#foo, decltype(&foo), foo>
|
// #define W(foo) wrapper<#foo, decltype(&foo), foo>
|
||||||
// #define W(foo) foo
|
#define W(foo) foo
|
||||||
|
|
||||||
#define LIB_FUNCTION(nid, lib, libversion, mod, moduleVersionMajor, moduleVersionMinor, f) \
|
#define LIB_FUNCTION(nid, lib, libversion, mod, moduleVersionMajor, moduleVersionMinor, f) \
|
||||||
{ \
|
{ \
|
||||||
|
|
|
@ -99,7 +99,7 @@ ImageId TextureCache::ResolveDepthOverlap(const ImageInfo& requested_info, Image
|
||||||
if (cache_info.resources == requested_info.resources) {
|
if (cache_info.resources == requested_info.resources) {
|
||||||
return cache_image_id;
|
return cache_image_id;
|
||||||
} else {
|
} else {
|
||||||
UNREACHABLE();
|
// UNREACHABLE();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ static constexpr u32 MaxInvalidateDist = 12_MB;
|
||||||
class TextureCache {
|
class TextureCache {
|
||||||
struct Traits {
|
struct Traits {
|
||||||
using Entry = boost::container::small_vector<ImageId, 16>;
|
using Entry = boost::container::small_vector<ImageId, 16>;
|
||||||
static constexpr size_t AddressSpaceBits = 39;
|
static constexpr size_t AddressSpaceBits = 40;
|
||||||
static constexpr size_t FirstLevelBits = 9;
|
static constexpr size_t FirstLevelBits = 10;
|
||||||
static constexpr size_t PageBits = 20;
|
static constexpr size_t PageBits = 20;
|
||||||
};
|
};
|
||||||
using PageTable = MultiLevelPageTable<Traits>;
|
using PageTable = MultiLevelPageTable<Traits>;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue