261 Commits

Author SHA1 Message Date
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
baldurk 06a549cf01 Fix vertex inputs on GL to use input attrib bindpoint mapping 2015-01-26 16:55:07 +00:00
baldurk 184d3a6789 Prime post-vs data when log is loaded (or bufferviewer is newly opened)
* This fixes the bug that's been around for a while, where if you have
  an event selected and then open the buffer viewer, it won't have the
  post vs data available until you re-select that event.
2015-01-26 14:27:16 +00:00
baldurk 9bd5fabe1a Implement axis markers and frustum helper on GL mesh view 2015-01-25 21:11:56 +00:00
baldurk 4674b76930 Remove attributes not used in VS from GL vtx attribute list 2015-01-25 19:55:07 +00:00
baldurk 8318720561 Re-implement GL RenderMesh in the new terms - much simpler!
* Still missing several features:
  - solid shading of 'secondary' data
  - highlighting of vertices/faces/supporting faces
  - helpers like axis markers or frustum
  - post VS data and re-projection
2015-01-25 19:31:13 +00:00
baldurk da2470dbcf Use correct stride value 2015-01-25 17:16:57 +00:00
baldurk 44f498de0d Fixes to ensure postvs data is available & properly used 2015-01-25 16:59:42 +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 30516c31c6 Make sure we don't try to debug when no trace is available 2015-01-22 15:18:10 +00:00
baldurk 6326b3344d s/Constant Buffers/Uniforms and UBOs/ on GL pipeline view 2015-01-20 15:00:39 +00:00