Commit Graph

190 Commits

Author SHA1 Message Date
baldurk 8447e43e78 Fix panel menus 2018-10-23 15:15:39 +01:00
baldurk 94dfb9890b Allow registering window, panel and context menu items with callbacks 2018-10-23 14:23:12 +01:00
baldurk 5472319025 When opening buffer textures, auto-generate a reasonable buffer format. 2018-10-11 11:09:36 +01:00
baldurk 615b743b8e Make shader debugging soft-blocking, pop up progress bar while working
* This prevents the user from accidentally triggering some other process while
  the debug is still on-going, if it's taking a while.
2018-10-08 17:24:00 +01:00
baldurk 66e8c6f9ff Don't set invalid zoom level when no previous texture size is set 2018-09-28 15:03:12 +01:00
baldurk 684e814eb7 Protect access to TextureViewer from custom shader editor
* This means we don't crash if the custom shader editor is kept open even when
  the texture viewer is closed.
2018-09-18 12:46:23 +01:00
baldurk a4e125f961 Fix thumbnails being drawn over whole resource preview 2018-09-05 09:58:16 +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 a81e4a2b45 Pass through and allow different source shader encodings when editing
* This means e.g. the D3D11 back-end can accept DXBC directly if the UI can
  provide it, or compile from HLSL as before.
* More importantly, the Vulkan back-end can take SPIR-V compiled from any
  source, or compile from GLSL as before as a fall-back.
2018-08-09 16:56:52 +01:00
baldurk 8c93750b00 Fix crash if texture tabs were open when restoring state. 2018-07-09 16:28:00 +01:00
Jake Turner e8c5cc7628 Fix -Wunused-lambda-capture warning errors on xocde93 2018-06-01 09:07:58 +01:00
baldurk 757671b97f Add custom right-click menu to texture tabs in texture viewer 2018-05-15 11:27:34 +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 ae82dfcb26 Disable debug/pixel history buttons when they cannot be used 2018-03-15 13:32:21 +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
baldurk 169604ea05 Reset zoom level to 100% when resetting texture viewer
* Prevents weird behaviour if the zoom gets set to 0
2018-03-02 14:39:54 +00:00
baldurk 4e6701a438 Don't create a texture thumbnail for every descriptor in an array 2018-03-01 18:45:33 +00:00
baldurk dd21423784 Rename ID variable to resourceId for consistency in API 2018-03-01 18:45:32 +00:00
baldurk 3bdfd1ecd6 Set the current highest mip/first array slice after unblocking signals 2018-02-22 19:48:30 +00:00
baldurk ecb9faefe1 Close locked tabs when closing a capture 2018-02-22 19:46:56 +00:00
baldurk 4a2242f0a1 Make checkerboard colours update immediately when theme changes 2018-02-21 14:29:36 +00:00
baldurk 1c88ff5fbb Don't stomp locked tab type hints with currently followed type hint 2018-02-20 13:48:47 +00:00
baldurk 6a1db5deac Show usage in timeline bar when selecting/focussing resource inspector 2018-02-20 10:12:32 +00:00
baldurk 04034c334b Gather pixel history panels together instead of making new dock for each 2018-02-19 00:52:13 +00:00
baldurk 0c7408b91e Don't allow single clicking on autofit to toggle auto-autofit 2018-02-15 11:23:52 +00:00
baldurk bb2c98795c Hook up autofit right-click shortcut, to always autofit 2018-02-12 20:48:10 +00:00
baldurk d7ecf8a1b3 Add a context menu item in texture viewer to open in resource inspector 2018-02-12 20:48:02 +00:00
baldurk 5a5d8380ad Persist texture save config between saves. Refs #862 2018-02-09 17:51:32 +00:00
baldurk 9614ee89c2 Use correct resource ID to fetch name in texture viewer status bar 2018-02-06 15:00:20 +00:00
baldurk e75b9f95b0 Consider a present the same as a copy for fetching output target 2018-02-06 00:21:09 +00:00
baldurk 65ef82466c Re-organise Analytics structures a bit to be more processing friendly 2018-01-19 13:57:02 +00:00
baldurk a13b45b0ef Apply FlipY to co-ordinates used for debug or pixel history. Refs #839 2018-01-17 21:07:03 +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
Richard Khoury 61b227580d Removing unnecessary addition of the ReplayOutput::GetTextureDisplay.
This member function wasn't required and the TextureDisplay was
accessible from within the TexxtureViewer as m_TexDisplay.
2017-12-15 13:20:26 +01:00
Richard Khoury d8bc07f945 Added ability to save out overlay textures using the TextureSaveDialog.
This is part of the work specified by github Issue 586, allowing the
ability to save out the overlay in the TextureViewer.  If no overlays
are on then there is no option to save the overlay. Currently there is
no option to remap the overlay to a grayscale or absolute value range
before saving. This can be a future task.

NOTE: the overlay texture resource that's saved out is not the blended
texture that the user will see in the TextureViewer, it is just the
overlay itself. The ability to save out the blended texture would be a
future task.
2017-12-15 13:20:26 +01: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 7c11557abd Refresh the texture list when a capture closes, to clear it out. 2017-11-24 18:14:22 +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 2514ad4126 Remove some dead code that's no longer needed
* Reported by Coverity Scan
2017-11-22 19:11:18 +00:00
baldurk b030ae5bd7 Fix possible crash with pixel history if window is closed early 2017-11-20 20:01:03 +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 1776b4e6c0 Declare ResourceId Qt metatype in public header so it's QVariant'able 2017-11-17 16:30:55 +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