Commit Graph

136 Commits

Author SHA1 Message Date
baldurk fcb74d2f7c Don't try to display vertex buffer if we should be using generics 2018-09-25 18:20:27 +01:00
baldurk 5406227152 Call CreateWindowingData on the main UI thread
* This allows mac to patch-up the widget to be renderable, and has to happen on
  the UI thread.
2018-08-31 22:14:12 +01:00
baldurk 5024f80ee9 Make code more robust if indexed draw has unbound ibuffer. Closes #1085 2018-08-28 18:23:57 +01:00
baldurk d79ead308f Make a little more room in VTX/IDX columns in buffer viewer 2018-08-03 14:47:15 +01:00
baldurk 53364adeef Support mesh output from different view indices on vulkan
* When using VK_KHR_multiview you can select which view to view the mesh data from.
2018-06-19 20:48:30 +01:00
baldurk 45c3c27923 Rename DrawFlags::UseIBuffer to DrawFlags::Indexed 2018-06-15 19:40:54 +01:00
baldurk 4de23d8d8b Fetch enough data even for odd vertex attribute offsets. Closes #1007 2018-06-05 21:08:06 +01:00
baldurk fe8cbfcc8c Handle different actual indices vs. displayed indices exporting VS Out
*  For VS Out data the actual offsets may be different than displayed, so we
  calculate manually rather than querying the model for each index.
2018-06-04 20:12:27 +01:00
baldurk 082ab4d75d GUIInvoke takes a QObject* to avoid callbacks after object lifetime
* The GUIInvoke object takes a QObject, and uses QPointer to check that
  it hasn't been deleted when the callback fires. This prevents delayed
  callbacks from executing after the object has been deleted and
  crashing.
* In most cases the pointer is just 'this'.
2018-05-08 11:54:34 +01:00
baldurk 2974ca8d12 Delete replay outputs on replay thread, not on UI thread
* On OpenGL this can cause problems with not being able to make the
  output context current because it's already current on the replay
  thread.
2018-04-05 12:34:22 +01:00
Baldur Karlsson f8a0aeef1f Skip vertex buffers with invalid byte stride 2018-03-13 13:04:36 +00:00
Baldur Karlsson 98041c5b93 Try to protect against invalid draw counts without crashing
* This can be especially error-prone with indirect draws where the
  parameters are GPU-fed and may point to random memory.
2018-03-12 15:46:45 +00:00
Baldur Karlsson 669589b3f8 Preserve mesh tables horiz scroll when picking vertices or syncing views 2018-03-12 15:46:45 +00:00
Baldur Karlsson 1a268ace8b Add async tags for display widget painting
* This prevents widget painting from getting out of control and queuing
  up many redundant paints which slows down processing of the command
  queue.
* Also remove a spammy command to disable pixel context that only ever
  got called when pixel context was already disabled (right after a
  reset - at all other times it stays active).
2018-03-12 15:46:44 +00:00
ashleysmithgpu ecccb6973a Buffer viewer now updates contents when EID changes 2018-02-27 15:25:46 +00:00
baldurk 4a2242f0a1 Make checkerboard colours update immediately when theme changes 2018-02-21 14:29:36 +00:00
baldurk 57712ea691 Fix mesh output 'sync views' - need to walk parent stack to tableview 2018-02-12 20:47:59 +00:00
baldurk 96c487c8c0 Use absolute dimensions of viewport to calculate aspect ratio. Refs #856
* On vulkan the viewport height could be negative to flip the NDC, but
  we don't care about its sign only its magnitude to calculate the
  aspect ratio.
