mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Fixed PIX colors.
This commit is contained in:
committed by
Branimir Karadžić
parent
67b4d14376
commit
23653f2918
@@ -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; \
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user