Pull in updated vulkan headers instead of carrying our own.

This commit is contained in:
Shpoike 2024-02-07 01:34:21 +00:00
parent 5a6cbc4375
commit ea0509805b
11 changed files with 32 additions and 6571 deletions

View file

@ -50,11 +50,11 @@ ifeq ($(SVNREVISION),)
#try subversion firstly...
SVN_VERSION:=$(shell test -d $(BASE_DIR)/../.svn && svnversion $(BASE_DIR))
SVN_DATE:=$(shell test -d $(BASE_DIR)/../.svn && cd $(BASE_DIR) && svn info --show-item last-changed-date --no-newline)
ifeq (,$(SVN_VERSION))
#grab the svn version from git-svn (assuming no other modifications). this fails when there's extra commits (probably a good thing).
SVN_VERSION=$(shell test -d $(BASE_DIR)/../.git && git svn find-rev `git rev-parse HEAD`)
SVN_DATE:=$(shell test -d $(BASE_DIR)/../.git && git log -1 --format=%cs $(BASE_DIR))
endif
# ifeq (,$(SVN_VERSION))
# #grab the svn version from git-svn (assuming no other modifications). this fails when there's extra commits (probably a good thing).
# SVN_VERSION=$(shell test -d $(BASE_DIR)/../.git && git svn find-rev `git rev-parse HEAD`)
# SVN_DATE:=$(shell test -d $(BASE_DIR)/../.git && git log -1 --format=%cs $(BASE_DIR))
# endif
ifeq (,$(SVN_VERSION))
#try to get git version info instead. this usually uses git-count-hash[-dirty] format
SVN_VERSION:=$(shell test -d $(BASE_DIR)/../.git && cd $(BASE_DIR) && echo $$((`git rev-list HEAD --count` + 29)))
@ -81,10 +81,11 @@ MAKE:=$(MAKE) --no-print-directory SVNREVISION="$(SVNREVISION)" SVN_VERSION="$(S
#update these to download+build a different version. this assumes that the url+subdirs etc contain a consistant version everywhere.
JPEGVER=9c
ZLIBVER=1.3
PNGVER=1.6.39
ZLIBVER=1.3.1
PNGVER=1.6.40
OGGVER=1.3.4
VORBISVER=1.3.6
VORBISVER=1.3.7
VULKANVER=1.3.275.0
SDL2VER=2.26.4
SCINTILLAVER=373
OPUSVER=1.3.1
@ -92,6 +93,7 @@ SPEEXVER=1.2.0
SPEEXDSPVER=1.2.0
FREETYPEVER=2.10.1
BULLETVER=2.87
OPENSSLVER=3.0.1
#cygwin's make's paths confuses non-cygwin things
RELEASE_DIR=$(BASE_DIR)/release
@ -121,7 +123,7 @@ endif
FTE_CONFIG?=fteqw
ifneq ($(findstring msvc,$(FTE_TARGET)),msvc)
ifeq (,$(FTE_CONFIG_EXTRA))
export FTE_CONFIG_EXTRA := $(shell $(CC) -xc -E -P -DFTE_TARGET_$(FTE_TARGET) -DCOMPILE_OPTS $(CFLAGS) common/config_$(FTE_CONFIG).h)
FTE_CONFIG_EXTRA := $(shell $(CC) -xc -E -P -DFTE_TARGET_$(shell echo $(FTE_TARGET) | tr '[:lower:]' '[:upper:]') -DCOMPILE_OPTS $(CFLAGS) common/config_$(FTE_CONFIG).h)
endif
endif
BRANDFLAGS+=-DCONFIG_FILE_NAME=config_$(FTE_CONFIG).h $(FTE_CONFIG_EXTRA)
@ -2343,9 +2345,14 @@ libs-$(ARCH)/libBulletDynamics.a:
test -f bullet3-$(BULLETVER).tar.gz || wget https://github.com/bulletphysics/bullet3/archive/$(BULLETVER).tar.gz -O bullet3-$(BULLETVER).tar.gz
-test -f libs-$(ARCH)/libBulletDynamics.a || (mkdir -p libs-$(ARCH) && cd libs-$(ARCH) && tar -xvzf ../bullet3-$(BULLETVER).tar.gz && cd bullet3-$(BULLETVER) && CFLAGS="$(CFLAGS) -Os" $(TOOLOVERRIDES) $(DO_CMAKE) . && $(TOOLOVERRIDES) $(MAKE) LinearMath BulletDynamics BulletCollision && cp src/LinearMath/libLinearMath.a src/BulletDynamics/libBulletDynamics.a src/BulletCollision/libBulletCollision.a src/btBulletCollisionCommon.h src/btBulletDynamicsCommon.h ..)
libs-$(ARCH)/vulkan/vulkan.h:
test -f vulkan-sdk-$(VULKANVER).tar.gz || wget https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-$(VULKANVER).tar.gz
cd libs-$(ARCH) && tar -xvzf ../vulkan-sdk-$(VULKANVER).tar.gz --strip-components=2 Vulkan-Headers-vulkan-sdk-$(VULKANVER)/include/
ifeq ($(FTE_TARGET),web)
makelibs: libs-$(ARCH)/libz.a $(MAKELIBS)
else
MAKELIBS+=libs-$(ARCH)/vulkan/vulkan.h
makelibs: libs-$(ARCH)/libjpeg.a libs-$(ARCH)/libz9.a libs-$(ARCH)/libz.a libs-$(ARCH)/libpng.a libs-$(ARCH)/libogg.a libs-$(ARCH)/libvorbis.a libs-$(ARCH)/libopus.a libs-$(ARCH)/libspeex.a libs-$(ARCH)/libspeexdsp.a libs-$(ARCH)/libfreetype.a $(MAKELIBS)
endif

