Commit Graph

19 Commits

Author SHA1 Message Date
Bartosz Taudul
3b03e849f0 Harden client code against unaligned memory access.
There shouldn't be any changes in generated code on modern
architectures, as the memcpy will be reduced to a store/load operation
identical to the one generated with plain struct member access.

GetTime( cpu ) needs special handling, as the MSVC intrinsic for rdtscp
can't store cpu identifier in a register. Using intermediate variable
would cause store to stack, read from stack, store to the destination
address. Since rdtscp is only available on x86, which handles unaligned
stores without any problems, we can have one place with direct struct
member access.
2018-03-31 14:15:04 +02:00
Bartosz Taudul
71ad3c3b0c Use named colors. 2017-11-25 15:33:10 +01:00
Bartosz Taudul
6008c85999 Move common variables out of the loop. 2017-11-25 13:41:12 +01:00
Bartosz Taudul
a515bf8878 Perform GPU to CPU resynchronization on each collect event. 2017-11-25 13:33:57 +01:00
Bartosz Taudul
0100266234 Use consistent names. 2017-11-25 13:14:16 +01:00
Bartosz Taudul
a71c81bc41 Remove unused GpuCtx stub class. 2017-11-22 15:31:04 +01:00
Bartosz Taudul
4708f819b9 Bump number of query slots to 64K. 2017-11-22 14:01:44 +01:00
Bartosz Taudul
2514cff283 Apple can't into standards compliance.
https://lists.apple.com/archives/mac-opengl/2014/Nov/msg00005.html
2017-11-20 13:44:08 +01:00
Bartosz Taudul
c251690722 Query OpenGL time stamp accuracy. 2017-11-17 14:07:42 +01:00
Bartosz Taudul
c15e692ee4 Context is no longer passed to OpenGL macros. 2017-11-16 15:41:22 +01:00
Bartosz Taudul
2f669aea41 Workaround gcc issues. 2017-11-15 10:56:27 +01:00
Bartosz Taudul
c43eb29ce0 Don't send source location pointer in query reply.
Since reply order is the same as the query order, the server already
knows what source location it receives. This observation allows placing
zone name into the source location struct.
2017-11-14 23:06:45 +01:00
Bartosz Taudul
5c872b2137 Simplify GPU context handling. 2017-11-14 00:48:26 +01:00
Bartosz Taudul
1de7f884ea Document header include requirements. 2017-11-12 01:49:35 +01:00
Bartosz Taudul
dde30b92d9 Stub GPU defines and class when profiler is disabled. 2017-11-12 01:03:14 +01:00
Bartosz Taudul
7ebaa46f75 GPU time transfer. 2017-11-11 22:08:47 +01:00
Bartosz Taudul
5b6cbc5306 Assert against overrun. 2017-11-11 21:19:51 +01:00
Bartosz Taudul
6fcdb924e8 CPU-side GPU event transfer. 2017-11-11 21:09:48 +01:00
Bartosz Taudul
3c00ce0958 GPU context registration. 2017-11-11 19:44:09 +01:00