From 126f5d388391cec702ad0a9358259e82c1d5f881 Mon Sep 17 00:00:00 2001 From: Andy Duplain Date: Wed, 10 Feb 2021 19:42:10 +0000 Subject: [PATCH 1/6] Update submodules. --- bgfx | 2 +- bimg | 2 +- bx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bgfx b/bgfx index 5b05c6c0..7daf5e0b 160000 --- a/bgfx +++ b/bgfx @@ -1 +1 @@ -Subproject commit 5b05c6c09e3884143491f289f456d6e98579c7ae +Subproject commit 7daf5e0ba76ec46c56e700e74592d36bdd9efd31 diff --git a/bimg b/bimg index bfe3c683..c779a67d 160000 --- a/bimg +++ b/bimg @@ -1 +1 @@ -Subproject commit bfe3c683f9c628fb3fd5d71b1a80d8fbdb6044a4 +Subproject commit c779a67d6041c289f147a732c225fa78635a09a3 diff --git a/bx b/bx index 892062b1..0c7e4c11 160000 --- a/bx +++ b/bx @@ -1 +1 @@ -Subproject commit 892062b10b16f905915258c0ad0d3c5d89dc6444 +Subproject commit 0c7e4c1167ecf2d715b8046ff84c6684f6898ec1 From 445b7bbc70e7597c0b7cf8852849069ec3d3ae6b Mon Sep 17 00:00:00 2001 From: Andy Duplain Date: Wed, 10 Feb 2021 20:00:38 +0000 Subject: [PATCH 2/6] Fix glslang error. --- cmake/3rdparty/glslang.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/3rdparty/glslang.cmake b/cmake/3rdparty/glslang.cmake index f58c52bc..585be185 100644 --- a/cmake/3rdparty/glslang.cmake +++ b/cmake/3rdparty/glslang.cmake @@ -15,7 +15,7 @@ endif() file( GLOB GLSLANG_SOURCES ${BGFX_DIR}/3rdparty/glslang/glslang/GenericCodeGen/*.cpp ${BGFX_DIR}/3rdparty/glslang/glslang/MachineIndependent/*.cpp - ${BGFX_DIR}/3rdparty/glslang/glslang/MachineIndependent/preprocessor/*.cpp + ${BGFX_DIR}/3rdparty/glslang/glslang/MachineIndependent/preprocessor/*.cpp ${BGFX_DIR}/3rdparty/glslang/glslang/HLSL/*.cpp ${BGFX_DIR}/3rdparty/glslang/hlsl/*.cpp ${BGFX_DIR}/3rdparty/glslang/SPIRV/*.cpp @@ -35,6 +35,8 @@ target_include_directories( glslang PUBLIC ${BGFX_DIR}/3rdparty/glslang ${BGFX_DIR}/3rdparty/glslang/glslang/Include ${BGFX_DIR}/3rdparty/glslang/glslang/Public + PRIVATE + ${BGFX_DIR}/3rdparty ) set_target_properties( glslang PROPERTIES FOLDER "bgfx/3rdparty" ) From 4e9630e6c30fa6ea24b0d46dea044d2a6633284d Mon Sep 17 00:00:00 2001 From: Andy Duplain Date: Fri, 12 Feb 2021 09:51:02 +0000 Subject: [PATCH 3/6] Allow BGFX_CONFIG_MULTITHREADED to be set. Also simplify BGFX_CONFIG_DEBUG evaluation. --- CMakeLists.txt | 1 + cmake/bgfx.cmake | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52a7315b..0dba5818 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,7 @@ option( BGFX_USE_OVR "Build with OVR support." OF option( BGFX_AMALGAMATED "Amalgamated bgfx build for faster compilation" OFF ) option( BX_AMALGAMATED "Amalgamated bx build for faster compilation" OFF ) option( BGFX_CONFIG_DEBUG "Enables debug configuration on all builds" OFF ) +option( BGFX_CONFIG_MULTITHREADED "Enables multithreaded renderering" ON ) option( BGFX_CONFIG_RENDERER_WEBGPU "Enables the webgpu renderer" OFF ) set( BGFX_OPENGL_VERSION "" CACHE STRING "Specify minimum opengl version" ) diff --git a/cmake/bgfx.cmake b/cmake/bgfx.cmake index c2757ad4..07e3e91e 100755 --- a/cmake/bgfx.cmake +++ b/cmake/bgfx.cmake @@ -52,11 +52,9 @@ if(BGFX_CONFIG_RENDERER_WEBGPU) endif() endif() -# Enable BGFX_CONFIG_DEBUG in Debug configuration -target_compile_definitions( bgfx PRIVATE "$<$:BGFX_CONFIG_DEBUG=1>" ) -if(BGFX_CONFIG_DEBUG) - target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_DEBUG=1) -endif() +target_compile_definitions(bgfx PRIVATE BGFX_CONFIG_DEBUG=$) + +target_compile_definitions(bgfx PRIVATE BGFX_CONFIG_MULTITHREADED=$) if( NOT ${BGFX_OPENGL_VERSION} STREQUAL "" ) target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=${BGFX_OPENGL_VERSION} ) From d5a021a1e87b14ec3b6c275fe3ebbd1b5a89b0b2 Mon Sep 17 00:00:00 2001 From: Andy Duplain Date: Tue, 27 Apr 2021 17:18:45 +0100 Subject: [PATCH 4/6] Update submodules and fix shaderc link error. --- .gitignore | 1 + .gitmodules | 3 +++ CMakeSettings.json | 15 +++++++++++++++ bgfx | 2 +- bimg | 2 +- bx | 2 +- cmake/tools/shaderc.cmake | 17 ++++++++++++++++- 7 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 CMakeSettings.json diff --git a/.gitignore b/.gitignore index 970a8eff..b3e62210 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ install_manifest.txt generated/* !generated/*.in cmake_install.cmake +.vs/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 05d956fc..ddfe4a4f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,12 @@ [submodule "bgfx"] path = bgfx url = https://github.com/bkaradzic/bgfx.git + branch = master [submodule "bx"] path = bx url = https://github.com/bkaradzic/bx.git + branch = master [submodule "bimg"] path = bimg url = https://github.com/bkaradzic/bimg.git + branch = master diff --git a/CMakeSettings.json b/CMakeSettings.json new file mode 100644 index 00000000..08070e74 --- /dev/null +++ b/CMakeSettings.json @@ -0,0 +1,15 @@ +{ + "configurations": [ + { + "name": "x64-Debug", + "generator": "Ninja", + "configurationType": "Debug", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "" + } + ] +} \ No newline at end of file diff --git a/bgfx b/bgfx index 7daf5e0b..d01f86a6 160000 --- a/bgfx +++ b/bgfx @@ -1 +1 @@ -Subproject commit 7daf5e0ba76ec46c56e700e74592d36bdd9efd31 +Subproject commit d01f86a6a9cac2e7c97c13983887f0ca4994318a diff --git a/bimg b/bimg index c779a67d..a39082dd 160000 --- a/bimg +++ b/bimg @@ -1 +1 @@ -Subproject commit c779a67d6041c289f147a732c225fa78635a09a3 +Subproject commit a39082ddbcb087fbe0578eecd3f59dd42e8fc23a diff --git a/bx b/bx index 0c7e4c11..51f25ba6 160000 --- a/bx +++ b/bx @@ -1 +1 @@ -Subproject commit 0c7e4c1167ecf2d715b8046ff84c6684f6898ec1 +Subproject commit 51f25ba638b9cb35eb2ac078f842a4bed0746d56 diff --git a/cmake/tools/shaderc.cmake b/cmake/tools/shaderc.cmake index 92f23d01..df683068 100644 --- a/cmake/tools/shaderc.cmake +++ b/cmake/tools/shaderc.cmake @@ -17,7 +17,22 @@ include( cmake/3rdparty/spirv-cross.cmake ) include( cmake/3rdparty/spirv-tools.cmake ) include( cmake/3rdparty/webgpu.cmake ) -add_executable( shaderc ${BGFX_DIR}/tools/shaderc/shaderc.cpp ${BGFX_DIR}/tools/shaderc/shaderc.h ${BGFX_DIR}/tools/shaderc/shaderc_glsl.cpp ${BGFX_DIR}/tools/shaderc/shaderc_hlsl.cpp ${BGFX_DIR}/tools/shaderc/shaderc_pssl.cpp ${BGFX_DIR}/tools/shaderc/shaderc_spirv.cpp ${BGFX_DIR}/tools/shaderc/shaderc_metal.cpp ) +add_executable( shaderc + ${BGFX_DIR}/tools/shaderc/shaderc.cpp + ${BGFX_DIR}/tools/shaderc/shaderc.h + ${BGFX_DIR}/tools/shaderc/shaderc_glsl.cpp + ${BGFX_DIR}/tools/shaderc/shaderc_hlsl.cpp + ${BGFX_DIR}/tools/shaderc/shaderc_pssl.cpp + ${BGFX_DIR}/tools/shaderc/shaderc_spirv.cpp + ${BGFX_DIR}/tools/shaderc/shaderc_metal.cpp + + # odd dependencies + ${BGFX_DIR}/src/shader_dx9bc.cpp + ${BGFX_DIR}/src/shader_dxbc.cpp + ${BGFX_DIR}/src/shader.cpp +) + +target_include_directories( shaderc PRIVATE ${BGFX_DIR}/include/ ) target_compile_definitions( shaderc PRIVATE "-D_CRT_SECURE_NO_WARNINGS" ) set_target_properties( shaderc PROPERTIES FOLDER "bgfx/tools" ) target_link_libraries(shaderc PRIVATE bx bimg bgfx-vertexlayout bgfx-shader-spirv fcpp glsl-optimizer glslang spirv-cross spirv-tools webgpu) From 8030911aa66cdc0f07344ca10ef3b11b8da0899c Mon Sep 17 00:00:00 2001 From: Andy Duplain Date: Wed, 28 Apr 2021 08:54:18 +0100 Subject: [PATCH 5/6] Update examples.cmake. --- cmake/examples.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/examples.cmake b/cmake/examples.cmake index 68093b41..740b8618 100755 --- a/cmake/examples.cmake +++ b/cmake/examples.cmake @@ -265,10 +265,15 @@ if( BGFX_BUILD_EXAMPLES ) 34-mvs 35-dynamic 36-sky -# 37-gpudrivenrendering + 37-gpudrivenrendering 38-bloom 39-assao -# 40-svt + 40-svt + 41-tess + 42-bunnylod + 43-denoise + 44-sss + 45-bokeh ) foreach( EXAMPLE ${BGFX_EXAMPLES} ) From c6f76e9a86fac604cbba977433eebf48d852c952 Mon Sep 17 00:00:00 2001 From: Andy Duplain Date: Mon, 10 May 2021 16:17:47 +0100 Subject: [PATCH 6/6] Update BGFX and BIMG. --- bgfx | 2 +- bimg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bgfx b/bgfx index d01f86a6..9cd7cbb8 160000 --- a/bgfx +++ b/bgfx @@ -1 +1 @@ -Subproject commit d01f86a6a9cac2e7c97c13983887f0ca4994318a +Subproject commit 9cd7cbb877825a5a3f29dd29ba041f6e73e301ae diff --git a/bimg b/bimg index a39082dd..8355d36b 160000 --- a/bimg +++ b/bimg @@ -1 +1 @@ -Subproject commit a39082ddbcb087fbe0578eecd3f59dd42e8fc23a +Subproject commit 8355d36befc90c1db82fca8e54f38bfb7eeb3530