diff options
author | Tim Rowley <[email protected]> | 2016-10-11 12:42:35 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-10-13 23:39:13 -0500 |
commit | bf1f46216cbe9e293e51a44187ee53a5b883c848 (patch) | |
tree | ba531adbdaa9f88f424c9cc488dd928ea2dc8cba /src/gallium/drivers/swr/rasterizer/scripts | |
parent | 827e038062bb7247a7b59b8f97d07b4c1b7be276 (diff) |
swr: [rasterizer archrast] fix event file issue with saving data
Also, tagging stats with draw id to correlate these events with
draw/dispatch events.
Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/scripts')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/scripts/templates/ar_event_h.template | 18 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template | 2 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_event_h.template b/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_event_h.template index c1576f7b317..e5c94c7a8d6 100644 --- a/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_event_h.template +++ b/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_event_h.template @@ -56,9 +56,10 @@ namespace ArchRast % for name in protos['event_names']: ////////////////////////////////////////////////////////////////////////// - /// ${name} + /// ${name}Data ////////////////////////////////////////////////////////////////////////// - struct ${name} : Event +#pragma pack(push, 1) + struct ${name}Data {<% field_names = protos['events'][name]['field_names'] field_types = protos['events'][name]['field_types'] %> @@ -66,6 +67,17 @@ namespace ArchRast % for i in range(len(field_names)): ${field_types[i]} ${field_names[i]}; % endfor + }; +#pragma pack(pop) + + ////////////////////////////////////////////////////////////////////////// + /// ${name} + ////////////////////////////////////////////////////////////////////////// + struct ${name} : Event + {<% + field_names = protos['events'][name]['field_names'] + field_types = protos['events'][name]['field_types'] %> + ${name}Data data; // Constructor ${name}( @@ -79,7 +91,7 @@ namespace ArchRast % endfor { % for i in range(len(field_names)): - this->${field_names[i]} = ${field_names[i]}; + data.${field_names[i]} = ${field_names[i]}; % endfor } diff --git a/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template b/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template index 2e3b5c32464..1924b15ca32 100644 --- a/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template +++ b/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template @@ -83,7 +83,7 @@ namespace ArchRast % for name in protos['event_names']: virtual void handle(${name}& event) { - write(${protos['events'][name]['event_id']}, (char*)&event, sizeof(event)); + write(${protos['events'][name]['event_id']}, (char*)&event.data, sizeof(event.data)); } % endfor |