Commit Graph

93 Commits

Author SHA1 Message Date
baldurk d11da2f3a1 Refactor texture viewer thumbnails to not use swapchains
* There seems to be a significant slowdown when using real swapchains, both for
  creation and display. Since thumbnails don't update often (only on event
  change, or if the panel is resized which is not a regular occurence)
  counterintuitively it's better to render and readback the image offscreen and
  re-upload it on the CPU.
2022-11-09 14:14:24 +00:00
baldurk 234262649f Fix calculation of small mip co-ordinates for NPOT textures 2022-07-15 18:07:08 +01:00
baldurk f01dfbecc1 Add a python extension function to access picked location. Refs #2065 2022-05-31 11:26:59 +01:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
baldurk a21d245114 Remove show unused/show empty options from texture viewer 2021-08-26 09:51:37 +01:00
baldurk 7149302680 Rename 'draw' or 'drawcall' to action
* There's not a good accepted terminology for this kind of event, and for
  historical reasons 'drawcall' has been the accepted term, even though
  that can be quite confusing when a dispatch or a copy is a 'drawcall'.
* This is particularly highlighted by the event browser filters where
  $draw() includes draws and dispatches, but $dispatch() only includes
  dispatches, it's hard to intuitively understand why $draw() matches all
  of these calls.
* As a result we've defined the term 'action' to cover these types of
  events in the same way that we defined 'event' in the first place to
  mean a single atomic API call.
2021-07-01 15:15:05 +01:00
baldurk 527c662fb2 Only flip Y co-ordinates in texture viewer when clip origin is default 2021-03-01 11:38:29 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk f3b66b0112 Only refresh texture list if resource renames changed
* Otherwise the texture list doesn't change when selecting events.
2020-12-17 15:20:32 +00:00
baldurk 6b8ce92d88 Clean up docstrings in python interfaces to be strictly typed/formatted
* Also added a script that can run as part of CI to verify that the docstring
  matches, by generating a regex from the docstring documented parameter types
  and return type and making sure we find a match within the C headers. This
  ensures all parameters are documented with the right types, no extra
  parameters are documented, and the return type is correct.
* The script also checks proper scoping so that if qrenderdoc docstrings
  mention a renderdoc type, they need to scope it properly.
2020-12-07 17:44:51 +00:00
baldurk a34d7b1965 Don't bind Qt signals multiple times for custom paint widgets 2020-11-24 16:29:36 +00:00
baldurk 58e16414e0 Add a number of control functions to the Qt python interface 2020-11-20 17:02:33 +00:00
baldurk 3f5a911483 Refactor CustomPaintWidget to handle widget recreation internally
* This allows us to expose to to python as a easy-to-use "replay output ready"
  widget.
2020-11-19 14:47:11 +00:00
baldurk ab28d102cd Fix bug allowing users to close unclosable texture viewer panels 2020-11-09 12:25:20 +00:00
baldurk 695ffaaf24 When viewing a texture from pipeline state, default to view typecast 2020-10-30 16:28:03 +00:00
Kevin McCullough e213cfafa9 Modifying the TextureList to use EventBrowser-style chooser. 2020-10-15 22:19:44 +01:00
baldurk 56f82f6bf1 Optimise UI for large descriptor arrays with few dynamically used binds
* We tune the pipeline state view and texture viewer to only iterate over a
  small list of dynamically used binds in the (vastly more common) case where
  unused binds are not being shown.
2020-09-03 18:09:47 +01:00
baldurk c39a0bae5f Re-jig Following to hold a reference to TextureViewer
* This simplifies the code flow because we can be sure that we always have
  cached read-only/read-write resources (this was true before, but now it's
  clear).
2020-09-03 18:07:47 +01:00
alex 9414beaed2 Support multiple custom shaders directories for Texture Viewer 2020-06-16 11:47:52 +01:00
alex c1612f5d46 Add Texture Viewer custom shaders directory setting 2020-06-16 11:47:52 +01:00
Steve Karolewics ade2325623 Cache resources fetched from the pipe state in the texture viewer 2020-04-28 18:15:20 +01:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk db563bb0bf Refactor public interface around handling of textures
* Subresource handling is more consistent - we pass around a struct now that
  contains the array slice, mip level, and sample. We remove the concept of
  'MSAA textures count samples as extra slices within the real slices' and
  internalise that completely. This also means we have a consistent set
  everywhere that we need to refer to a subresource.
* Functions that used to be in the ReplayOutput and use a couple of implicit
  parameters from the texture viewer configuration are now in the
  ReplayController and take them explicitly. This includes GetMinMax,
  GetHistogram, and PickPixel.
* Since these functions aren't ReplayOutput relative, if you want to decode the
  custom shader texture or the overlay texture you need to pass that ID
  directly.
2019-11-26 17:38:25 +00:00
baldurk 01344c7e83 Rename typeHint to typeCast 2019-11-26 17:38:25 +00:00
baldurk e4333291a1 Allow using shader processing tools for custom shaders
* This is primarily useful for HLSL on Vulkan, but could be used with any other
  combination. If multiple tools can perform the conversion, the highest
  priority one is used.
2019-05-22 17:54:10 +01:00
baldurk 06feec392d Use pipeline base mip/slice binding for texture thumbnails. Closes #1327 2019-05-20 13:13:47 +01:00
baldurk 96cc08b960 Rename 'show disabled' button to 'show unused' as it is clearer
* Bindings that are unused aren't disabled - they may in fact be explicitly
  enabled - but they are unused by the pipeline which is why they're hidden.
2019-05-17 16:32:55 +01:00
baldurk e23974e2bf Initialise variables that might not be set otherwise before first use 2019-03-01 11:33:05 +00:00
baldurk f20e871510 Add option to make y-flipping a per-texture state instead of global 2019-02-04 18:06:10 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 13e7d1c134 Support display of YUV textures on D3D11, D3D12 and Vulkan
* Supported textures are decoded into standard format of YUVA, displayed
  visually with Y in green, U in blue, V in red.
* A new texture display mode 'YUVA decode' has been added which does a default
  full-range conversion from YUV to RGB.
* Custom shaders can be used to implement a custom decode matrix.
2018-12-14 20:14:07 +00:00
baldurk 94dfb9890b Allow registering window, panel and context menu items with callbacks 2018-10-23 14:23:12 +01:00
baldurk 757671b97f Add custom right-click menu to texture tabs in texture viewer 2018-05-15 11:27:34 +01:00
baldurk 4a2242f0a1 Make checkerboard colours update immediately when theme changes 2018-02-21 14:29:36 +00:00
baldurk 6a1db5deac Show usage in timeline bar when selecting/focussing resource inspector 2018-02-20 10:12:32 +00:00
baldurk bb2c98795c Hook up autofit right-click shortcut, to always autofit 2018-02-12 20:48:10 +00:00
baldurk 5a5d8380ad Persist texture save config between saves. Refs #862 2018-02-09 17:51:32 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +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 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