diff options
author | 2019-11-13 04:08:23 +0100 | |
---|---|---|
committer | 2019-11-12 22:08:23 -0500 | |
commit | 0c70101b74db61f883fdd7907a4975ffff735044 (patch) | |
tree | 067ae1c831088d6853b6f443e5a05a4c5d8cd7aa /3rdparty/bgfx/examples/common/example-glue.cpp | |
parent | c089bea7011de9ca78f43979d902978a113d33e2 (diff) |
Sync bgfx, bx and bimg with upstream; fix the hlsl fs_chroma.sc matrix transposition properly (#5875)
* Sync bgfx with upstream revision 280420d
* Sync bx with upstream revision 267727d
* Sync bimg with upstream revision c1bab10
* Use bgfx helper functions to ensure correct matrix orientation
* Rebuild hlsl chain
Diffstat (limited to '3rdparty/bgfx/examples/common/example-glue.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/example-glue.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/3rdparty/bgfx/examples/common/example-glue.cpp b/3rdparty/bgfx/examples/common/example-glue.cpp index 0c4f84f93c6..ad4507c4f81 100644 --- a/3rdparty/bgfx/examples/common/example-glue.cpp +++ b/3rdparty/bgfx/examples/common/example-glue.cpp @@ -438,8 +438,10 @@ void showExampleDialog(entry::AppI* _app, const char* _errorText) ImGui::Text("%3d %3d %s", pos, viewStats.view, viewStats.name); const float maxWidth = 30.0f*scale; - const float cpuWidth = bx::clamp(float(viewStats.cpuTimeElapsed*toCpuMs)*scale, 1.0f, maxWidth); - const float gpuWidth = bx::clamp(float(viewStats.gpuTimeElapsed*toGpuMs)*scale, 1.0f, maxWidth); + const float cpuTimeElapsed = float((viewStats.cpuTimeEnd - viewStats.cpuTimeBegin) * toCpuMs); + const float gpuTimeElapsed = float((viewStats.gpuTimeEnd - viewStats.gpuTimeBegin) * toGpuMs); + const float cpuWidth = bx::clamp(cpuTimeElapsed*scale, 1.0f, maxWidth); + const float gpuWidth = bx::clamp(gpuTimeElapsed*scale, 1.0f, maxWidth); ImGui::SameLine(64.0f); @@ -448,7 +450,7 @@ void showExampleDialog(entry::AppI* _app, const char* _errorText) ImGui::SetTooltip("View %d \"%s\", CPU: %f [ms]" , pos , viewStats.name - , viewStats.cpuTimeElapsed*toCpuMs + , cpuTimeElapsed ); } @@ -458,7 +460,7 @@ void showExampleDialog(entry::AppI* _app, const char* _errorText) ImGui::SetTooltip("View: %d \"%s\", GPU: %f [ms]" , pos , viewStats.name - , viewStats.gpuTimeElapsed*toGpuMs + , gpuTimeElapsed ); } } |