From c7efe3c7b91b795de76efb1c2755c1bb44dbf981 Mon Sep 17 00:00:00 2001 From: thfr Date: Sun, 7 Mar 2021 17:11:34 +0000 Subject: [PATCH] update to FNA3D 21.03. Bump major. Tested with Unexplored. Changelog: 21.03 New Features: * Added support for tracing FNA3D call streams. FNA3D binaries built with tracing enabled will capture FNA3D calls and serialize them to a file, which can be played back on any platform and renderer with the program found in the replay/ folder. Note that these traces contains texture/buffer data, so be careful to respect copyrights regarding game data! Fixes: * Fix a possible crash when calling SetRenderTargets with 0 targets but a non-null target array * Micro-optimize OpenGL thread commands by skipping the round-trip through the public FNA3D API * Continued work on the Vulkan pre-release 21.02 New Features: * Added FNA3D_SysRenderer.h, which contains extensions for external graphics middleware interop Fixes: * Fix VPOS for OpenGL ES contexts * Pipeline cache data is now properly invalidated when associated shaders are deleted * Wrap-up work on the Vulkan beta, now in the release candidate stage ** Added FNA3D_VULKAN_MEMORY_REQUIREMENT ** Added FNA3D_VULKAN_PIPELINE_CACHE_FILE_NAME --- graphics/fna3d/Makefile | 6 +++--- graphics/fna3d/distinfo | 4 ++-- graphics/fna3d/patches/patch-CMakeLists_txt | 22 +++++++++++---------- graphics/fna3d/pkg/PLIST | 3 ++- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/graphics/fna3d/Makefile b/graphics/fna3d/Makefile index 020919ca403..6680a446e9d 100644 --- a/graphics/fna3d/Makefile +++ b/graphics/fna3d/Makefile @@ -1,12 +1,12 @@ -# $OpenBSD: Makefile,v 1.4 2021/01/23 05:13:06 thfr Exp $ +# $OpenBSD: Makefile,v 1.5 2021/03/07 17:11:34 thfr Exp $ # versions are in sync with FNA versions -V = 21.01 +V = 21.03 COMMENT = 3D graphics library for FNA DISTNAME = fna-${V:S/.//g} PKGNAME = fna3d-${V} -SHARED_LIBS = FNA3D 1.0 # 20.12 +SHARED_LIBS = FNA3D 2.0 # 21.03 CATEGORIES = graphics HOMEPAGE = https://github.com/FNA-XNA/FNA3D diff --git a/graphics/fna3d/distinfo b/graphics/fna3d/distinfo index df1eb78e9d1..59307f63c79 100644 --- a/graphics/fna3d/distinfo +++ b/graphics/fna3d/distinfo @@ -1,2 +1,2 @@ -SHA256 (fna-2101.zip) = FAh4zZE+AoqKsKusB813r7IFJu2j1q1ZHMPZLXdA0iA= -SIZE (fna-2101.zip) = 3905072 +SHA256 (fna-2103.zip) = OMe04hwbElhXORhRl63NOy1zTS6eTcJMoRUQ4521jGY= +SIZE (fna-2103.zip) = 3931082 diff --git a/graphics/fna3d/patches/patch-CMakeLists_txt b/graphics/fna3d/patches/patch-CMakeLists_txt index 48e167f4af7..1c52e8e345b 100644 --- a/graphics/fna3d/patches/patch-CMakeLists_txt +++ b/graphics/fna3d/patches/patch-CMakeLists_txt @@ -1,4 +1,4 @@ -$OpenBSD: patch-CMakeLists_txt,v 1.3 2021/01/23 05:13:06 thfr Exp $ +$OpenBSD: patch-CMakeLists_txt,v 1.4 2021/03/07 17:11:34 thfr Exp $ set correct library version disable bundled mojoshader in favor of the one from ports @@ -15,19 +15,19 @@ Index: CMakeLists.txt + # Options option(BUILD_SHARED_LIBS "Build shared library" ON) - option(DISABLE_D3D11 "Disable D3D11 backend") -@@ -11,7 +14,7 @@ option(DISABLE_D3D11 "Disable D3D11 backend") + option(TRACING_SUPPORT "Build with tracing enabled" OFF) +@@ -12,7 +15,7 @@ option(DISABLE_D3D11 "Disable D3D11 backend") SET(LIB_MAJOR_VERSION "0") SET(LIB_MINOR_VERSION "21") - SET(LIB_REVISION "01") + SET(LIB_REVISION "03") -SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}") +SET(LIB_VERSION "${LIBFNA3D_VERSION}") # Build Type if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) -@@ -105,28 +108,11 @@ add_library(FNA3D - src/FNA3D_Image.c +@@ -110,20 +113,6 @@ add_library(FNA3D src/FNA3D_PipelineCache.c + src/FNA3D_Tracing.c ) -add_library(mojoshader STATIC - MojoShader/mojoshader.c @@ -43,8 +43,10 @@ Index: CMakeLists.txt - MojoShader/profiles/mojoshader_profile_metal.c - MojoShader/profiles/mojoshader_profile_spirv.c -) - - # Build flags + if(TRACING_SUPPORT) + add_executable(fna3d_replay replay/replay.c) + target_link_libraries(fna3d_replay FNA3D) +@@ -136,9 +125,6 @@ endif() if(NOT MSVC) set_property(TARGET FNA3D PROPERTY COMPILE_FLAGS "-std=gnu99 -Wall -Wno-strict-aliasing -pedantic") endif() @@ -54,7 +56,7 @@ Index: CMakeLists.txt # FNA3D folders as includes, for other targets to consume target_include_directories(FNA3D PUBLIC -@@ -134,10 +120,6 @@ target_include_directories(FNA3D PUBLIC +@@ -146,10 +132,6 @@ target_include_directories(FNA3D PUBLIC $ $ ) @@ -65,7 +67,7 @@ Index: CMakeLists.txt # MinGW builds should statically link libgcc if(MINGW) -@@ -173,7 +155,6 @@ else() +@@ -185,7 +167,6 @@ else() else() message(STATUS "no TARGET SDL2::SDL2, or SDL2, using variables") target_include_directories(FNA3D PUBLIC "$") diff --git a/graphics/fna3d/pkg/PLIST b/graphics/fna3d/pkg/PLIST index ff18b723e4e..146f53173ab 100644 --- a/graphics/fna3d/pkg/PLIST +++ b/graphics/fna3d/pkg/PLIST @@ -1,4 +1,5 @@ -@comment $OpenBSD: PLIST,v 1.1.1.1 2020/10/05 16:05:26 thfr Exp $ +@comment $OpenBSD: PLIST,v 1.2 2021/03/07 17:11:34 thfr Exp $ include/FNA3D.h include/FNA3D_Image.h +include/FNA3D_SysRenderer.h @lib lib/libFNA3D.so.${LIBFNA3D_VERSION}