Commit Graph

89 Commits

Author SHA1 Message Date
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
baldurk 96b8818120 Give constant buffer previewer proper naming on OpenGL logs 2015-01-20 14:57:20 +00:00
baldurk de6d93c47f Improve GL shader reflection to include Atomic bufs, SSBOs and images 2015-01-19 02:04:08 +00:00
baldurk f89e5a80e2 Mkae transform feedback data public on .NET side 2015-01-18 12:04:52 +00:00
baldurk 0fb3c54514 Compile fixes for C# GL pipeline state struct to match real struct 2015-01-18 10:54:48 +00:00
baldurk d80687832f Include transform feedback state in GL pipeline state 2015-01-17 21:47:06 +00:00
baldurk 11c2d4bdcc Add list of shader subroutine values 2015-01-17 21:27:45 +00:00
baldurk 82d262ad8b Pass through multisample state and point/line rast state values 2015-01-17 19:09:04 +00:00
baldurk f607f9832e Add texture seamless cubemap enabled state 2015-01-17 18:49:09 +00:00
baldurk 8b91c8540b Pass through Read FBO, and handle Draw/Read Buffers indirection 2015-01-17 18:49:08 +00:00
baldurk 91d26c6a75 Pass through some vertex processing state & opengl quality hints 2015-01-17 18:49:08 +00:00
baldurk 24fd91a7e0 Display texture swizzling and depth/stencil read mode on textures 2015-01-17 15:53:09 +00:00
baldurk 7e10c5c4ea Pass through ShaderResourceType per-texture for better type naming 2015-01-17 15:03:34 +00:00
baldurk 51a0ee1dc1 Fix typo! 2015-01-16 22:54:03 +00:00
baldurk 035eecfb1e Show if GL_FRAMEBUFFER_SRGB is 0 for an SRGB FBO attachment 2015-01-16 11:34:35 +00:00
baldurk b059e601c5 Send sampler information through to GL pipeline state for display 2015-01-16 02:49:00 +00:00
baldurk af51c4f1e6 Tweak rasterizer page display to be a bit nicer 2015-01-16 01:14:21 +00:00
baldurk 6f0284f170 Show depth and stencil states on GL pipeline view 2015-01-16 00:43:44 +00:00
baldurk 1265b5bc6e Set up display of blend equations (and logic, overriding) 2015-01-16 00:18:34 +00:00
baldurk f459c63380 Show restart index on GL pipe state, and handle it being disabled 2015-01-15 23:37:17 +00:00
baldurk 1096308755 Show generic vtx in attributes, and show attribute names from VS 2015-01-15 23:16:55 +00:00
baldurk abbcd7c80f Combine and compress some of the data tables in the D3D11 pipe view
* e.g. class instances only crazy people use, so there's no point to have
  it eating up a ton of space when 99.9% of the time it's empty. Also
  the border colour in samplers is only listed if the addressing is set to
  use the border colour.
* I also collapsed down some of the columns to make it a little simpler
  visually, like min lod/max lod become just "lod clamp" with a range, and
  constant buffers simplified down to a couple of columns.
2015-01-15 22:14:03 +00:00
baldurk f013f6fd29 Store index format and topology in drawcall, to accommodate GL
* D3D11 just latches the state from the input assembler state into the
  drawcall when it's being added. GL stores the state per-draw.
2015-01-15 17:17:12 +00:00
baldurk 04f1d4a378 Centralise debug message processing, and allow adding custom warnings
* This will allow the adding of things like 'redundant api call' for calls
  that have no effect, as well as potential problems like drawing with an
  empty viewport, or similar things that are common problems. Reading out-
  of-bounds on buffers etc is a good example of 'defined' behaviour that
  is probably not desired.
* These heuristics could also identify potential performance problems.
* It also supports adding debug messages after log-load time, so you could
  do an additional extra-strength pass, or do a detailed check of one
  draw call (e.g. a broken draw, to try and figure out the problem). If
  there are any unread debug messages, the status bar will flash and the
  debug messages window will show a count as (N).
2015-01-11 00:20:50 +00:00
baldurk 1c9269fc8d Add simple OpenEXR save/load support using tinyexr
* Thanks to https://github.com/syoyo/tinyexr for the load and save code!
2015-01-06 17:43:19 +00:00
baldurk 0df6e36ff5 Allow displaying any semantics as 'position' on mesh output view
* This means you can visualise the UVs directly, not just as a colour
  on the regular mesh.
2014-12-20 19:54:52 +00:00
baldurk e1d01970c6 Add fetching of Indirect params, and stepping through MultiDraw calls
* This means glMultiDrawIndirect is fetched, decomposed into child draw
  calls and you can step through them individually
2014-12-14 12:17:38 +00:00
baldurk 52476118de Support doubles in shader vars natively, not packed in 2*uint32 each 2014-12-02 00:16:12 +00:00
baldurk c51fade47a Add support for texture rectangles. See gl-330-texture-rect 2014-12-01 22:55:35 +00:00
baldurk b6ba100ed1 Add a couple more buffer creation flags 2014-12-01 12:41:00 +00:00
baldurk ea8203e160 Add backface culling overlay 2014-11-27 23:36:06 +00:00
baldurk 2484bc8bc7 Use UTF-8 everywhere possible and only use wchar_t where required.
* This means that all APIs pass byte string types. ALL strings everywhere
  in the entire codebase must be assumed to be and treated as UTF-8 content
  not ASCII.
* Gets rid of all the horrible %hs specifiers that caused warnings on
  linux! Hooray.
* We convert to wide strings, or use wide characters, only when necessary
  to use the Win32 API. Some windows specific code will stay in wide chars
  just for convenience.
* Files are already serialised as UTF-8 strings for linux/windows binary
  compatibility, so this change doesn't break backwards compatibility.
2014-11-23 14:45:16 +00:00
baldurk 551b0372c8 Allow fully flexible display of position&other component on meshes
* You can choose which component will be used as 'position' when rendering
  vertex inputs. Helpful if a position component isn't auto-detected, or
  if you want to render UV co-ordinates onto the screen.
* Instead of fixed TEXCOORD0/Color options for solid shading onto the mesh
  you can choose a secondary column yourself.
* Also the solid shading options are available on vertex output meshes as
  well as inputs.
2014-11-13 18:37:58 +00:00
baldurk 6308d78cd4 Implement debug device/debug api message tracking for GL 2014-11-02 10:52:24 +00:00
valeriog d18557239f Added visualization of rasterizer state for OpenGL. 2014-10-31 19:40:16 +01:00
baldurk 63d1f868ac Have captures listed on overlay decay after 20 seconds 2014-10-31 00:35:54 +00:00
baldurk deffa8c68e Add displayable string representation for primitive topology 2014-10-07 23:20:19 +01:00
baldurk 37e4209cc9 Remove MipSlice parameter to make things a little simpler 2014-10-07 23:19:57 +01:00
baldurk f3f3e7629f Disable verify map writes by default 2014-10-06 17:41:10 +01:00
baldurk 56e7f0c754 Add an option to verify Map() writes don't overrun. Closes #42
* Has a couple of limitations - won't check deferred context or
  NO_OVERWRITE Map()s except in a captured frame. This could in theory be
  implemented but it'd be complex and I don't want to complicate/break
  the normal path.
* When an overrun is detected, a messagebox pops up to block the thread,
  and if you hit yes, it will debugbreak.
2014-10-05 23:42:25 +01:00