152 Commits

Author SHA1 Message Date
baldurk 5867d7ada1 Pass through resource view element size in D3D11 pipeline state
* This lets us calculate the offset and visible length when opening a
  buffer view from a resource binding.
2016-04-23 13:03:41 +02:00
baldurk 9ee5218761 Add more file-size stats to statistics viewer 2016-04-13 00:37:28 +02:00
baldurk 70b99a4412 Remove antiquated 'multiple frames in one capture' support.
* Cleans up the code a bunch, this support is unlikely to ever return
  and if it does it will need a rethink anyway.
2016-04-13 00:28:09 +02:00
baldurk 4e9082ee7c Rename slots to bindslots - conflict with Qt #define keyword 2016-04-13 00:02:10 +02:00
baldurk d62ce264b6 Display custom names for input layouts 2016-04-12 22:46:25 +02:00
Michael Vance 973ee146a8 Support for a new 'Statistics' pane.
Notes
======
- Create a (hopefully) cross-backend performance statistics abstraction as part of FetchFrameInfo. This currently collects statistics about constant buffer binds, sampler binds, resource binds, client and server style resource updates (e.g. Map and UpdateSubresource), index & vertex buffer binds, and draws and dispatches. In my captures this covers approximately half of all API traffic. The rest is often shader sets, and then usual RS, OM, etc., that aren't currently tracked. During READING state parsing on the wrapped device context, record statistics about the calls and store them into the current frame info. We inspect objects occasionally to get things like their type for recording. It may be useful to expand this in the future to check bind types, etc. On the GL/Vulkan backends the stats data is never initialized and we display the same statistics data as before.
- Add a new statistics pane in the UI. A variety of shim arbitration/marshalling is provided to get the statistics data across the managed/native boundary. Removed the old statistics menu item. Currently the statistics pane is just a text log of various gathered data, with ASCII art (woo!) histograms. However in the future we would like to have image based historgrams as well as support for gathering statistics on a mask of stages, etc.
- Remove 'diagnostic' events (e.g. push/pop/marker) from the API call count as it distorts the API:draw call ratio.
- Add _First and _Count to ShaderResourceType and ShaderStageType for weak enumeration (weak due to int cast requirement).
- Provide utility functions Log2Floor for 32 and 64 bit types. These require OS specific clz, which are provided for Windows/VS and Linux/gcc/clang.

TODO
======
- UI toolkit based historgram, ability to set stages enabled for statistics, etc.
- Revisit necessity of gathering statistics across frames--apparently there is no multi-frame capture in a single log anymore?
- Revisit min/max/etc. gathering on the data--is there some way to improve this to not be so mechanical? Perhaps with field enumeration? However if moving to C++/Qt in future, possibly not a good time investment.
2016-04-11 21:23:05 -04:00
baldurk 5869e9c1bf Handle baseVertex as signed, separately from vertexOffset. Refs #228 2016-03-24 18:50:04 +01:00
baldurk 1a05f4fc4a Forcibly refresh UI state after editing a shader or removing an edit 2016-02-21 16:10:46 +01:00
baldurk bb408e7de4 Update enums on C# to match C++ enums 2016-02-21 15:35:47 +01:00
baldurk 2e0ffa7813 Batch update copyright years everywhere 2016-02-07 18:50:45 +01:00
baldurk 82faf93a27 Fetch and store array stride with each constant block variable 2016-02-07 18:50:27 +01:00
baldurk 2107b2fe55 Handle push/pop markers when inserting via queuesubmit
* This allows push/pop regions to cross command buffers, as long as they
  are submitted in the right order etc.
2016-02-07 18:50:14 +01:00
baldurk 5b2806f573 Add check for vulkan 2016-02-07 18:50:13 +01:00
baldurk c8436d3646 Implement resource usage tracking 2016-02-07 18:50:05 +01:00
baldurk 251a9773c2 remove min/max event IDs from FetchCounters - always times whole frame 2016-02-07 18:49:47 +01:00
baldurk 459196fd21 Shift responsibility for 'whole pass' type processing to replay drivers
* Note, currently broken as the drivers don't have previous/next EIDs
  set up on their drawcalls
2016-02-07 18:49:36 +01:00
baldurk 183919853f Proper null checks in C# operator == 2016-02-07 18:49:30 +01:00
baldurk e0bbed0b34 Pass shader specialization data to pipeline state (just data, not in UI) 2016-02-07 18:49:22 +01:00
baldurk 4b7c33d531 Fixes for vulkan for BGRA changes, add R4G4 special format 2016-02-07 18:49:21 +01:00
baldurk a995ee66e2 Change handling of shaders and entry points so they're not aliased 2016-02-07 18:49:03 +01:00
baldurk f63dfcfc1f depthclip != depthclamp 2016-02-07 18:48:38 +01:00
baldurk 63d643d43c Replay functions compiling 2016-02-07 18:48:31 +01:00
baldurk 0992c05ab9 Fix leaking memory in byte[] marshalling case 2016-02-07 18:47:41 +01:00
baldurk 4f784b07d5 Handle array outputs in SPIR-V, add array index to signature parameter 2016-02-07 18:47:36 +01:00
baldurk 5c309d9d34 Refactor handling of resources/binding to be much more flexible
* This will handle the new vulkan binding model with multiple descriptor
  sets and arrays of objects in each binding. It also makes a few tidy
  ups and improvements to other APIs in presentation - will e.g. now
  show thumbnails for vertex and other stages.
