Commit Graph

272 Commits

Author SHA1 Message Date
baldurk 1f9918a7c8 Fix some crashes and bad handling of indices
* If buffer wasn't a multiple of 4, a Buffer.BlockCopy call could crash
* Unsigned byte indices (for GL) weren't supported
* Post-transform index buffer was assumed to just be uints, but in fact
  it is the same size as the drawcall's existing indices.
2015-03-20 20:52:31 +00:00
baldurk 1759a7ba35 Fix crash if constant buffer preview window is too small
* You can't set SplitterDistance unless both MinSize values will be
  respected, which needs a big enough window. Smaller than that, we just
  have to skip setting the size.
2015-03-18 17:34:18 +00:00
baldurk 6cd1f70bb6 Fix several warnings for compiling on VS2015
* Note at the time of committing there are still some warnings in MS
  headers that you might need to suppress in a couple of files.
* 3rd party code just has the warnings suppressed for ease of merging.
* The majority of warning fixes were for local variables shadowing
  other locals, function parameters, or members. In most cases they
  weren't a problem, but in some cases it was potentially dangerous!
2015-03-13 10:16:19 +00:00
baldurk af97e30376 Linux compile fix, and include copies/generatemips in pixel history
* We treat them the same as UAV writes where we just list them in case
  the pixel is modified without checking.
2015-03-12 10:25:32 +00:00
baldurk 7e1e87af1f Fix crash if shader debug comes back with empty trace array
* The current step wasn't being clamped correctly, so it would be set
  to -1 then used to index.
