Commit Graph

66 Commits

Author SHA1 Message Date
baldurk a6f0d07e09 Remove most stylesheet use as this messes with a custom style
* Use palettes where a certain colour is needed.
* Still need some solution for table borders in grid layouts
2017-07-28 19:06:44 +01:00
baldurk 58d40fdc26 Don't show 0.0 as the default drawcall duration 2017-07-28 19:06:39 +01:00
baldurk 8a0432add9 Fix crashes if drawcall list goes away when log is closed 2017-07-25 09:23:04 +01:00
baldurk 41092e869f Allow clicking 'next draw' from the frame start marker at EID 0 2017-07-17 12:36:04 +01:00
baldurk 1676f2698e Disable previous/next buttons when there's no previous/next drawcall 2017-07-17 11:30:31 +01:00
baldurk df9f72b857 Add option to ignore icon size when sizing rows in a RDTreeView 2017-07-13 13:57:33 +01:00
baldurk d44528794a Change qrenderdoc icons to Farm-Fresh, to add high-DPI versions. 2017-06-19 16:17:20 +01:00
baldurk 7fe267d548 Only add log viewer at the end of constructors, so the window is ready
* Otherwise if OnLogFileLoaded gets called while adding the log viewer
  the window might be partially constructed and crash.
2017-06-09 12:08:39 +01:00
baldurk 199c26adbf Put the MainWindow in charge of handling 'global' type shortcuts
* QShortcut falls down on duplicates. It can have activatedAmbiguously
  events, but these happen in arbitrary order and the shortcuts on
  menu items just swallow the ambiguous activate so it's not useful.
* Instead we just let MainWindow pick up ShortcutOverride events and
  consult a mapping of which shortcuts to use. We can use a smarter
  selection method to choose the more 'local' shortcut if two shortcuts
  that conflict exist.
2017-06-08 18:23:10 +01:00
baldurk a4fe376c32 Add column selection popup for event browser and persist column state
* We can add in the Draw # column now, and set up the default state to
  not include the duration column.
2017-06-03 00:53:54 +01:00
baldurk 63bf0310d3 Fix summing of durations in event browser 2017-06-03 00:46:11 +01:00
baldurk 3b6f63be0d Make event browser columns properly resizable and re-orderable
* Annoyingly although Qt has an internal bool allowUserMoveOfSection0
  which does exactly what we want allowing the tree column to be
  movable, we can't enable it because it's private. So instead we have
  to re-implement section moving ourselves.
* Minor tweak - also made RDTreeWidgets non-movable by default since
  usually we don't want to allow it.
2017-06-03 00:38:02 +01:00
baldurk 10aa73528d Reset event browser before it's added
* When we add it, if a log is already open that's when we get the
  callback to OnLogFileOpened to initialised. If we close afterwards,
  we'll be in an inconsistent state.
2017-06-01 18:50:14 +01:00
baldurk b311e65dbd Change margins to be a minimum instead of adding them
* The style itself may have added some margins and we don't want to add
  extra margins, just set a minimum.
2017-06-01 18:47:42 +01:00
baldurk 3076b4337b Move size delegate into item margins implemented by RDTreeView 2017-06-01 14:17:00 +01:00
baldurk 870f0cc166 Filename filters should be translated 2017-05-15 10:11:55 +01:00
baldurk bbff0fce1c Implement row colouring and tree colouring in event browser.
* Also do custom painting of branches to do proper full-row colouring
  instead of leaving an ugly gap around the tree controls.
2017-05-04 20:36:46 +01:00
baldurk ab432f24fc Implement the UI option for preferring monospaced font 2017-05-04 20:36:46 +01:00
baldurk 0ecc6ca877 Enable QT_NO_CAST_FROM_ASCII & QT_NO_CAST_TO_ASCII
* Added a couple of utility macros to help with the conversion. lit() is
  paired with tr() for untranslated text.
* QFormatStr is more explicitly for non-textual formatting strings.
* Both are just #define'd to QStringLiteral()
2017-05-02 22:58:12 +01:00
baldurk 4199a857f5 Add right-click context menu to event browser with expand/collapse all 2017-04-27 19:47:50 +01:00
baldurk c2690b8211 Remove some cases where resources were being loaded and parsed @ runtime 2017-04-27 19:47:49 +01:00
baldurk 605fd4dcc5 Use single QVariant tagging on RDTreeWidgetItem instead of setData
* It saves on allocating a vector of vectors and in most cases is all we
  need.
2017-04-21 18:45:12 +01:00
baldurk f65f5ea9da Use new RDTreeWidget everywhere in favour of QTreeWidget
* Since we're promoting everything, we reset the behaviour of
  RDTreeWidget so that it's not doing anything different by default.
* RDTreeWidget's interface is a bit different, exposing some useful
  things like a single selected item and so on.
* We also can't set columns in the Qt Creator UI anymore, so we set them
  from code.
2017-04-21 18:44:52 +01:00
baldurk 143d35ff31 Add export-to-text function for event browser 2017-04-20 13:04:28 +01:00
baldurk f88c4c4ba0 Disable event browser toolbar buttons while no log is open 2017-04-20 12:54:49 +01:00
baldurk 8ad0ea60e0 Use the configured time unit used for the event browser duration column 2017-04-20 12:46:30 +01:00
baldurk 494086f40d Rename RenderManager to ReplayManager 2017-04-18 14:57:48 +01:00
baldurk 6930841705 Rename ReplayRenderer to ReplayController
* It's not a renderer, it's an interface to controlling the replay and
  any 'renderer' type work actually happens in ReplayOutput.
