mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 04:31:09 +00:00
remove unused vk_mem_alloc
This commit is contained in:
parent
5b5432b9dd
commit
b94afbc6c1
4 changed files with 63 additions and 17133 deletions
|
@ -56,6 +56,7 @@ set(yquake2LinkerFlags)
|
|||
set(yquake2ClientLinkerFlags)
|
||||
set(yquake2ServerLinkerFlags)
|
||||
set(yquake2OpenGLLinkerFlags)
|
||||
set(yquake2VulkanLinkerFlags)
|
||||
set(yquake2SDLLinkerFlags)
|
||||
set(yquake2ZLibLinkerFlags)
|
||||
|
||||
|
@ -112,15 +113,20 @@ include(CheckLibraryExists)
|
|||
check_function_exists(backtrace HAVE_EXECINFO_SYS)
|
||||
IF (NOT HAVE_EXECINFO_SYS)
|
||||
check_library_exists(execinfo backtrace "" HAVE_EXECINFO_LIB)
|
||||
if (HAVE_EXECINFO_LIB)
|
||||
list(APPEND yquake2ClientLinkerFlags execinfo)
|
||||
list(APPEND yquake2ServerLinkerFlags execinfo)
|
||||
add_definitions(-DHAVE_EXECINFO)
|
||||
endif()
|
||||
if (HAVE_EXECINFO_LIB)
|
||||
list(APPEND yquake2ClientLinkerFlags execinfo)
|
||||
list(APPEND yquake2ServerLinkerFlags execinfo)
|
||||
add_definitions(-DHAVE_EXECINFO)
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DHAVE_EXECINFO)
|
||||
add_definitions(-DHAVE_EXECINFO)
|
||||
endif()
|
||||
|
||||
# We need an Vulkan implementation.
|
||||
find_package(Vulkan REQUIRED)
|
||||
list(APPEND yquake2IncludeDirectories ${Vulkan_INCLUDE_DIR})
|
||||
list(APPEND yquake2VulkanLinkerFlags ${Vulkan_LIBRARIES})
|
||||
|
||||
# cURL support.
|
||||
if (${CURL_SUPPORT})
|
||||
find_package(CURL REQUIRED)
|
||||
|
@ -570,6 +576,45 @@ set(SOFT-Header
|
|||
${COMMON_SRC_DIR}/header/shared.h
|
||||
)
|
||||
|
||||
set(VK-Source
|
||||
${REF_SRC_DIR}/vk/vk_buffer.c
|
||||
${REF_SRC_DIR}/vk/vk_cmd.c
|
||||
${REF_SRC_DIR}/vk/vk_common.c
|
||||
${REF_SRC_DIR}/vk/vk_device.c
|
||||
${REF_SRC_DIR}/vk/vk_draw.c
|
||||
${REF_SRC_DIR}/vk/vk_image.c
|
||||
${REF_SRC_DIR}/vk/vk_light.c
|
||||
${REF_SRC_DIR}/vk/vk_mesh.c
|
||||
${REF_SRC_DIR}/vk/vk_model.c
|
||||
${REF_SRC_DIR}/vk/vk_pipeline.c
|
||||
${REF_SRC_DIR}/vk/vk_rmain.c
|
||||
${REF_SRC_DIR}/vk/vk_rmisc.c
|
||||
${REF_SRC_DIR}/vk/vk_rsurf.c
|
||||
${REF_SRC_DIR}/vk/vk_shaders.c
|
||||
${REF_SRC_DIR}/vk/vk_swapchain.c
|
||||
${REF_SRC_DIR}/vk/vk_validation.c
|
||||
${REF_SRC_DIR}/vk/vk_warp.c
|
||||
${REF_SRC_DIR}/vk/vk_util.c
|
||||
${REF_SRC_DIR}/files/pcx.c
|
||||
${REF_SRC_DIR}/files/stb.c
|
||||
${REF_SRC_DIR}/files/wal.c
|
||||
${REF_SRC_DIR}/files/pvs.c
|
||||
${COMMON_SRC_DIR}/shared/shared.c
|
||||
${COMMON_SRC_DIR}/md4.c
|
||||
)
|
||||
|
||||
set(VK-Header
|
||||
${REF_SRC_DIR}/ref_shared.h
|
||||
${REF_SRC_DIR}/files/stb_image.h
|
||||
${REF_SRC_DIR}/files/stb_image_resize.h
|
||||
${REF_SRC_DIR}/vk/header/qvk.h
|
||||
${REF_SRC_DIR}/vk/header/local.h
|
||||
${REF_SRC_DIR}/vk/header/model.h
|
||||
${REF_SRC_DIR}/vk/header/shaders.h
|
||||
${REF_SRC_DIR}/vk/header/util.h
|
||||
${COMMON_SRC_DIR}/header/shared.h
|
||||
)
|
||||
|
||||
# Wrapper for the Windows binary
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set(Wrapper-Source
|
||||
|
@ -656,3 +701,13 @@ set_target_properties(ref_soft PROPERTIES
|
|||
SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
)
|
||||
target_link_libraries(ref_soft ${yquake2LinkerFlags} ${yquake2SDLLinkerFlags})
|
||||
|
||||
# Build the vk renderer dynamic library
|
||||
add_library(ref_vk MODULE ${VK-Source} ${VK-Header} ${REF-Platform-Specific-Source})
|
||||
set_target_properties(ref_vk PROPERTIES
|
||||
PREFIX ""
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/release
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/release
|
||||
SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
)
|
||||
target_link_libraries(ref_vk ${yquake2LinkerFlags} ${yquake2VulkanLinkerFlags} ${yquake2SDLLinkerFlags})
|
||||
|
|
19
Makefile
19
Makefile
|
@ -99,7 +99,6 @@ endif
|
|||
# On Windows / MinGW $(CC) is undefined by default.
|
||||
ifeq ($(YQ2_OSTYPE),Windows)
|
||||
CC ?= gcc
|
||||
CXX ?= g++
|
||||
endif
|
||||
|
||||
# Detect the compiler
|
||||
|
@ -661,16 +660,6 @@ build/ref_vk/%.o: %.c
|
|||
${Q}mkdir -p $(@D)
|
||||
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) -o $@ $<
|
||||
|
||||
# The Vulkan memory allocator must be build as C++.
|
||||
# Because of this we need to link the lib with the
|
||||
# C++ frontend and not the C frontend... Assume that
|
||||
# the system uses the same compiler for both C and
|
||||
# C++, e.g. clang and clang++. Not gcc and clang++.
|
||||
build/ref_vk/%.o: %.cpp
|
||||
@echo "===> CXX $<"
|
||||
${Q}mkdir -p $(@D)
|
||||
${Q}$(CXX) -c $(subst gnu99,c++11,$(CFLAGS)) $(SDLCFLAGS) $(INCLUDE) -o $@ $<
|
||||
|
||||
# ----------
|
||||
|
||||
# The baseq2 game
|
||||
|
@ -958,7 +947,6 @@ endif
|
|||
# ----------
|
||||
|
||||
REFVK_OBJS_ := \
|
||||
src/client/refresh/vk/vk_mem_alloc.o \
|
||||
src/client/refresh/vk/vk_buffer.o \
|
||||
src/client/refresh/vk/vk_cmd.o \
|
||||
src/client/refresh/vk/vk_common.o \
|
||||
|
@ -1151,17 +1139,14 @@ release/ref_soft.so : $(REFSOFT_OBJS)
|
|||
endif
|
||||
|
||||
# release/ref_vk.so
|
||||
#
|
||||
# Must be linked with the C++ frontend, because the
|
||||
# Vulkan memory allocator is compiled as C++ source.
|
||||
ifeq ($(YQ2_OSTYPE), Windows)
|
||||
release/ref_vk.dll : $(REFVK_OBJS)
|
||||
@echo "===> LD $@"
|
||||
${Q}$(CXX) $(REFVK_OBJS) $(LDFLAGS) $(SDLLDFLAGS) -o $@
|
||||
${Q}$(CC) $(REFVK_OBJS) $(LDFLAGS) $(SDLLDFLAGS) -o $@
|
||||
else
|
||||
release/ref_vk.so : $(REFVK_OBJS)
|
||||
@echo "===> LD $@"
|
||||
${Q}$(CXX) $(REFVK_OBJS) $(LDFLAGS) $(SDLLDFLAGS) -o $@
|
||||
${Q}$(CC) $(REFVK_OBJS) $(LDFLAGS) $(SDLLDFLAGS) -o $@
|
||||
endif
|
||||
|
||||
# release/baseq2/game.so
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2018-2019 Krzysztof Kondrak
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#define VMA_IMPLEMENTATION
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "header/vk_mem_alloc.h"
|
Loading…
Reference in a new issue