From 2adf23cd60696cdef7bfab30854ec74592df2e23 Mon Sep 17 00:00:00 2001 From: walbourn Date: Fri, 20 Jan 2023 00:07:49 -0800 Subject: [PATCH] latest updates DXUT/FX11 --- DXUT/Core/DXUT.h | 2 +- DXUT/Core/dxerr.h | 8 ++++++++ DXUT/Optional/DXUTLockFreePipe.h | 5 +++-- DXUT/README.md | 4 +++- Effects11/README.md | 6 +++++- Effects11/inc/d3dx11effect.h | 2 +- 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/DXUT/Core/DXUT.h b/DXUT/Core/DXUT.h index b6044ffd..28d91750 100644 --- a/DXUT/Core/DXUT.h +++ b/DXUT/Core/DXUT.h @@ -137,7 +137,7 @@ ((DWORD)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff))) #endif -#define DXUT_VERSION 1129 +#define DXUT_VERSION 1130 //-------------------------------------------------------------------------------------- // Structs diff --git a/DXUT/Core/dxerr.h b/DXUT/Core/dxerr.h index c5249a3a..9cadb476 100644 --- a/DXUT/Core/dxerr.h +++ b/DXUT/Core/dxerr.h @@ -58,10 +58,18 @@ HRESULT WINAPI DXTraceW( _In_z_ const WCHAR* strFile, _In_ DWORD dwLine, _In_ HR // //-------------------------------------------------------------------------------------- #if defined(DEBUG) || defined(_DEBUG) +#ifdef _MSC_VER #define DXTRACE_MSG(str) DXTrace( __FILEW__, (DWORD)__LINE__, 0, str, false ) #define DXTRACE_ERR(str,hr) DXTrace( __FILEW__, (DWORD)__LINE__, hr, str, false ) #define DXTRACE_ERR_MSGBOX(str,hr) DXTrace( __FILEW__, (DWORD)__LINE__, hr, str, true ) #else +#define DXUT_PASTE(x, y) x##y +#define DXUT_MAKEWIDE(x) DXUT_PASTE(L,x) +#define DXTRACE_MSG(str) DXTrace( DXUT_MAKEWIDE(__FILE__), (DWORD)__LINE__, 0, str, false ) +#define DXTRACE_ERR(str,hr) DXTrace( DXUT_MAKEWIDE(__FILE__), (DWORD)__LINE__, hr, str, false ) +#define DXTRACE_ERR_MSGBOX(str,hr) DXTrace( DXUT_MAKEWIDE(__FILE__), (DWORD)__LINE__, hr, str, true ) +#endif +#else #define DXTRACE_MSG(str) (0L) #define DXTRACE_ERR(str,hr) (hr) #define DXTRACE_ERR_MSGBOX(str,hr) (hr) diff --git a/DXUT/Optional/DXUTLockFreePipe.h b/DXUT/Optional/DXUTLockFreePipe.h index 20bdc597..e52bf9c1 100644 --- a/DXUT/Optional/DXUTLockFreePipe.h +++ b/DXUT/Optional/DXUTLockFreePipe.h @@ -21,9 +21,10 @@ #include #pragma pack (pop) -extern "C" - void _ReadWriteBarrier(); +#ifdef _MSC_VER +extern "C" void _ReadWriteBarrier(); #pragma intrinsic(_ReadWriteBarrier) +#endif // Prevent the compiler from rearranging loads // and stores, sufficiently for read-acquire diff --git a/DXUT/README.md b/DXUT/README.md index 6ee39ea9..0210ba40 100644 --- a/DXUT/README.md +++ b/DXUT/README.md @@ -6,7 +6,7 @@ http://go.microsoft.com/fwlink/?LinkId=320437 Copyright (c) Microsoft Corporation. -**October 24, 2022** +**December 10, 2022** DXUT is a "GLUT"-like framework for Direct3D 11.x Win32 desktop applications; primarily samples, demos, and prototypes. @@ -41,6 +41,8 @@ For the latest version of DXUT for Direct3D 11, please visit the project site on * Starting with the July 2022 release, the ``bool forceSRGB`` parameter for DDSTextureLoader ``Ex`` functions is now a ``DDS_LOADER_FLAGS`` typed enum bitmask flag parameter. This may have a *breaking change* impact to client code. Replace ``true`` with ``DDS_LOADER_FORCE_SRGB`` and ``false`` with ``DDS_LOADER_DEFAULT``. +* There are known codegen issues when mixing the library built with Visual C++ and the sample built with recent builds of clang/LLVM for Windows. Building both the library and the sample using the same complier avoids the issue. + ## Support For questions, consider using [Stack Overflow](https://stackoverflow.com/questions/tagged/dxut) with the *dxut* tag. diff --git a/Effects11/README.md b/Effects11/README.md index 84e36219..4aa94ee6 100644 --- a/Effects11/README.md +++ b/Effects11/README.md @@ -6,7 +6,7 @@ http://go.microsoft.com/fwlink/?LinkId=271568 Copyright (c) Microsoft Corporation. All rights reserved. -**August 17, 2022** +**December 10, 2022** Effects for Direct3D 11 (FX11) is a management runtime for authoring HLSL shaders, render state, and runtime variables together. @@ -38,6 +38,10 @@ Documentation is available on the [GitHub wiki](https://github.com/Microsoft/FX1 All content and source code for this package are subject to the terms of the [MIT License](https://github.com/microsoft/FX11/blob/main/LICENSE). +## Release Notes + +* The library can be built with Visual C++ or with clang/LLVM for Windows. The code is not conformant enough to support the GNUC (MinGW) compiler. + ## Support For questions, consider using [Stack Overflow](https://stackoverflow.com/questions/tagged/d3dx) with the *d3dx* tag. diff --git a/Effects11/inc/d3dx11effect.h b/Effects11/inc/d3dx11effect.h index 04a17da1..6207b819 100644 --- a/Effects11/inc/d3dx11effect.h +++ b/Effects11/inc/d3dx11effect.h @@ -11,7 +11,7 @@ #pragma once -#define D3DX11_EFFECTS_VERSION 1128 +#define D3DX11_EFFECTS_VERSION 1129 #if defined(_XBOX_ONE) && defined(_TITLE) #include