2017-04-18 14:57:47 +01:00
baldurk f6c045f473 Refactor public interface to be less strict C and more python friendly
* Generally this means removing ref out parameters and instead returning
  values. In a couple of cases we will want to avoid copies in future
  either by returning const references (e.g. to the pipeline state which
  is immutable).
* At the same time, some pointless bool return values that were always
  true and didn't indicate errors have been removed. They can be added
  again if an error condition comes back.
* Some free functions still have out parameters as C linkage doesn't
  allow returning user types by value.
* The C# UI still invokes into C wrappers for all the C++ classes, which
  handle taking the return value and doing a copy into an out parameter
  still for compatibility.
2017-04-18 14:57:46 +01:00
baldurk 094c4164dc Refactor qrenderdoc to provide stable, clean and deliberate API
* Note, this API is still in-flux and beta, so there may still be some
  more changes before it's 'stable', and even then it will still be
  subject to some amount of change.
* This API is then exposed to python via SWIG bindings and hides
  internals that don't need to be visible, and means the actual API is
  easier to work with.
* We also use this API to reduce inter-dependencies between different
  windows that need to interact with each other at a high level.
* The naming is python/standard RenderDoc TitleCase method names, not
  Qt style camelCase methods.

# Conflicts:
#	qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp
#	qrenderdoc/Windows/TextureViewer.cpp
2017-04-18 14:57:43 +01:00
baldurk 0ad5709df3 Remove poorly chosen 'Fetch' prefix from a few data structures.
* This goes all the way back to the first iterations where these were
  the only structures and 'Fetch' referred to them returning data from
  the core code to the UI.
2017-04-18 14:57:36 +01:00
baldurk d40fc8471d Change API enums to enum class, remove now redundant prefixing
* This gives a little nicer syntax, a bit better type safety, and also
  reflects better for SWIG bindings. Overall it's a minor change but
  better.
* We don't update the C# UI at all, since it's soon to be removed and
  not worth the effort/code churn.
* For now so we're ABI compatible with C#, all enums are uint32_t, but
  that is an obvious optimisation in future to reduce struct packing.
* We avoid 'None' as an enum value, because it's a reserved word in
  python so will cause problems generating bindings.
2017-04-18 14:57:33 +01:00
baldurk 206d9e0b34 Don't clear selection for eventbrowser when losing focus 2017-02-14 19:14:53 +00:00
baldurk ea7cee9d13 Make the find behaviour in event browser to be a bit more 'sticky'
* Clicking away from the find box doesn't lose your highlight/search,
  and if you open find again it has the previous search text there.
2017-02-13 19:20:23 +00:00
baldurk fa33d883ac Don't make a blocking call to the UI from render thread 2017-02-13 19:20:21 +00:00
baldurk 99fc18e162 Add "min-max" naming in EID column for marker regions 2017-02-13 19:20:21 +00:00
baldurk 1100f36d77 Add toolbar buttons for previous/next drawcall step 2017-02-13 19:20:20 +00:00
baldurk 0c79d778e9 Add shortcuts for functionality in event browser 2017-02-13 19:20:13 +00:00
baldurk 55e5bcca61 Implement bookmark handling in the event browser 2017-02-13 14:29:13 +00:00
baldurk 2285b209c3 Access CaptureContext & RenderManager by reference, not pointer
* Neither of these can or should be NULL so enforce it explicitly.
2017-02-09 19:28:24 +00:00
baldurk 9e47ed53b5 Move resources.qrc into Resources/ folder 2017-02-09 19:28:22 +00:00
baldurk 477df04072 Make sure we're on a consistent event before calling OnLogFileLoaded
* Certain panels like BufferViewer assume there is a current drawcall
  at startup and not an invalid event ID like 0. Normally the event
  browser is loaded first and sets the event ID, but if it's later in
  the list this will break.
2017-02-01 11:17:56 +00:00
Alex Smith 6e2fc42cbd qrenderdoc: Show currently selected event in the API inspector
Currently, selecting an event with children (e.g. vkCmdExecuteCommands)
in the event browser will cause the API inspector window to show the
final child event, rather than the event itself. This behaviour makes
sense everywhere else: selecting an event with children shows the state
after all children have completed.

However, for the API inspector, we want to be able see API calls for
the parent event when it is selected rather than those of its last
child, particularly in the case of vkCmdExecuteCommands which may have
other API calls leading up to it.

To allow this, distinguish between the "current event" and "selected
event". For an event with children, the former refers to the last
child, while the latter refers to the event itself. ILogViewerForm now
has two separate event callbacks for when either one changes.

The API inspector now makes use of the selected event, while everything
else continues to use the current event.
2017-01-14 20:23:51 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 86c9742309 Let capture context manage singleton window panes 2016-11-14 15:20:51 +01:00
baldurk bb2f3a205c Move common Qt utility functions & JSON I/O together in a single place 2016-11-09 13:23:53 +01:00
baldurk b96d49190c Avoid naming manually connected slots on_x_y() 2016-10-07 15:58:45 +02:00
baldurk ccfa1ceaed Add some utility functions to rdctype::array/str
* Avoids the need to directly reference .elems to cast to const char*
  for strings, and has begin()/end() for C++11 foreach loops
2016-10-07 15:58:44 +02:00
baldurk 0b6b6b3e86 Add MIT License comment to the head of all source files 2016-10-04 19:54:31 +02:00
baldurk e91634004f Rename Core to CaptureContext 2016-10-04 19:54:31 +02:00