Commit Graph

106 Commits

Author SHA1 Message Date
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
baldurk 42abaf2b4f Prefer using VK_AMD_shader_info to disassemble when available. 2017-10-23 15:05:29 +01:00
Cory Bloor 2fc8475fdf Replace "All Files (*.*)" with "All Files (*)"
To quote the Qt documentation for QFileDialog::setNameFilters:

> Note that the filter *.* is not portable, because the historical
> assumption that the file extension determines the file type is not
> consistent on every operating system. It is possible to have a file
> with no dot in its name (for example, Makefile). In a native Windows
> file dialog, *.* will match such files, while in other types of file
> dialogs it may not. So it is better to use * if you mean to select
> any file.

Admittedly, one of these usages is Windows-only and we are using the
native file dialog there, but we might as well be consistent.
2017-10-23 14:27:24 +02:00
baldurk 0faf0931c2 Ditch D3D11's anomalous identity bindpoint mapping for proper handling 2017-08-31 18:34:00 +01:00
baldurk 24518e086c Set basevertex to 0 when calculating column data width 2017-08-28 18:50:18 +01: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 e85c8d19bf Combine 'special' with 'specialFormat' as single resource format type
* There was no good reason to have a flag indicating if the special
  format was valid or not. Now it's a single enum, with a value
  'Regular' indicating that the compCount/compWidth/compType fully
  describe the format itself.
* This makes code patterns easier as you no longer need to check for
  special then check for specialFormat, you can just test the type
  directly.
2017-08-24 10:37:16 +01:00
baldurk b55ff14242 Use nested ResourceFormat in MeshFormat struct.
* The old C# interop didn't support this for structs going from the UI
  to the core module.
2017-08-21 18:14:44 +01:00
baldurk 4c24b0f28f Remove use of ToQStr to convert rdctype::str to QString 2017-08-18 14:13:22 +01:00
baldurk 09341a4192 Don't use pixel shader details for debugging vertex shader 2017-08-15 17:36:27 +01:00
baldurk d57cc1b188 Add more consistency to docking panels and widgets
* Dock panels shouldn't have any frame border or anything like that.
* They should have an external margin of 3 pixels at their border,
  but then no further margins on the layouts (like sub-controls for
  the pipeline state views.
* Toolbars should be Raised & Panel frames. Later we'll replace them
  with actual QToolBars to better customise the painting.
2017-07-28 19:06:46 +01:00
baldurk e005522152 Give better default sizing on startup to VTX/IDX columns 2017-07-25 09:22:51 +01:00
baldurk 2f6dffffc5 Expose camera class properly, drop Camera_* entry points from Qt UI 2017-07-17 16:34:12 +01:00
baldurk c211df25be Add custom painting and section handling to RDTableView & RDHeaderView
* This is used primarily for the buffer/mesh viewer to be able to pin
  the index/element column to the left side, group columns together with
  a noticeable separator, and other minor tweaks.
* Unfortunately due to tight private coupling and lack of virtual
  functions in the QTableView and QHeaderView, a few unrelated functions
  have to be re-implemented to point to our own header.
2017-06-23 21:44:21 +01:00
baldurk 5c342332f9 Make mesh component highlighting respect colourscheme lightness 2017-06-23 21:44:21 +01:00
baldurk 391e0966af Add items to matrix type dropdown in buffer viewer configuration 2017-06-21 21:17:35 +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
Peter Gal 4263b55ffa Fix enum flag usages in the qrenderdoc
There are a few places where the logical 'and' operator
was used to check if a given flag is enabled however
that is not the correct operator.

The binary 'and' operator should be used where
the enum acts as a flag.
2017-06-08 08:34:54 -07:00
baldurk 54b9263597 Persist the mesh view's dock layout between sessions 2017-06-03 00:59:57 +01:00
baldurk be4358207a Allow for up to 7 digits of space in vertex/index columns in mesh view 2017-05-31 12:42:04 +01:00
baldurk 2ca83cbea4 Don't accidentally insert bounding box data while trying to look it up 2017-05-31 12:39:58 +01:00
baldurk 58a2560c49 Reset the arcball around the bounding box when resetting the camera 2017-05-31 12:30:03 +01:00
baldurk 973cbd380f Don't show bounding box around rasterized output in mesh viewer 2017-05-31 11:39:00 +01:00
baldurk 158bc4d583 Update code for new toolwindowmanager 2017-05-29 13:31:28 +01:00
baldurk ec4899ec72 Default current view in buffer viewer to VS In. 2017-05-19 16:24:43 +01:00
baldurk 870f0cc166 Filename filters should be translated 2017-05-15 10:11:55 +01:00
baldurk 505dacfd21 Fix incorrect array index 2017-05-10 18:51:32 +01:00
baldurk f277e06ba0 Show the row offset control in the raw buffer viewer too 2017-05-10 18:10:23 +01:00
baldurk f8bf45fa47 Fix sizing for matrix elements in buffer views 2017-05-10 17:20:39 +01:00
baldurk 7c7cd32c17 Populate the buffer format specifier with the initial format 2017-05-10 17:20:38 +01:00
baldurk 1ca55a8237 Add an optional 'rgb' specifier to colour buffer cells backgrounds
* When opening a texture as a buffer we can make use of this.
2017-05-10 17:20:37 +01:00