View file

@ -1,5 +1,5 @@
!!samps 4
!!cvarf r_bloom
!!cvarf r_bloom=1
!!cvarf r_bloom_retain=1.0
#include "sys/defs.h"
//add them together

View file

@ -1,5 +1,5 @@
!!permu FOG
!!cvarf r_wateralpha
!!cvarf r_wateralpha=1
!!cvarb r_fog_exp2=true
!!argf alpha=0
!!samps diffuse

View file

@ -1,4 +1,4 @@
!!cvarf ffov
!!cvarf ffov=360
!!samps reflectcube
#include "sys/defs.h"

View file

@ -1,4 +1,4 @@
!!cvarf ffov
!!cvarf ffov=360
!!samps reflectcube
#include "sys/defs.h"

View file

@ -1,4 +1,4 @@
!!cvarf ffov
!!cvarf ffov=0
!!samps reflectcube
#include "sys/defs.h"

View file

@ -1,4 +1,4 @@
!!cvarf r_waterwarp
!!cvarf r_waterwarp=1
!!samps 3
#include "sys/defs.h"

View file

@ -515,10 +515,13 @@ qboolean VK_LoadBlob(program_t *prog, void *blobdata, const char *name)
unsigned char *cvardata;
if (blob->blobmagic[0] != 0xff || blob->blobmagic[1] != 'S' || blob->blobmagic[2] != 'P' || blob->blobmagic[3] != 'V')
{
Con_Printf(CON_ERROR"Blob %s is outdated\n", name);
return false; //bad magic.
}
if (blob->blobversion != 1)
{
Con_Printf("Blob %s is outdated\n", name);
Con_Printf(CON_ERROR"Blob %s is outdated\n", name);
return false;
}

View file

