summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/src/config.h
diff options
context:
space:
mode:
author Julian Sikorski <belegdol+github@gmail.com>2019-10-13 13:50:38 +0200
committer R. Belmont <rb6502@users.noreply.github.com>2019-10-13 07:50:38 -0400
commit0837e7451a84f95c29dbdb9bd6b8b931fee1635d (patch)
tree626bcbd250a7fbebdf5958a288d2f438d4f9fb5a /3rdparty/bgfx/src/config.h
parentc913ccb59d713ce0b91135520719ac5385e54358 (diff)
WIP: sync bgfx, bx and bimg with latest upstream (#5723)
* Sync with bgfx upstream revision b91d0b6 * Sync with bx upstream revision d60912b * Sync with bimg upstream revision bd81f60 * Add astc-codec decoder * Rename VertexDecl to VertexLayout * Rename UniformType enum Int1 to Sampler. * Add NVN stub * Fix unused-const-variable error on macOS * Drop redundant explicit language parameters buildoptions_cpp are only applied to c++ files and buildoptions_objcpp are only applied to objective c++ files. As such, hardcoding -x offers no benefit while preventing overrides (such as one needed by 3rdparty/bgfx/src/renderer_vk.cpp on macOS) from working. * Re-introduce -x c++ in places where C code is compiled as C++ to prevent clang from throwing a warning * Build bgfx as Objective-C++ on macOS It is needed due to included headers * Enable Direct3D12 and Vulkan bgfx rendering backends * Enable building of spirv shaders * Properly escape /c in cmd call * Comment out dx12 bgfx renderer * Honor VERBOSE setting during shaders build * Only invert hlsl shader XYZ_TO_sRGB matrix for opengl * Add spirv shaders * OpenGL ES needs transposed matrix too * Metal needs transposed matrix as well
Diffstat (limited to '3rdparty/bgfx/src/config.h')
-rw-r--r--3rdparty/bgfx/src/config.h71
1 files changed, 43 insertions, 28 deletions
diff --git a/3rdparty/bgfx/src/config.h b/3rdparty/bgfx/src/config.h
index d8a1ab97164..dbf746e638d 100644
--- a/3rdparty/bgfx/src/config.h
+++ b/3rdparty/bgfx/src/config.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
+ * Copyright 2011-2019 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
@@ -15,11 +15,12 @@
#if !defined(BGFX_CONFIG_RENDERER_DIRECT3D9) \
&& !defined(BGFX_CONFIG_RENDERER_DIRECT3D11) \
&& !defined(BGFX_CONFIG_RENDERER_DIRECT3D12) \
+ && !defined(BGFX_CONFIG_RENDERER_GNM) \
&& !defined(BGFX_CONFIG_RENDERER_METAL) \
+ && !defined(BGFX_CONFIG_RENDERER_NVN) \
&& !defined(BGFX_CONFIG_RENDERER_OPENGL) \
&& !defined(BGFX_CONFIG_RENDERER_OPENGLES) \
- && !defined(BGFX_CONFIG_RENDERER_VULKAN) \
- && !defined(BGFX_CONFIG_RENDERER_GNM)
+ && !defined(BGFX_CONFIG_RENDERER_VULKAN)
# ifndef BGFX_CONFIG_RENDERER_DIRECT3D9
# define BGFX_CONFIG_RENDERER_DIRECT3D9 (0 \
@@ -43,6 +44,12 @@
? 1 : 0)
# endif // BGFX_CONFIG_RENDERER_DIRECT3D12
+# ifndef BGFX_CONFIG_RENDERER_GNM
+# define BGFX_CONFIG_RENDERER_GNM (0 \
+ || BX_PLATFORM_PS4 \
+ ? 1 : 0)
+# endif // BGFX_CONFIG_RENDERER_GNM
+
# ifndef BGFX_CONFIG_RENDERER_METAL
# define BGFX_CONFIG_RENDERER_METAL (0 \
|| (BX_PLATFORM_IOS && BX_CPU_ARM) \
@@ -50,15 +57,29 @@
? 1 : 0)
# endif // BGFX_CONFIG_RENDERER_METAL
+# ifndef BGFX_CONFIG_RENDERER_NVN
+# define BGFX_CONFIG_RENDERER_NVN (0 \
+ || BX_PLATFORM_NX \
+ ? 1 : 0)
+# endif // BGFX_CONFIG_RENDERER_NVN
+
+# ifndef BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION
+# define BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION 1
+# endif // BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION
+
# ifndef BGFX_CONFIG_RENDERER_OPENGL
# define BGFX_CONFIG_RENDERER_OPENGL (0 \
|| BX_PLATFORM_BSD \
|| BX_PLATFORM_LINUX \
|| BX_PLATFORM_OSX \
|| BX_PLATFORM_WINDOWS \
- ? 1 : 0)
+ ? BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION : 0)
# endif // BGFX_CONFIG_RENDERER_OPENGL
+# ifndef BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION
+# define BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION 1
+# endif // BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION
+
# ifndef BGFX_CONFIG_RENDERER_OPENGLES
# define BGFX_CONFIG_RENDERER_OPENGLES (0 \
|| BX_PLATFORM_ANDROID \
@@ -67,7 +88,7 @@
|| BX_PLATFORM_RPI \
|| BX_PLATFORM_STEAMLINK \
|| BX_PLATFORM_NX \
- ? 1 : 0)
+ ? BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION : 0)
# endif // BGFX_CONFIG_RENDERER_OPENGLES
# ifndef BGFX_CONFIG_RENDERER_VULKAN
@@ -76,15 +97,10 @@
|| BX_PLATFORM_LINUX \
|| BX_PLATFORM_WINDOWS \
|| BX_PLATFORM_NX \
+ || BX_PLATFORM_OSX \
? 1 : 0)
# endif // BGFX_CONFIG_RENDERER_VULKAN
-# ifndef BGFX_CONFIG_RENDERER_GNM
-# define BGFX_CONFIG_RENDERER_GNM (0 \
- || BX_PLATFORM_PS4 \
- ? 1 : 0)
-# endif // BGFX_CONFIG_RENDERER_GNM
-
#else
# ifndef BGFX_CONFIG_RENDERER_DIRECT3D9
# define BGFX_CONFIG_RENDERER_DIRECT3D9 0
@@ -98,10 +114,18 @@
# define BGFX_CONFIG_RENDERER_DIRECT3D12 0
# endif // BGFX_CONFIG_RENDERER_DIRECT3D12
+# ifndef BGFX_CONFIG_RENDERER_GNM
+# define BGFX_CONFIG_RENDERER_GNM 0
+# endif // BGFX_CONFIG_RENDERER_GNM
+
# ifndef BGFX_CONFIG_RENDERER_METAL
# define BGFX_CONFIG_RENDERER_METAL 0
# endif // BGFX_CONFIG_RENDERER_METAL
+# ifndef BGFX_CONFIG_RENDERER_NVN
+# define BGFX_CONFIG_RENDERER_NVN 0
+# endif // BGFX_CONFIG_RENDERER_NVN
+
# ifndef BGFX_CONFIG_RENDERER_OPENGL
# define BGFX_CONFIG_RENDERER_OPENGL 0
# endif // BGFX_CONFIG_RENDERER_OPENGL
@@ -113,10 +137,6 @@
# ifndef BGFX_CONFIG_RENDERER_VULKAN
# define BGFX_CONFIG_RENDERER_VULKAN 0
# endif // BGFX_CONFIG_RENDERER_VULKAN
-
-# ifndef BGFX_CONFIG_RENDERER_GNM
-# define BGFX_CONFIG_RENDERER_GNM 0
-# endif // BGFX_CONFIG_RENDERER_GNM
#endif // !defined...
#if BGFX_CONFIG_RENDERER_OPENGL && BGFX_CONFIG_RENDERER_OPENGL < 21
@@ -148,21 +168,16 @@
# define BGFX_CONFIG_DEBUG_PERFHUD 0
#endif // BGFX_CONFIG_DEBUG_NVPERFHUD
-/// Enable PIX markers.
-#ifndef BGFX_CONFIG_DEBUG_PIX
-# define BGFX_CONFIG_DEBUG_PIX BGFX_CONFIG_DEBUG
-#endif // BGFX_CONFIG_DEBUG_PIX
+/// Enable annotation for graphics debuggers.
+#ifndef BGFX_CONFIG_DEBUG_ANNOTATION
+# define BGFX_CONFIG_DEBUG_ANNOTATION BGFX_CONFIG_DEBUG
+#endif // BGFX_CONFIG_DEBUG_ANNOTATION
/// Enable DX11 object names.
#ifndef BGFX_CONFIG_DEBUG_OBJECT_NAME
-# define BGFX_CONFIG_DEBUG_OBJECT_NAME BGFX_CONFIG_DEBUG
+# define BGFX_CONFIG_DEBUG_OBJECT_NAME BGFX_CONFIG_DEBUG_ANNOTATION
#endif // BGFX_CONFIG_DEBUG_OBJECT_NAME
-/// Enable Metal markers.
-#ifndef BGFX_CONFIG_DEBUG_MTL
-# define BGFX_CONFIG_DEBUG_MTL BGFX_CONFIG_DEBUG
-#endif // BGFX_CONFIG_DEBUG_MTL
-
/// Enable uniform debug checks.
#ifndef BGFX_CONFIG_DEBUG_UNIFORM
# define BGFX_CONFIG_DEBUG_UNIFORM BGFX_CONFIG_DEBUG
@@ -220,9 +235,9 @@ BX_STATIC_ASSERT(bx::isPowerOf2(BGFX_CONFIG_MAX_VIEWS), "BGFX_CONFIG_MAX_VIEWS m
# define BGFX_CONFIG_MAX_VIEW_NAME 256
#endif // BGFX_CONFIG_MAX_VIEW_NAME
-#ifndef BGFX_CONFIG_MAX_VERTEX_DECLS
-# define BGFX_CONFIG_MAX_VERTEX_DECLS 64
-#endif // BGFX_CONFIG_MAX_VERTEX_DECLS
+#ifndef BGFX_CONFIG_MAX_VERTEX_LAYOUTS
+# define BGFX_CONFIG_MAX_VERTEX_LAYOUTS 64
+#endif // BGFX_CONFIG_MAX_VERTEX_LAYOUTS
#ifndef BGFX_CONFIG_MAX_INDEX_BUFFERS
# define BGFX_CONFIG_MAX_INDEX_BUFFERS (4<<10)