Commit Graph

207 Commits

Author SHA1 Message Date
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 c8a518f05c Refactor rdcstr with small-string and literal-string optimisations
* rdcstr no longer inherits from rdcarray, it implements all functionality
  itself.
* There are now three representations:
  - Heap-allocated, same as how rdcarray behaves.
  - Local-allocated, for small strings we store them in a union array.
  - Compile-time literal, only created from user-defined literals.
* The main observation is that a lot of RenderDoc's strings are compile-time
  literals either from struct names, member names, or stringified enum values.
  Storing these directly and allowing them to be moved and copied quickly saves
  on allocations and time. When the string is modified, it's copied to one of the other formats.
2019-05-15 14:12:17 +01:00
baldurk e13671a72c Add sanity check for if dock area isn't available while restoring layout 2019-04-22 18:39:53 +01:00
baldurk 11e8bdb209 Display default 'viewed as' for typeless textures. Closes #1351
* Typeless textures must be interpreted as some kind of format, so without a
  better hint we use UNORM as a default. Ensure that this is listed explicitly
2019-04-22 18:39:52 +01:00
baldurk f256218e17 Pass bindless feedback data to UI through vulkan pipeline state
* Each binding element within an arrayed descriptor has a bool indicating if
  it's dynamically used or not (which will be set to true if the feedback isn't
  available). Each descriptor has a uint32_t indicating how many elements are
  dynamically used - which is useful for the UI to hide the root of an array
  that has no used elements, or to heuristically decide whether to expand or
  elide the contents.
2019-04-05 09:19:22 +01:00
baldurk 4319c5c2ab Calculate the slice properly for viewing MSAA textures as buffers 2019-04-03 16:42:41 +01:00
Vincent de Marignac f970d42c2c Set bound on right arrow keypress to width 2019-03-25 09:05:13 -07: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 150e6527ad If a texture is typeless then account for type hint when pixel picking 2019-01-09 16:27:15 +00:00
baldurk 2237c241ff Fix incorrectly named methods in ResourceFormat
* We try to maintain at least an internally consistent naming scheme for the
  python/public interface, even if it doesn't match python naming schemes.
2019-01-03 12:22:29 +00:00
baldurk 1617b4618d Fix crash on GL after saving a texture to disk, wrong thread access 2018-12-21 12:38:28 +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 1cb0f29198 Update channels detail when HDR multiplied text is edited 2018-12-13 18:00:26 +00:00
baldurk 2411ce70ea Add flags to ResourceFormat to replace bgraOrder/srgbCorrected
* Allows for future expansion as well
2018-12-11 19:57:20 +00:00
Sebastian Krzyszkowiak 9d21221617 TextureViewer: fix wheel zooming on HiDPI screens
Without adjusting for pixel ratio it zoomed in into a wrong place.
2018-12-11 11:05:49 +00:00
baldurk 57caf01394 Refactor heatmap for quad overdraw/triangle size to be applied late
* Instead of baking these into the overlay texture and trying to decode them
  afterwards, we instead write a grayscale 16F value into the overlay texture,
  and add a special decode display mode that will use the heatmap and bucketing
  provided.
* This means that saving these overlay textures now saves grayscale. When saving
  to an 8-bit format, we remap to 0-255 so that greater than 1.0 values are
  mapped lower.
2018-11-01 12:23:12 +00:00
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