@ -97,12 +97,12 @@ const char *vklayerlist[] =
#ifdef VK_NO_PROTOTYPES
#define VKFunc(n) PFN_vk##n vk##n;
#ifdef VK_EXT_debug_utils
VKFunc(CreateDebugUtilsMessengerEXT)
VKFunc(DestroyDebugUtilsMessengerEXT)
static VKFunc(CreateDebugUtilsMessengerEXT)
static VKFunc(DestroyDebugUtilsMessengerEXT)
#endif
#ifdef VK_EXT_debug_report
VKFunc(CreateDebugReportCallbackEXT)
VKFunc(DestroyDebugReportCallbackEXT)
static VKFunc(CreateDebugReportCallbackEXT)
static VKFunc(DestroyDebugReportCallbackEXT)
#endif
VKFuncs
#undef VKFunc
@ -4705,7 +4705,7 @@ qboolean VK_Init(rendererstate_t *info, const char **sysextnames, qboolean (*cre
qboolean *flag;
const char *name;
cvar_t *var;
qboolean def;
qboolean def; //default value when the cvar is empty.
qboolean *superseeded; //if this is set then the extension will not be enabled after all
const char *warningtext; //printed if the extension is requested but not supported by the device
qboolean supported;
@ -5215,7 +5215,7 @@ qboolean VK_Init(rendererstate_t *info, const char **sysextnames, qboolean (*cre
devextensions[numdevextensions++] = knowndevexts[e].name;
}
else if (knowndevexts[e].var && knowndevexts[e].var->ival)
Con_Printf("unable to enable %s extension.%s\n", knowndevexts[e].name, knowndevexts[e].warningtext?knowndevexts[e].warningtext:"");
Con_Printf(CON_WARNING"unable to enable %s extension.%s\n", knowndevexts[e].name, knowndevexts[e].warningtext?knowndevexts[e].warningtext:"");
else if (knowndevexts[e].supported)
Con_DPrintf("Ignoring %s.\n", knowndevexts[e].name);
else

View file

@ -1,120 +0,0 @@
//
// File: vk_platform.h
//
/*
** Copyright (c) 2014-2017 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#ifndef VK_PLATFORM_H_
#define VK_PLATFORM_H_
#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
/*
***************************************************************************************************
* Platform-specific directives and type declarations
***************************************************************************************************
*/
/* Platform-specific calling convention macros.
*
* Platforms should define these so that Vulkan clients call Vulkan commands
* with the same calling conventions that the Vulkan implementation expects.
*
* VKAPI_ATTR - Placed before the return type in function declarations.
* Useful for C++11 and GCC/Clang-style function attribute syntax.
* VKAPI_CALL - Placed after the return type in function declarations.
* Useful for MSVC-style calling convention syntax.
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
*
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
*/
#if defined(_WIN32)
// On Windows, Vulkan commands use the stdcall convention
#define VKAPI_ATTR
#define VKAPI_CALL __stdcall
#define VKAPI_PTR VKAPI_CALL
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
#error "Vulkan isn't supported for the 'armeabi' NDK ABI"
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
// calling convention, i.e. float parameters are passed in registers. This
// is true even if the rest of the application passes floats on the stack,
// as it does by default when compiling for the armeabi-v7a NDK ABI.
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
#define VKAPI_CALL
#define VKAPI_PTR VKAPI_ATTR
#else
// On other platforms, use the default calling convention
#define VKAPI_ATTR
#define VKAPI_CALL
#define VKAPI_PTR
#endif
#include <stddef.h>
#if !defined(VK_NO_STDINT_H)
#if defined(_MSC_VER) && (_MSC_VER < 1600)
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif
#endif // !defined(VK_NO_STDINT_H)
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
// Platform-specific headers required by platform window system extensions.
// These are enabled prior to #including "vulkan.h". The same enable then
// controls inclusion of the extension interfaces in vulkan.h.
#ifdef VK_USE_PLATFORM_ANDROID_KHR
#include <android/native_window.h>
#endif
#ifdef VK_USE_PLATFORM_MIR_KHR
#include <mir_toolkit/client_types.h>
#endif
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
#include <wayland-client.h>
#endif
#ifdef VK_USE_PLATFORM_WIN32_KHR
#include <windows.h>
#endif
#ifdef VK_USE_PLATFORM_XLIB_KHR
#include <X11/Xlib.h>
#endif
#ifdef VK_USE_PLATFORM_XCB_KHR
#include <xcb/xcb.h>
#endif
#endif

File diff suppressed because it is too large Load diff