mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-07 03:03:15 +00:00
video_core: Rewrite vulkan and videoout
This commit is contained in:
parent
0a94899c86
commit
c01b6f8397
89 changed files with 5378 additions and 2150 deletions
|
@ -13,7 +13,7 @@
|
|||
#include "core/libraries/libc/libc_string.h"
|
||||
#include "core/libraries/libs.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
constexpr bool log_file_libc = true; // disable it to disable logging
|
||||
static u32 g_need_sceLibc = 1;
|
||||
|
@ -421,7 +421,7 @@ const PS4_SYSV_ABI u16* ps4__Getpctype() {
|
|||
return &characterTypeTable[0];
|
||||
}
|
||||
|
||||
void libcSymbolsRegister(Loader::SymbolsResolver* sym) {
|
||||
void libcSymbolsRegister(Core::Loader::SymbolsResolver* sym) {
|
||||
// cxa functions
|
||||
LIB_FUNCTION("3GPpjQdAMTw", "libc", 1, "libc", 1, 1, ps4___cxa_guard_acquire);
|
||||
LIB_FUNCTION("9rAeANT2tyE", "libc", 1, "libc", 1, 1, ps4___cxa_guard_release);
|
||||
|
@ -490,4 +490,4 @@ void libcSymbolsRegister(Loader::SymbolsResolver* sym) {
|
|||
LIB_FUNCTION("sUP1hBaouOw", "libc", 1, "libc", 1, 1, ps4__Getpctype);
|
||||
}
|
||||
|
||||
}; // namespace Core::Libraries::LibC
|
||||
}; // namespace Libraries::LibC
|
||||
|
|
|
@ -7,8 +7,8 @@ namespace Core::Loader {
|
|||
class SymbolsResolver;
|
||||
}
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
void libcSymbolsRegister(Loader::SymbolsResolver* sym);
|
||||
void libcSymbolsRegister(Core::Loader::SymbolsResolver* sym);
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// adapted from
|
||||
// https://opensource.apple.com/source/libcppabi/libcppabi-14/src/cxa_guard.cxx.auto.html
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
// This file implements the __cxa_guard_* functions as defined at:
|
||||
// http://www.codesourcery.com/public/cxx-abi/abi.html
|
||||
|
@ -158,4 +158,4 @@ void PS4_SYSV_ABI ps4___cxa_guard_abort(u64* guard_object) {
|
|||
setNotInUse(guard_object);
|
||||
}
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
#include <pthread.h>
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
int PS4_SYSV_ABI ps4___cxa_guard_acquire(u64* guard_object);
|
||||
void PS4_SYSV_ABI ps4___cxa_guard_release(u64* guard_object);
|
||||
void PS4_SYSV_ABI ps4___cxa_guard_abort(u64* guard_object);
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <cmath>
|
||||
#include "core/libraries/libc/libc_math.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
float PS4_SYSV_ABI ps4_atan2f(float y, float x) {
|
||||
return atan2f(y, x);
|
||||
|
@ -38,4 +38,4 @@ double PS4_SYSV_ABI ps4_exp2(double arg) {
|
|||
return exp2(arg);
|
||||
}
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
float PS4_SYSV_ABI ps4_atan2f(float y, float x);
|
||||
float PS4_SYSV_ABI ps4_acosf(float num);
|
||||
|
@ -16,4 +16,4 @@ double PS4_SYSV_ABI ps4__Sin(double x);
|
|||
float PS4_SYSV_ABI ps4__Fsin(float arg);
|
||||
double PS4_SYSV_ABI ps4_exp2(double arg);
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "core/file_sys/fs.h"
|
||||
#include "core/libraries/libc/libc_stdio.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
std::FILE* PS4_SYSV_ABI ps4_fopen(const char* filename, const char* mode) {
|
||||
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
||||
|
@ -70,4 +70,4 @@ int PS4_SYSV_ABI ps4_puts(const char* s) {
|
|||
return std::puts(s);
|
||||
}
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "common/types.h"
|
||||
#include "core/libraries/libc/printf.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
std::FILE* PS4_SYSV_ABI ps4_fopen(const char* filename, const char* mode);
|
||||
int PS4_SYSV_ABI ps4_printf(VA_ARGS);
|
||||
|
@ -19,4 +19,4 @@ int PS4_SYSV_ABI ps4_fseek(FILE* stream, long offset, int whence);
|
|||
int PS4_SYSV_ABI ps4_fgetpos(FILE* stream, fpos_t* pos);
|
||||
std::size_t PS4_SYSV_ABI ps4_fread(void* ptr, size_t size, size_t nmemb, FILE* stream);
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "common/assert.h"
|
||||
#include "core/libraries/libc/libc_stdlib.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
void PS4_SYSV_ABI ps4_exit(int code) {
|
||||
std::exit(code);
|
||||
|
@ -42,4 +42,4 @@ int PS4_SYSV_ABI ps4_rand() {
|
|||
return std::rand();
|
||||
}
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <cstddef>
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
void PS4_SYSV_ABI ps4_exit(int code);
|
||||
int PS4_SYSV_ABI ps4_atexit(void (*func)());
|
||||
|
@ -16,4 +16,4 @@ void PS4_SYSV_ABI ps4_qsort(void* ptr, size_t count, size_t size,
|
|||
int(PS4_SYSV_ABI* comp)(const void*, const void*));
|
||||
int PS4_SYSV_ABI ps4_rand();
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <cstring>
|
||||
#include "core/libraries/libc/libc_string.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
int PS4_SYSV_ABI ps4_memcmp(const void* s1, const void* s2, size_t n) {
|
||||
return std::memcmp(s1, s2, n);
|
||||
|
@ -58,4 +58,4 @@ char* PS4_SYSV_ABI ps4_strdup(const char* str1) {
|
|||
return dup;
|
||||
}
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <cstddef>
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
int PS4_SYSV_ABI ps4_memcmp(const void* s1, const void* s2, size_t n);
|
||||
void* PS4_SYSV_ABI ps4_memcpy(void* dest, const void* src, size_t n);
|
||||
|
@ -21,4 +21,4 @@ char* PS4_SYSV_ABI ps4_strrchr(const char* s, int c);
|
|||
int PS4_SYSV_ABI ps4_strncmp(const char* s1, const char* s2, size_t n);
|
||||
char* PS4_SYSV_ABI ps4_strdup(const char* str1);
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
#include "va_ctx.h"
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
// ntoa conversion buffer size, this must be big enough to hold
|
||||
// one converted numeric number including padded zeros (dynamically created on stack)
|
||||
// 32 byte is a good default
|
||||
|
@ -750,4 +750,4 @@ static int vsnprintf_ctx(char* s, size_t n, const char* format, VaList* arg) {
|
|||
std::strcpy(s, buffer);
|
||||
return result;
|
||||
}
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
(ctx).va_list.fp_offset = offsetof(VaRegSave, fp); \
|
||||
(ctx).va_list.overflow_arg_area = &overflow_arg_area;
|
||||
|
||||
namespace Core::Libraries::LibC {
|
||||
namespace Libraries::LibC {
|
||||
|
||||
// https://stackoverflow.com/questions/4958384/what-is-the-format-of-the-x86-64-va-list-structure
|
||||
|
||||
|
@ -107,4 +107,4 @@ T* vaArgPtr(VaList* l) {
|
|||
return vaArgOverflowArgArea<T*, 1, 8>(l);
|
||||
}
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
} // namespace Libraries::LibC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue