Fix build dependancies and fix gcc build

Factor out _aligned_malloc functions to WIN32 only

Attempt to fix CmakeLists error

More CMakeLists fixes (glslang)

Add OSDependent libs

Add OGLCompiler and SPIRV as well
This commit is contained in:
kd-11 2016-03-07 20:51:32 +03:00
parent bd52bcf8d4
commit f384d87044
2 changed files with 13 additions and 3 deletions

View File

@ -191,14 +191,14 @@ if(WIN32) # I'm not sure we need all of these libs, but we link them in vs
else()
target_link_libraries(rpcs3 dxgi.lib d2d1.lib dwrite.lib)
endif()
target_link_libraries(rpcs3 asmjit.lib avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib png16_static ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${ADDITIONAL_LIBS} ${vulkan} ${glslang})
target_link_libraries(rpcs3 asmjit.lib avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib png16_static ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${ADDITIONAL_LIBS} vulkan glslang OSDependent OGLCompiler SPIRV)
else()
if(LLVM_FOUND)
target_link_libraries(rpcs3 asmjit.a ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a png16_static ${ZLIB_LIBRARIES} ${LLVM_LIBS} ${ADDITIONAL_LIBS} ${vulkan} ${glslang})
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a png16_static ${ZLIB_LIBRARIES} ${LLVM_LIBS} ${ADDITIONAL_LIBS} vulkan glslang OSDependent OGLCompiler SPIRV)
else()
target_link_libraries(rpcs3 asmjit.a ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a png16_static ${ZLIB_LIBRARIES} ${ADDITIONAL_LIBS} ${vulkan} ${glslang})
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a png16_static ${ZLIB_LIBRARIES} ${ADDITIONAL_LIBS} vulkan glslang OSDependent OGLCompiler SPIRV)
endif()
endif()

View File

@ -19,12 +19,20 @@ namespace vk
VKAPI_ATTR void *VKAPI_CALL mem_alloc(void *pUserData, size_t size, size_t alignment, VkSystemAllocationScope allocationScope)
{
#ifdef _WIN32
return _aligned_malloc(size, alignment);
#else
return malloc(size);
#endif
}
VKAPI_ATTR void VKAPI_CALL mem_free(void *pUserData, void *pMemory)
{
#ifdef _WIN32
_aligned_free(pMemory);
#else
free(pMemory);
#endif
}
VkFormat get_compatible_sampler_format(u32 format, VkComponentMapping& swizzle, u8 swizzle_mask)
@ -278,7 +286,9 @@ namespace vk
uint64_t srcObject, size_t location, int32_t msgCode,
const char *pLayerPrefix, const char *pMsg, void *pUserData)
{
#ifdef _WIN32
DebugBreak();
#endif
return false;
}