Commit Graph

55 Commits

Author SHA1 Message Date
baldurk ebaefc82a9 Normalise and make python/public interface more consistent
* We enforce a naming scheme more strongly - types, member functions,
  and enum values must be UpperCaseCamel, and member variables must be
  lowerCaseCamel. No underscores allowed.
* eventId not eventID or EID, and Id preferred to ID in general. Also
  for resourceId.
* Removed some lingering hungarian m_Foo naming.
* Some pipeline state structs that are almost identical between the
  different APIs are pulled out into common structs. Where something
  doesn't make sense (e.g. viewport enable for vulkan) it will just be
  set to a sensible default (in that case always true).
* Changed scissors to be x/y & width/height instead of sometimes
  left/top/right/bottom
* Abbreviations are discouraged, e.g. operation not op, function not
  func.
2017-12-22 13:02:36 +00:00
baldurk 0b527fab49 Use rdc types instead of Qt containers in public QRenderDoc interface
* This is to support python bindings - the pyside implementation of
  QVector, QString, etc is not available to SWIG, so SWIG treates these
  all as opaque types.
* Rather than trying to set up bindings that work for rdcarray and
  QList/QVector, or implementing separate bindings, we instead just say
  that the public interface must use the rdc types. In most cases they
  seamlessly convert to/from Qt types anyway.
* In a couple of places we use an array of pairs instead of a map. In
  future we probably want an rdcdict or rdcmap with proper dict bindings
  in python.
2017-12-13 22:43:01 +00:00
baldurk 286e117d56 Add headers needed for compilation without PCH
* Removing includes of Code/CaptureContext.h removed some dependencies.
2017-11-23 00:20:01 +00:00
baldurk e75a468d3c Remove direct include of Code/CaptureContext.h in almost all files
* This is a leftover from before the interface was hoisted out, and most
  windows were still calling directly to CaptureContext instead of via
  the public ICaptureContext interface
2017-11-22 19:11:20 +00:00
baldurk c860d8baa3 Fix uninitialized variable warnings from static analysis
* Reported by Coverity Scan
2017-11-22 11:31:07 +00:00
baldurk 33ff48811b Normalise terminology in UI code - don't call captures 'logs'
* Log is an overloaded term since it can also mean the debug log. We now
  consistently refer to capture files as capture files or just captures
  for short. The log is just for log messages and diagnostics.
* The user-facing UI was mostly already consistent, but many of the
  public interfaces exposed to python needed to be renamed, and it made
  more sense just to make everything consistent.
2017-11-17 16:30:57 +00:00
baldurk 25de6726f6 Add some cross-linking for panels that view a single resource
* We add a button with a link icon to indicate that it goes to the
  resource details. We'll re-use the crosshair as a visual metaphor for
  any interactive widget that goes to the resource inspector.
* To remove any possible confusion, we change the icon for the texture
  list and locked tabs in the texture viewer to not include the link.
2017-11-17 16:30:54 +00:00
baldurk 2ac0802b10 When a custom name is changed, refresh the UI to propagate it properly 2017-11-17 16:30:54 +00:00
baldurk e6c5c03896 Remove rdctype namespace. Rename rdctype::str -> rdcstr, rdcarray, etc
* Since these types are more prevalent than originally designed, it
  makes more sense to remove the namespace for ease of typing/naming.
* Also add a specialised type 'bytebuf' for an array of bytes.
* This makes mapping easier to SWIG since there's no special casing for
  namespaced arrays. Especially so for nested cases like
  rdctype::array<rdctype::str> -> rdcarray<rdcstr>
2017-11-03 16:04:59 +00:00
baldurk 00e06d8ff1 Make display rendering colours theme-aware.
* In particular this removes hard-coded checkerboard colours that don't
  look right on dark themes.
2017-08-28 18:50:17 +01:00
baldurk 8adde662fd Save target of clear calls that don't clear currently bound targets
* This prevents the UI from showing confusing results when the currently
  bound state doesn't match what's being cleared.
2017-07-17 11:33:50 +01:00
baldurk ac885b1882 Fix handling for a couple of cases where we need device pixel co-ords
* When interacting with the C++ UI we have to use device pixels, so
  multiply/divide by the device pixel ratio.
