Fixed Remotery integration.

This commit is contained in:
Branimir Karadžić 2015-11-16 11:02:41 -08:00
parent 7652659dcc
commit f64c050460
3 changed files with 17 additions and 4 deletions

View File

@ -2901,6 +2901,8 @@ static void MessageQueue_CommitMessage(MessageQueue* queue, Message* message, Me
// Setting the message ID signals to the consumer that the message is ready
assert(message->id == MsgID_NotReady);
message->id = id;
RMT_UNREFERENCED_PARAMETER(queue);
}
@ -5122,7 +5124,7 @@ RMT_API void _rmt_UnbindD3D11(void)
d3d11->context = NULL;
// Flush the main queue of allocated D3D timestamps
while (1)
for (;;)
{
Msg_SampleTree* sample_tree;
Sample* sample;
@ -5249,7 +5251,7 @@ static void UpdateD3D11Frame(void)
rmt_BeginCPUSample(rmt_UpdateD3D11Frame);
// Process all messages in the D3D queue
while (1)
for (;;)
{
Msg_SampleTree* sample_tree;
Sample* sample;

View File

@ -3,13 +3,20 @@
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include <bx/bx.h>
#if BX_PLATFORM_WINDOWS
// BK - Remotery needs WinSock, but on VS2015/Win10 build
// fails if WinSock2 is included after Windows.h?!
# include <WinSock2.h>
#endif // BX_PLATFORM_WINDOWS
#include "bgfx_p.h"
#if BGFX_CONFIG_PROFILER_REMOTERY
#if BGFX_CONFIG_PROFILER_REMOTERY_BUILD_LIB
# define RMT_USE_D3D11 BGFX_CONFIG_RENDERER_DIRECT3D11
# define RMT_USE_OPENGL 0
# include <remotery/lib/Remotery.c>
#endif
#endif // BGFX_CONFIG_PROFILER_REMOTERY_BUILD_LIB
namespace bgfx
{

View File

@ -308,4 +308,8 @@
# define BGFX_CONFIG_PROFILER_REMOTERY 0
#endif // BGFX_CONFIG_PROFILER_REMOTERY
#ifndef BGFX_CONFIG_PROFILER_REMOTERY_BUILD_LIB
# define BGFX_CONFIG_PROFILER_REMOTERY_BUILD_LIB BGFX_CONFIG_PROFILER_REMOTERY
#endif // BGFX_CONFIG_PROFILER_REMOTERY_BUILD_LIB
#endif // BGFX_CONFIG_H_HEADER_GUARD