Commit Graph

128 Commits

Author SHA1 Message Date
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
baldurk 296d7e39b1 Handle glTextureBufferRangeEXT not being available
* This way we don't have to require GL_ARB_texture_buffer_range as well
  when technically it should only be needed if the application used it.
2015-07-23 23:06:25 +02:00
baldurk 8213281921 Fix up fetching layer/mip for FBOs on replay 2015-07-18 18:27:34 +02:00
baldurk 0933d96fc9 Add FileChanged notification, use to reload data in image viewer
* Things will get weird if the image changes drastically like in format
  or dimension.
2015-07-15 22:06:33 +02:00
baldurk 4a401460d3 Fetch layer and mip level for FBO attachments 2015-07-13 00:05:42 +02:00
baldurk ea4350f52f Expose C++ interface via API headers, for C++ UI
* Since the exported C functions just take an explicit 'this' parameter
  and call the corresponding function, we can just make it contractual
  via a virtual interface that the pointer can be dereferenced.
2015-07-10 16:38:27 +02:00
baldurk ddd432f678 Add warning if dispatch has 0 dimension, and bounds-check on debugging 2015-07-09 20:42:34 +02:00
baldurk 4c988e9e3a Better arcball controls in the mesh viewer
* Tweaked flycam a bit too, but not much.
* Refactored the API/C# side camera classes to avoid exposing a ton of
  stuff just to do relative rotations in the arcball via quaternions.
2015-07-07 15:38:00 +02:00
baldurk dd9aff3890 Implement right click to pick vertices in the mesh viewer. Refs #139 2015-07-07 10:02:36 +02:00
baldurk edda31248f Render bounding box around mesh, centre & scale arcball on bbox
* The arcball lookat position can also be dragged with alt-click or
  middle click.
* Also supports other elements as position not just magically-selected
  "POSITION" element.
2015-07-06 19:58:45 +02:00
baldurk 7277d5d76e Support pixel history over a specific mip/array slice only 2015-07-06 17:18:19 +02:00
baldurk 5a03794a5a Consistently treat file containing entry point as the 'main' file
* This fixes shader editing when the entry point file wasn't the first
  in the list.
* Might need better detection of the main file than just searching for
  the entry point substring - could produce false positives in other
  files in a comment or #define or something similar?
2015-06-26 01:13:48 +02:00
baldurk a5cc19ccc6 Implement replay-side resource tracking for OpenGL
* This means that the timeline bar will show use as read/write/clear etc
  and that right clicking on textures in the texture viewer will show
  the events where that texture is used for rendering, for reading, and
  so on.
2015-04-11 11:03:19 +01:00
baldurk 95f4011bcb Add option to favour monospaced font for all data. Refs #118
* The option will enable monospaced fonts for all data displays, like
  the list of events, API calls, etc as well as pipeline displays, entry
  of filename/directory in the capture window and many other places.
  Pure UI labelling etc mostly still stays as a serif font.
* A few sizes of controls were tweaked (like headers in the pipeline
  windows) so that they didn't just barely overflow with the larger
  font.
* While looking at this, it became obvious that buffer viewers and
  constant bufferviewers should always display in monospaced regardless,
  so that has been changed.
2015-04-09 21:49:03 +01:00
baldurk 5bcbb47203 List GenerateMips, Copy and Resolve calls in event browser with draws
* What gets listed as a 'drawcall' is a bit fuzzy - previously it was
  drawing calls, dispatches and clears, but you could make a good
  argument for these to be included as well. As a semi-experiment, these
  calls are now included and will be listed in the event browser.
* Other calls can change resources like direct buffer or texture uploads
  and Map() type calls, but these remain as API calls listed between
  draw calls. Again this is mostly an arbitrary distinction.
* D3D11 logs are backwards compatible, GL logs are not (although it'd
  be relatively simple, GL logs will likely break backwards compat soon
  anyway, so not worth supporting it now only to break it soon).