2017-06-19 16:17:20 +01:00
baldurk 3bd6adddc8 Implement right-click-to-toggle on channels buttons 2017-05-10 17:20:40 +01:00
baldurk ceb73b85d9 Rename ILogViewerForm to ILogViewer 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 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 fbae19f622 Add custom shader handling to texture viewer 2017-02-14 19:14:52 +00:00
baldurk 8630f82db3 Update shader viewer to support editing and debugging of shaders 2017-02-10 21:48:50 +00:00
baldurk 354a2707ae Avoid copying large structs, prefer to pass by reference 2017-02-10 21:48:46 +00:00
baldurk 4d8e799a0e Add pixel history window 2017-02-09 23:21:45 +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
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 bb2f3a205c Move common Qt utility functions & JSON I/O together in a single place 2016-11-09 13:23:53 +01:00
baldurk c5973d1ed6 Add centralised reset function for restoring to clean state 2016-10-12 16:54:14 +02:00
baldurk 791599b48c Cache texture lookup and only update whenever it changes 2016-10-12 13:24:14 +02:00
baldurk f0c359b329 Remove include guards and change to #pragma once 2016-10-11 21:38:16 +02:00
baldurk db5bdbb05e Add range histogram 2016-10-11 18:33:37 +02:00
baldurk 2507634df9 Add filterable texture list to texture viewer 2016-10-10 18:48:38 +02:00
baldurk a1e9554e66 Implement the ctrl-g texture goto popup 2016-10-10 16:41:48 +02:00
baldurk 3a772f26ce Implement locked texture tabs and partially complete event usage popup 2016-10-10 13:52:00 +02:00
baldurk 3ec1be62ff Paint custom render widgets properly without output, recreate as needed 2016-10-07 19:51:05 +02:00
baldurk 63b92f76c8 Pass IReplayRenderer to INVOKE_MEMFN calls 2016-10-07 19:51:03 +02:00
baldurk e32e26eb83 Save texture viewer dock layout & background colour in persist data 2016-10-07 15:58:50 +02:00
baldurk b96d49190c Avoid naming manually connected slots on_x_y() 2016-10-07 15:58:45 +02:00
baldurk 2be29d9229 Move Following struct declaration to header, add per-texture settings 2016-10-05 20:20:19 +02:00
baldurk da992e9c3e Add following and populating thumbnails
* This is buggy - the UI seems to hang at random until you switch away
  and back, some event I guess is stalling the queue somehow but it's
  still pumping events.
2016-10-04 19:54:35 +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
baldurk c8015b9e99 Populate mip/slice dropdowns and allow selecting which is visible 2016-10-04 19:54:23 +02:00
baldurk 97130b25d8 Add selection of background colour (or checkerboard pattern) 2016-10-04 19:54:22 +02:00
baldurk 59c5267e24 Set up remaining widgets etc in texture viewer 2016-10-04 14:40:07 +02:00
baldurk eaed889e62 Implement zooming and scaling 2016-09-30 18:18:07 +02:00
baldurk 827815d34e Implement scrolling the texture 2016-09-30 16:20:24 +02:00
baldurk 96fce23e69 Update the texture details part of the status bar 2016-09-30 14:24:12 +02:00
baldurk b8910141eb Set up the texture viewer status bar text 2016-09-30 10:50:29 +02:00
baldurk 5f28b745a2 Format code according to newly added clang-format
_  /)
                 mo / )
                 |/)\)
                  /\_
                  \__|=
                 (    )
                 __)(__
           _____/      \\_____
          |  _     ___   _   ||
          | | \     |   | \  ||
          | |  |    |   |  | ||
          | |_/     |   |_/  ||
          | | \     |   |    ||
          | |  \    |   |    ||
          | |   \. _|_. | .  ||
          |                  ||
          |repository history||
          |                  ||
  *       | *   **    * **   |**      **
   \))ejm97/.,(//,,..,,\||(,,.,\\,.((//
2016-05-22 19:41:53 +02:00
baldurk 70b99a4412 Remove antiquated 'multiple frames in one capture' support.
* Cleans up the code a bunch, this support is unlikely to ever return
  and if it does it will need a rethink anyway.
2016-04-13 00:28:09 +02:00