Commit Graph

302 Commits

Author SHA1 Message Date
baldurk 1d05cf5e21 Implement Ctrl-F3/Ctrl-Shift-F3 to search for current word/selection 2015-06-04 21:46:35 +02:00
baldurk 75a9bd4376 Expand out arrays of shader resources at lower priority than non-arrays
* An array of resources like SamplerState foo[8]; or Texture2D blah[8];
  show up as one entry in the reflection data, so need to be expanded
  out to several entries.
* Normally it's OK to overlap two resources in the same bind, as long
  as only one gets used - this doesn't matter to us since only the used
  one will show up in the reflection data. Unless there's an array e.g:
  SamplerState foo[8] : register(s0); // [0] and [5] used;
  SamplerState bar    : register(s3);
  in which case foo[] appears in the reflection data for the sake of [0]
  and [5], and bar will appear too (causing an overlap between foo[3]
  and bar. Since we know the reflection data is unambiguous, we
  prioritise individual entries over array entries by listing them
  first and using the first match for any bindpoint.
2015-06-04 21:04:08 +02:00
baldurk 03a3bafaf9 Make #include filename searching case insensitive 2015-05-22 21:48:27 +02:00
baldurk 7e66c2787c Raise limit on zoom to 25600% so manual zoom can be higher. Refs #137
* Still leaving some upper limit so that typos don't result in a zoom
  level of something crazy.
* This also allows 'fit to texture' to zoom in more, but I'm OK with
  that.
2015-05-09 16:23:37 +02:00
baldurk 26b9d7902b Bump version for future nightly builds to 0.25 2015-05-02 16:34:58 +02:00
baldurk 2dde5ee52d Make sure MultiDraw calls properly create timeline bar sections 2015-04-25 15:59:58 +02:00
baldurk 63824680ea GS output never uses an index buffer (so mesh preview wasn't rendering) 2015-04-25 13:48:57 +02:00
baldurk 23404656ce Make sure not to try to set empty text to clipboard 2015-04-25 13:19:48 +02:00
baldurk 7339be3c00 Fix crash if Ctrl-C is pressed while no log is loaded 2015-04-25 13:19:37 +02:00
baldurk 1ba89e4b16 Add Ctrl-C copy-paste handler to GL pipeline viewer
* Also fix a crash if ctrl-c is pressed while no log is loaded
2015-04-25 13:14:20 +02:00
baldurk e35fc400dd Make sure to handle debugging 'invalid' indices
* Crash upload fix
* If a vertex is the strip restart index (displayed as "-1") or is
  reading out of bounds of the index buffer (displayed as "-") then we
  should still allow vertex debugging to go ahead, as if the index were
  just 0.
2015-04-21 21:00:51 +02:00
baldurk 392f9b7f2d Clamp texture view slice to number of slices (sanity checking)
* This should in theory be impossible as you can't create a view that
  points to after the number of slices, and we always make a list of all
  slices, but there was a crash report here so for now we'll just clamp
  so that it doesn't crash completely.
2015-04-21 21:00:51 +02:00
baldurk c12df371d0 Handle shader filenames that are invalid paths
* If shaders are compiled directly via D3DCompile, the source filename
  can be anything, not necessarily a valid path, so need to handle this
  case.
2015-04-21 20:01:21 +02:00
baldurk 7f61f85201 Fix tooltip on "Allow global process hooking" option. Closes #132 2015-04-20 13:40:35 +02:00
baldurk f06964ea23 Clean up folder structure a bit, move .NET 3rdparty under renderdocui/ 2015-04-13 12:46:30 +01:00
baldurk 7a1cc84f41 Keep temporary log around to be able to save multiple times. Closes #130
* Previously if a temporary log was saved once, it would be moved there,
  so the user could in theory delete it and lose the only copy of the
  log.
* Now the temporary log is held until it's closed in the UI, to be able
  to be saved again. If the user saves the log though, this will stop
  any "unsaved log" prompts in the main UI window, so there is nothing
  stopping the user from saving the log, deleting that copy, then
  closing and they'll lose the log without prompt.
2015-04-12 18:37:16 +01: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 d8bc653edb Fix infinite loop toggling breakpoint
* Also we don't set the custom assembly context menu when there is no
  trace to debug.
2015-04-06 15:16:53 +01:00
baldurk 3d6c992465 Add a custom right-click menu for disassembly scintilla. Refs #128
* This lets us add custom right-click options like run to cursor, toggle
  breakpoint and toggling between integer and float register display.
2015-04-06 15:10:30 +01:00
baldurk c049c37b86 Fix run to instruction checking instruction number vs. trace count
* The trace count could be less than the number of instructions if flow
  control causes some instructions to be skipped (and higher if some
  were repeated!). There's no need to validate this value anyway, RunTo
  will bail when it hits the end of the trace if the number is too high.
2015-04-01 23:43:08 +01:00
baldurk 05dc259656 Make sure popups don't appear outside the controls. Refs #128 2015-04-01 23:42:49 +01:00
baldurk 6a09446acb Fix crash if ctrl-c is pressed in event browser with no log loaded 2015-03-30 20:06:19 +01:00
baldurk c31cf39236 Include hex in tooltip, and show for register windows. Refs #128 2015-03-29 21:06:26 +01:00
baldurk 8b9caa6cc2 When executing python scripts temporarily catch exceptions in renderer
* Errors like syntax and runtime errors in python are thrown as
  exceptions. So for when we invoke onto the renderer thread to do some
  work, we need to be able to catch those exceptions otherwise the whole
  program dies. So over the execute, temporarily switch the thread into
  a catching-exception mode, which then gets rethrown on the invoker's
  thread.
* Note that BeginInvoke shouldn't be used by python since the callback
  might happen after the execution has finished (there's no way to wait
  at the moment).
2015-03-29 19:59:40 +01:00
baldurk c0be5552e8 Extract command line #defines to fxc, roll them in when editing shaders 2015-03-29 18:29:20 +01:00
baldurk 37c1cbffd9 Fix nested #includes not being replaced 2015-03-29 18:12:13 +01:00
baldurk 8abb2f19cc Fix crash editing shader if #include is the first line in the source 2015-03-29 18:11:12 +01:00
baldurk 25ce9f2a5a Fix filling out drawcall timings if 'hide empty' option is enabled
* Previously we'd expect to run through the same algorithm to generate
  the drawcall nodes, but fill in the existing nodes. However this
  completely broke down when some nodes weren't created because they
  were empty. Now instead we just iterate the nodes that are there and
  look up any values in the timing results.
2015-03-26 18:16:38 +00:00
baldurk cc34f5749a Fix crash if a marker group has children but doesn't have any nodes
* This could happen if the option to remove empty groups was enabled,
  and all the children in a group were removed.
2015-03-26 17:54:26 +00:00
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