mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Compilation fix (mingw)
This commit is contained in:
parent
3baf79f929
commit
19a698682b
5 changed files with 13 additions and 7 deletions
|
@ -61,7 +61,7 @@ namespace utils
|
||||||
void* get_proc_address(const char* lib, const char* name)
|
void* get_proc_address(const char* lib, const char* name)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return GetProcAddress(GetModuleHandleA(lib), name);
|
return reinterpret_cast<void*>(GetProcAddress(GetModuleHandleA(lib), name));
|
||||||
#else
|
#else
|
||||||
return dlsym(dlopen(lib, RTLD_NOLOAD), name);
|
return dlsym(dlopen(lib, RTLD_NOLOAD), name);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#define SAFE_BUFFERS
|
#define SAFE_BUFFERS
|
||||||
#define NEVER_INLINE __attribute__((noinline))
|
#define NEVER_INLINE __attribute__((noinline))
|
||||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||||
|
#define thread_local __thread
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CHECK_SIZE(type, size) static_assert(sizeof(type) == size, "Invalid " #type " type size")
|
#define CHECK_SIZE(type, size) static_assert(sizeof(type) == size, "Invalid " #type " type size")
|
||||||
|
|
|
@ -209,7 +209,7 @@ if(MSVC)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /BASE:0x10000 /FIXED")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /BASE:0x10000 /FIXED")
|
||||||
endif()
|
endif()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL)
|
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL)
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
target_link_libraries(rpcs3 ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} opengl32.lib glu32.lib libpthread)
|
target_link_libraries(rpcs3 ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} opengl32.lib glu32.lib libpthread)
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -18,11 +18,12 @@ void gl::init()
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
extern "C" {
|
extern "C"
|
||||||
|
{
|
||||||
// NVIDIA Optimus: Default dGPU instead of iGPU (Driver: 302+)
|
// NVIDIA Optimus: Default dGPU instead of iGPU (Driver: 302+)
|
||||||
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||||
// AMD: Request dGPU High Performance (Driver: 13.35+)
|
// AMD: Request dGPU High Performance (Driver: 13.35+)
|
||||||
_declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define OPENGL_PROC(p, n) p gl##n = nullptr
|
#define OPENGL_PROC(p, n) p gl##n = nullptr
|
||||||
|
|
|
@ -328,10 +328,14 @@ namespace vk
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkViewport vp = {0, 0, target_w, target_h, 0., 1.};
|
VkViewport vp{};
|
||||||
|
vp.width = target_w;
|
||||||
|
vp.height = target_h;
|
||||||
|
vp.minDepth = 0.f;
|
||||||
|
vp.maxDepth = 1.f;
|
||||||
vkCmdSetViewport(cmd, 0, 1, &vp);
|
vkCmdSetViewport(cmd, 0, 1, &vp);
|
||||||
|
|
||||||
VkRect2D vs = { {0, 0}, {target_w, target_h} };
|
VkRect2D vs = { {0, 0}, {0u+target_w, 0u+target_h} };
|
||||||
vkCmdSetScissor(cmd, 0, 1, &vs);
|
vkCmdSetScissor(cmd, 0, 1, &vs);
|
||||||
|
|
||||||
//TODO: Add drop shadow if deemed necessary for visibility
|
//TODO: Add drop shadow if deemed necessary for visibility
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue