From 1f493f96b72f7dcb3787573449bbf3f8c9458a78 Mon Sep 17 00:00:00 2001 From: Pavel Rojtberg Date: Sat, 9 Nov 2024 02:26:23 +0100 Subject: [PATCH 1/3] CMake: MinGW - drop some hardcoded flags --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5d23d7ee8b..4aae844d008 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,10 +182,6 @@ if (MINGW) # the atomic primitives set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686") endif () - # disable this optimisation because it breaks release builds (reason unknown) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-slp-vectorize") - # Ignore some really annoying warnings which also happen in dependencies - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=cast-qual -Wno-unused-local-typedefs") endif () include(GenerateExportHeader) From 0e2d088b2b35c0e85a08a587a2b0b27d8a820f66 Mon Sep 17 00:00:00 2001 From: Pavel Rojtberg Date: Sat, 9 Nov 2024 02:28:38 +0100 Subject: [PATCH 2/3] D3D9: GpuProgram - dont use deprecated openResource --- RenderSystems/Direct3D9/src/OgreD3D9GpuProgram.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RenderSystems/Direct3D9/src/OgreD3D9GpuProgram.cpp b/RenderSystems/Direct3D9/src/OgreD3D9GpuProgram.cpp index 1db0c8b70a3..06ff36aa2c9 100644 --- a/RenderSystems/Direct3D9/src/OgreD3D9GpuProgram.cpp +++ b/RenderSystems/Direct3D9/src/OgreD3D9GpuProgram.cpp @@ -148,7 +148,7 @@ namespace Ogre { // find & load source code DataStreamPtr stream = ResourceGroupManager::getSingleton().openResource( - mFilename, mGroup, true, this); + mFilename, mGroup, this); mSource = stream->getAsString(); } From c7d092b30079154d8e102cd114f8ff35a235cbd4 Mon Sep 17 00:00:00 2001 From: Pavel Rojtberg Date: Sat, 9 Nov 2024 02:30:10 +0100 Subject: [PATCH 3/3] D3D11: silence null conversion warnings --- RenderSystems/Direct3D11/src/OgreD3D11HLSLProgram.cpp | 2 +- RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp | 2 +- RenderSystems/Direct3D11/src/OgreD3D11RenderWindow.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RenderSystems/Direct3D11/src/OgreD3D11HLSLProgram.cpp b/RenderSystems/Direct3D11/src/OgreD3D11HLSLProgram.cpp index 81873bd2a0e..f9bf41dedc5 100644 --- a/RenderSystems/Direct3D11/src/OgreD3D11HLSLProgram.cpp +++ b/RenderSystems/Direct3D11/src/OgreD3D11HLSLProgram.cpp @@ -317,7 +317,7 @@ namespace Ogre { mEntryPoint.c_str(), // [in] Name of the shader-entrypoint function where shader execution begins. target, // [in] A string that specifies the shader model; can be any profile in shader model 4 or higher. compileFlags, // [in] Effect compile flags - no D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY at the first try... - NULL, // [in] Effect compile flags + 0, // [in] Effect compile flags pMicroCode.GetAddressOf(),// [out] A pointer to an ID3DBlob Interface which contains the compiled shader, as well as any embedded debug and symbol-table information. errors.GetAddressOf() // [out] A pointer to an ID3DBlob Interface which contains a listing of errors and warnings that occurred during compilation. These errors and warnings are identical to the the debug output from a debugger. ); diff --git a/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp b/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp index 30ea7235d40..815b34c2061 100644 --- a/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp +++ b/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp @@ -2518,7 +2518,7 @@ namespace Ogre { 4, 0 }, // MSAA 4x { 2, 0 }, // MSAA 2x { 1, 0 }, // MSAA 1x - { NULL }, + { 0 }, }; // Find matching AA mode diff --git a/RenderSystems/Direct3D11/src/OgreD3D11RenderWindow.cpp b/RenderSystems/Direct3D11/src/OgreD3D11RenderWindow.cpp index 6c8108b239e..f49c6f3503d 100644 --- a/RenderSystems/Direct3D11/src/OgreD3D11RenderWindow.cpp +++ b/RenderSystems/Direct3D11/src/OgreD3D11RenderWindow.cpp @@ -812,7 +812,7 @@ namespace Ogre _createSwapChain(); _createSizeDependedD3DResources(); - mDevice.GetDXGIFactory()->MakeWindowAssociation(mHWnd, NULL); + mDevice.GetDXGIFactory()->MakeWindowAssociation(mHWnd, 0); setHidden(mHidden); D3D11RenderSystem* rsys = static_cast(Root::getSingleton().getRenderSystem()); @@ -834,7 +834,7 @@ namespace Ogre void D3D11RenderWindowHwnd::notifyDeviceRestored(D3D11Device* device) { D3D11RenderWindowSwapChainBased::notifyDeviceRestored(device); - mDevice.GetDXGIFactory()->MakeWindowAssociation(mHWnd, NULL); + mDevice.GetDXGIFactory()->MakeWindowAssociation(mHWnd, 0); } //--------------------------------------------------------------------- HRESULT D3D11RenderWindowHwnd::_createSwapChainImpl(IDXGIDeviceN* pDXGIDevice)