2016-02-07 18:46:40 +01:00
baldurk 6051f0c500 Split 'Resources' shader array into readonly/readwrite arrays
* This is preparation for a following commit, might not work on its own
  (mostly untested - just compiling).
2016-02-07 18:46:39 +01:00
baldurk e51cf27321 Get abbreviations from common pipeline state (as they're API specific)
* Also the PipelineStateViewer will set its current 'sticky' API type
  to the common pipeline state, so that when a log isn't loaded we can
  still get API-specific properties that match the last API used.
2016-02-07 18:46:38 +01:00
baldurk ebb9f05c75 Pass through base mip/level for vulkan resources (also for GL textures) 2016-02-07 18:46:37 +01:00
baldurk a012652049 Handle arrays of objects in shaders 2016-02-07 18:46:32 +01:00
baldurk 7dd5760420 Try to handle unbound resources a bit better 2016-02-07 18:46:31 +01:00
baldurk e6807ec3a7 Proper display for descriptor sets in pipeline state view 2016-02-07 18:46:29 +01:00
baldurk ba8114936e Render mesh displays as 4x MSAA to make the line rendering a bit nicer 2016-02-07 18:46:23 +01:00
baldurk b363dc1fb5 Vulkan scissor regions are x,y,width,height 2016-02-07 18:45:16 +01:00
baldurk 4fe74824b1 Switch buffer offsets and lengths to 64-bit, downcast only where needed 2016-02-07 18:45:06 +01:00
baldurk 70b1d241b0 Finish the vulkan pipeline display 2016-02-07 18:43:49 +01:00
baldurk ee1460dcaa Update C# vulkan pipeline state structs to match 2016-02-07 18:43:00 +01:00
baldurk a25d07cf59 Display cbuffer contents within vulkan pipe viewer
* For now, we just assume that cbuffers are tightly packed according to
  D3D11 rules (matrices, structs, float3/4 are all float4 aligned), and
  once final SPIR-V is generated everything should have explicit
  offsets, strides, and sizes
2016-02-07 18:42:06 +01:00
baldurk 8832573dbb Expose SPIR-V reflection data to UI 2016-02-07 18:41:45 +01:00
baldurk edac1f0bfd Pass vulkan pipeline state along to UI 2016-02-07 18:41:29 +01:00
baldurk 8b7a025853 Refactor BGRA formats to not be special (so allow any BGRA format)
* Also add ASTC and D16S8 types while in the neighbourhood
2015-11-29 22:05:26 +01:00
baldurk c8a6d0dbb7 If displaying via a custom shader when saving texture, save that output 2015-11-18 22:30:47 +01:00
baldurk 73ad61d38e When saving textures if only one channel is visible, save as greyscale 2015-11-18 22:30:47 +01:00
baldurk 57ba6e0806 Add overlays to clear before current draw/pass. Refs #164
* Depth is not cleared, only colour buffers.
* This uses the same definition of pass as the quad overdraw overlay,
  which isn't quite the same as the auto-grouping passes (which allow
  for varying colour binds being grouped together). It only counts up
  to the last draw where the outputs were different.
2015-10-25 15:49:16 +01:00
baldurk c7cfdcc689 Add basic support for displaying/picking S8 textures. Refs #165 2015-10-25 14:09:43 +01:00
baldurk abdec82be1 Guarantee struct type field ordering 2015-08-24 08:39:56 +02:00
baldurk 4609fa710b Update RenderDoc application-facing API to a stable/mature version.
* This API is now intended to be forward and backward compatible as much
  as possible. Meaning applications should be able to run without
  changing on many RenderDoc versions after the one they are built
  against without breaking.
* All function pointers are fetched at once in one versioned GetAPI()
  function, to save on constant GetProcAddress/dlsym'ing.
* Otherwise, it's largely similar to the previous API.
2015-08-23 15:12:05 +02:00
baldurk 6a2344d9d8 Show correct inputs/outputs for copy and dispatch calls. Refs #147
* Next step is to display VS and other stage inputs on the input panel.
* Also need to tidy up the fetching of highest mip/array slice etc to
  use the same codepath.
2015-08-23 13:20:23 +02:00
baldurk 9333228fc5 Highlight empty viewports that are still enabled in the UI. Refs #144 2015-08-23 11:49:00 +02:00
baldurk 8ca621a649 Handle invalid characters in shader filename paths everywhere 2015-07-25 10:33:52 +02:00
baldurk 8cf1a878cc Add locks around static use of CustomMarshal properties
* These locks shouldn't cover much work as generally the caches will
  quickly fill up and the inside-lock work will be quick.
* Also they shouldn't contend as it's quite rare for anything but the
  render thread to go through CustomMarshal.
2015-07-24 00:17:52 +02:00