2015-03-11 13:13:41 +00:00
baldurk 6cc506f7fd Expose GetTextureData function to user code (no resolving/downcasting) 2015-02-11 15:25:44 +00:00
baldurk 3e4aba535f Format the generic vertex attribute values correctly according to type 2015-02-10 16:59:19 +00:00
baldurk 72cfee5c0f Add GLSL syntax highlighting 2015-02-09 18:14:20 +00:00
baldurk 8ccf071865 Implement GetTextureData for GL - underlying code behind texture saving
* This should support all forms of textures off the bat, multisampled
  textures, 3D textures, arrays, compressed and uncompressed, etc.
2015-02-09 17:29:13 +00:00
baldurk 6208e3992d Fall back to WARP if D3D11 hardware isn't present. Closes #121
* If hardware support for feature level 11 isn't present, fall back to
  the WARP software rasterizer. This will support everything needed, but
  it certainly won't run well.
* There are loud warnings - I added a debug message to the debug errors&
  warnings window so the status bar will indicate that, and it's in the
  title.
* At most once every 3 weeks there will also be a message box pop up
  when loading a log, to remind the user so that it isn't forgotten, as
  for obvious reasons this is not the intended use-case (hopefully once
  per 3 weeks isn't too often to be annoying).
2015-02-01 19:57:09 +00:00
baldurk b7f9d5b6d0 Generalise drawcall timing to get arbitrary sets of counter values
* Client code can enumerate the IDs of counters that are supported -
  some of these will be general, some will be IHV specific. It can also
  request descriptions of the counters to determine the type of data or
  units. This can be used to 'discover' counters that aren't hard
  coded into renderdoc. I'll want to at least reserve IHV ranges so that
  counter IDs are globally unique, and ideally IHV counters will also be
  predeclared where possible.
* Also the refactor removes some ugly rdctype::array use outside of the
  replay layer and replaces it just with std::vector, which is a nice
  bonus.
2015-01-28 21:15:19 +00:00
baldurk a703dc54d0 Fix instancing support for post-vs mesh views on D3D11 and GL
* We stream-out or transform feedback the whole instanced draw at once,
  producing a buffer containing all N instances in one. Then when the
  client requests postvs data, an offset into the buffer is calculated
  (in 1/N chunks) and carried through everywhere.
* Since we were using the offset to indicate where the system position
  output lay for since-last-clear auto drawing of meshes, we rearrange
  the output attribute order so system position is always first in the
  list.
* Also since-last-clear now doesn't include the current event, but does
  include any previous instances before the current instance.
2015-01-28 02:21:14 +00:00
baldurk 0777a87dee Fix mismatch between C# struct and C++ struct (was hidden in padding) 2015-01-26 19:48:19 +00:00
baldurk 22c9775008 Refactor RenderMesh() to now purely render what's specified
* So RenderMesh doesn't pick up anything implicitly from the current
  event, log, pipeline state etc - everything it needs is explicitly
  provided by the config parameters (note this might include a buffer
  generated by postvs data fetching, but the implementation now doesn't
  need to care or treat it as a special case.
2015-01-25 14:04:41 +00:00
baldurk 92e830b801 Return Post VS mesh data just with buffer ID & description
* This will allow shifting to RenderMesh being run locally just by
  the UI specifying the buffer and simple vertex specification, rather
  than by relying on any local log properties (or replaying the log).
* The reasoning behind this change is that it becomes much simpler to
  implement, rather than having to modify the draw to do what we want,
  we just do an entirely custom draw based on a few properties - similar
  to the texture rendering. This will help e.g. for writing a GL
  implementation.
* The second benefit is that we can just transfer the buffer contents
  across the network when replaying remotely, so mesh rendering can be
  implemented even for remote replay - the last unimplemented feature.
* It could also be used similar to the image viewer in future, to
  display mesh files.
2015-01-24 22:06:45 +00:00