Fixed PIX colors.

This commit is contained in:
Бранимир Караџић
2025-12-26 21:15:40 -08:00
committed by Branimir Karadžić
parent 67b4d14376
commit 23653f2918
2 changed files with 8 additions and 2 deletions

View File

@@ -64,6 +64,12 @@ namespace bgfx
typedef ::IGraphicsUnknown IUnknown;
#endif // BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT
inline constexpr uint32_t toPixColor(uint32_t _abgr)
{
// ABGR -> BGRA
return (_abgr >> 8) | (_abgr << 24);
}
#define _DX_CHECK(_call) \
BX_MACRO_BLOCK_BEGIN \
HRESULT __hr__ = _call; \

View File

@@ -44,8 +44,8 @@ extern "C" uint64_t WINAPI bgfx_PIXEventsReplaceBlock(PIXEven
# include <pix3.h>
# define _PIX3_BEGINEVENT(_commandList, _color, _name) PIXBeginEvent(_commandList, _color, _name)
# define _PIX3_SETMARKER(_commandList, _color, _name) PIXSetMarker(_commandList, _color, _name)
# define _PIX3_BEGINEVENT(_commandList, _color, _name) PIXBeginEvent(_commandList, toPixColor(_color), _name)
# define _PIX3_SETMARKER(_commandList, _color, _name) PIXSetMarker(_commandList, toPixColor(_color), _name)
# define _PIX3_ENDEVENT(_commandList) PIXEndEvent(_commandList)
# define PIX3_BEGINEVENT(_commandList, _color, _name) _PIX3_BEGINEVENT(_commandList, _color, _name)