2018-02-02 17:29:12 +00:00
baldurk d6b6fcf2c1 Only export NULLs if something actually went wrong! 2018-02-02 16:09:24 +00:00
baldurk 8f405a2197 Render mesh data with instanced properties correctly. 2018-01-24 16:14:22 +00:00
baldurk f0c6323685 Don't update buffer viewer display if we just mousemove without clicking 2018-01-24 12:38:28 +00:00
baldurk 65ef82466c Re-organise Analytics structures a bit to be more processing friendly 2018-01-19 13:57:02 +00:00
baldurk 5e819a6e23 Ensure mesh columns list is cleared before reconfiguring 2018-01-16 20:12:06 +00:00
baldurk aba8dacd25 Use baseVertex value from PostVS data 2018-01-16 20:12:04 +00:00
baldurk 01ee0e32ba Update preview settings after fetching PostVS data 2018-01-11 13:48:32 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 6572cd97f5 Tidy up handling of windowing data, make it a bit more type safe 2018-01-01 17:31:19 +00:00
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 a6ebf09785 Add analytics system - disabled for now
* This is a *very* light-touch analytics system that will track the
  simplest and most anonymous statistics that can be useful in
  determining which features are most used or perhaps underused, and
  where it's best to direct development attention.
* It is entirely implemented in the UI layer, no analytics-gathering
  code exists in the library that's injected into programs, and of
  course no capture data (screenshots, resource contents, shaders, etc
  etc) is transmitted.
* Once it's turned on, it will apply to both development and release
  builds. It tracks stats over a month, and then at the beginning of a
  new month it sends the previous data.
* When the user first starts up a build with analytics if there's no
  previous analytics database then they are informed of the new code and
  asked to approve it. They have the option of selecting to manually
  verify any sent reports, or just opt-ing out entirely.
2017-11-29 19:01:22 +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 602511bf33 Reduce parameters that need to be passed for viewing shaders 2017-11-22 19:11:27 +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 203f6b5255 Silence some warnings about casting from one enum type to another
* Reported by Coverity Scan - I don't think any of these were actually
  a problem since the enum definitions all matched.
2017-11-22 19:11:19 +00:00
baldurk 4c67de2995 Fix copy-paste errors reported by Coverity Scan 2017-11-22 11:50:37 +00:00
Cory Bloor 58b628ee8b Fix unused variables
In almost all cases these can be removed. The only exception is in
ShaderViewer.cpp, where regIdx should have been used.
2017-11-18 00:17:06 +01: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 7c8628b237 Centralise resource naming with capture context to allow customisation
* We remove the now unneeded name fields in buffer/texture descriptions
  and some of the pipeline state structs.
* A single function will give the human-readable name for a resource id.
  This will look up a custom set of renames, on top of the names from
  the resource descriptions.
2017-11-17 16:30:53 +00:00
baldurk 8133188a4c Make mesh viewer more robust if no ibuffer is bound on indexed draw 2017-11-10 18:36:05 +00:00
baldurk 988121ee65 Display generic mesh input attrs, and add ---s for out of bounds access 2017-11-10 18:36:04 +00:00
baldurk cac4c7f100 Locate RDTableView even if it's a parent in slot functions
* These slots are called on the item selection view, so the RDTableView
  is actually the sender's parent.
2017-11-10 13:17:11 +00:00
baldurk 954a11de89 Implement shutting down individual replay outputs
* This means e.g. that if the mesh output view gets closed, we don't
  keep it around internally and keep calling InitPostVSBuffers for it.
2017-11-10 12:22:13 +00:00
baldurk 241b8f4404 Clarify the draw range options (this inst vs. all inst vs. whole pass) 2017-11-10 12:10:02 +00:00
baldurk 2c2270051c Hide/disable options when they're not available. Refs #788
* Hopefully these can be restored at some point, when the features are
  implemented. For now where possible we remove options that are just
  unavailable always, and selectively disable others when they may or
  may not be available based on what API the capture uses.
2017-11-06 12:45:40 +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 5e59616a8c Update rdctype::array to have a more stl-like mutable interface
* For the most part the interface is stl-compatible, but we have a few
  little changes of our own for convenience.
* This class is still needed after deleting the C# UI, because we don't
  want to pass C++ stl structs over module boundaries and possibly run
  into hard to diagnose incompatibilities.
2017-11-03 16:01:58 +00:00
baldurk 1e41875479 Clamp currentIndex from Qt which can come back as -1 in some cases
* If this gets propagated far enough and used as an index it can cause
  crashes, so we clamp to 0 when we know the value should be
  non-negative.
2017-10-24 12:56:31 +01:00
baldurk b83daddbad Bounds-check access to vertex buffers, in case not enough are bound. 2017-10-23 15:52:45 +01:00