diff options
author | Tim Rowley <[email protected]> | 2016-10-10 11:41:33 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-10-11 11:48:23 -0500 |
commit | 3805e40f32e252767daa97a08cb931784aa3da4e (patch) | |
tree | 8c51c2e628ecac744937074eb4b64825d771c5d2 /src/gallium/drivers/swr/rasterizer/archrast | |
parent | f4684cdb5fe215a7c7b413e50ff231be85d9b207 (diff) |
swr: [rasterizer archrast] add support for stats files
Only stat and counter events are saved to the event files.
Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/archrast')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp index b1c5134caf1..c29bb884588 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp +++ b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp @@ -34,6 +34,19 @@ namespace ArchRast { + ////////////////////////////////////////////////////////////////////////// + /// @brief Event handler that saves stat events to event files. This + /// handler filters out unwanted events. + class EventHandlerStatsFile : public EventHandlerFile + { + public: + EventHandlerStatsFile(uint32_t id) : EventHandlerFile(id) {} + + // These are events that we're not interested in saving in stats event files. + virtual void handle(Start& event) {} + virtual void handle(End& event) {} + }; + static EventManager* FromHandle(HANDLE hThreadContext) { return reinterpret_cast<EventManager*>(hThreadContext); @@ -47,7 +60,7 @@ namespace ArchRast uint32_t id = counter.fetch_add(1); EventManager* pManager = new EventManager(); - EventHandler* pHandler = new EventHandlerFile(id); + EventHandler* pHandler = new EventHandlerStatsFile(id); if (pManager && pHandler) { |