2015-03-12 00:43:13 +00:00
baldurk c30fd3e1e1 Fix a crash if constant buffer is still open when log is closed 2015-03-12 00:39:47 +00: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 b8d5b3f4af Add EnableUnamangedDebugging=true default to csproj
* Since RenderDoc is heavily mixed .NET/C++ code, regardless of any
  disadvantages this option is practically required (e.g. if building in
  profile, the first error message or assert will take the program down
  as the breakpoint won't get caught).
* In the UI, enabling this option will always go into csproj.user, but
  in fact the option works fine if you manually put it into the csproj,
  which means this will be the default for all new clones. Yay!
2015-03-11 11:13:08 +00:00
baldurk e7307455f6 Fix a crash if vertex input is instanced, with instance rate of 0
* In this case, every input takes the first index, need to avoid divide
  by 0 error.
2015-03-11 08:04:19 +00:00
baldurk c3e381a76a Remap entire index buffer for post-vs data, instead of just shifting
* Previously for post VS data we could maintain the index buffer by just
  doing the stream-out/transform feedback for a point list with each
  unique index. To maintain the index buffer we padded out any gaps in
  the indices with a single value, so that we could just shift the
  indices. This causes severe problems though if the indices start at 0
  and contain an invalid value like 0xcccccccc - we'd allocate a huge
  array and perform a massively wasteful streamout.
* Instead, we just stream out on the tightly packed list of unique
  indices, then remap each 'real' index to where it is in the tightly
  packed output buffer.
2015-03-10 21:05:59 +00:00
baldurk 94f25edfd0 Bump version number to v0.24 for subsequent unofficial builds 2015-03-07 23:56:42 +00:00
baldurk 1e0478b829 Node tag should never be NULL/wrong type, but check just to be sure. 2015-03-03 13:23:27 +00:00
baldurk 8fa5eb74e6 Fix race between texture viewer creating its thumbnails & first use 2015-03-03 12:32:51 +00:00
baldurk db04714f8d Fix case where buffer format wasn't auto-populated correctly 2015-03-02 15:26:11 +00:00
baldurk 4dcb89966c Fix crash when event browser is hiding empty marker regions
* When we figure out which event a marker region should jump to if you
  select the parent, we want to pick the last valid event ID that isn't
  just a label. However previously this was being done by iterating over
  the children and picking the last one and assuming there would be a
  node of that index - which isn't true in the case where some drawcalls
  were entirely omitted. It would either index out of bounds, or index
  incorrectly.
2015-03-02 13:36:24 +00:00
baldurk 731a7f3797 Fix crash opening up GS CBuffer window from pipeline state
* Also added an exception that throws at control creation time (much
  easier to spot) if this property is invalid.
2015-03-02 08:38:33 +00:00
baldurk 28922673cb Bump version number to 0.23 for future nightly/beta builds. 2015-02-28 22:58:12 +00:00
baldurk a440589969 Fix crash with image viewing on last change, using wrong array length 2015-02-27 14:10:49 +00:00
baldurk cca206a356 Fix array indexing crashes, ditch a lot of messing with UAV start slot
* The UAV array is provided as we expect it - with UAVs from 0 onwards
  even if their 'slots' are 4, 5, 6 etc or whatever. UAVStartSlot is
  the slot of the 0th UAV.
2015-02-27 14:07:58 +00:00
baldurk cd35c726bc Change GL pipeline state to just name shaders "<stage> Shader <ID>"
* Since there's no better identifier, as all shaders are main() and
  there are no filenames to pick up.
2015-02-27 12:24:47 +00:00
baldurk 9e908779ce Fix lone unescaped & being interpreted as accelerator 2015-02-27 11:05:11 +00:00
baldurk 372647709a Add EXR registry key, add images filter to file->open dialog
* I doubt anyone will notice the file->open filter unless they look for
  it so it's no good for 'discovering' the image viewing capability, but
  it might be convenient for people who know about it.
2015-02-26 18:24:49 +00:00
baldurk 1597fa3f32 If no history is returned, empty out the history event list
* Otherwise it stays as "Loading..." forever
2015-02-26 15:13:21 +00:00
baldurk ac926b86d9 Split up RT/RW handling to be less D3D11-centric in texview thumbnails
* In D3D11 the RTs and UAVs have the same namespace, but GL has separate
  framebuffer attachments and images. This change splits up the concepts
  so the D3D11 case is a special case, in a way, and that we can handle
  any generic mix of the two nicely.
2015-02-21 22:39:36 +00:00
baldurk 53b24791e5 Add handling for RGBA16 backbuffers (with linear contents) 2015-02-14 21:02:16 +00:00
baldurk 80329f6e9b Channels selection and mip/slice selection are now stored per-texture
* For each texture you view, it will reset back to mip 0 and slice 0
  as it previously did, and it will also reset the channels back to
  RGB only, which is new behaviour.
* Then each texture remembers those settings, so if you choose to view
  slice 6 & alpha only of a texture any time you switch back to it
  you'll see slice 6 & alpha only.
* It can be disabled in the options, but this is the new default
  behaviour. Possibly in future the zoom level and visible range might
  be rolled into this, but for now I think they might work better as
  global state.
2015-02-14 12:19:13 +00:00
baldurk e8b2abc0a4 Remove old old disable thumbnails code 2015-02-14 12:01:26 +00:00
baldurk 7eed980850 Speculative fix for crash upload, make sure node index is valid 2015-02-12 21:38:30 +00:00
baldurk ce20926f20 Try and be defensive about lack of index data
* ArgumentException thrown from BlockCopy seen in a crash upload, and
  it might be because of an empty or null buffer returned, maybe.
2015-02-12 21:36:46 +00:00
baldurk 8938c71853 Texture buffers now default to viewing in the buffer not texture viewer
* The pipeline state windows will open up the buffer viewer instead of
  the texture viewer to show the contents of texture buffers.
2015-02-12 21:15:02 +00:00
baldurk 6cc506f7fd Expose GetTextureData function to user code (no resolving/downcasting) 2015-02-11 15:25:44 +00:00
baldurk 424f5ab964 Set texture viewer status bar to fixed width font. Partly experimental
* Since the addition of the normalised UV co-ords the status bar will
  flicker in width horrendously when scanning over a texture and it's
  impossible to track where you are. Even worse, if the text is wide
  enough (or the window narrow enough) you'll end up with the status
  bar flickering between one and two lines - which is awful.
* For now I've added some padding for numbers and set a fixed width font
  so the only varying element is the actual texel value, which is
  unavoidable in the general case. The text is probably wider overall
  so I'll need to see what feedback I get.
2015-02-10 17:37:08 +00:00
baldurk 3f5d87f290 Make generic values show up in the mesh viewer 2015-02-10 17:16:32 +00:00
baldurk 3e4aba535f Format the generic vertex attribute values correctly according to type 2015-02-10 16:59:19 +00:00
baldurk be6cbf4536 Implement editing GL shaders in-place via resource replacements 2015-02-10 16:46:33 +00:00
baldurk 54ad900f53 Set parameters for custom shaders, and update template & snippet buttons
* RENDERDOC_TextureType has different value meanings for the different
  types on GL - need to update the docs to reflect this.
2015-02-09 22:38:44 +00:00
baldurk 86d0b8a952 Implement custom display shaders for OpenGL logs, no parameters yet
* glsl and hlsl custom display shaders are kept separate, and only shown
  for the appropriate log type.
* The little snippets added in the shader editor aren't updated yet, and
  none of the pre-defined shader constants are filled out.
2015-02-09 22:19:13 +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 f64e2ce1d1 Do a default inversion of Y co-ordinates on GL and invert w/ height-1 2015-02-09 11:50:11 +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 68b9179f89 Bring back the "manage replay hosts" window menu item 2015-01-28 13:11:49 +00:00
baldurk 67f5724e53 Don't list primitive if it's not available (e.g. top level EID entry) 2015-01-28 12:34:28 +00:00
baldurk 1b4bf97574 Fix for instance rates not being accounted for on vertex inputs 2015-01-28 02:23:30 +00:00
baldurk 6d64fc7a1a Handle NULL index buffer being bound for indexed draws better 2015-01-28 02:23:17 +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 7bf45d043b Fix incorrect null check that could crash with no VS bound 2015-01-26 19:55:42 +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 d7c8c1026c Support XFB from geometry or tessellation shaders
* Also set default near/far planes for auto-calculation to 0.1/100
2015-01-26 19:09:39 +00:00