196 Commits

Author SHA1 Message Date
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 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 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 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 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 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
baldurk 96b8818120 Give constant buffer previewer proper naming on OpenGL logs 2015-01-20 14:57:20 +00:00
baldurk 45a78df2ae Fix vertex input attribute/buffer mutual highlighting 2015-01-20 13:52:06 +00:00
baldurk 57c8aa476f Use GetRow instead of GetPositionFromControl as it's more reliable 2015-01-20 13:45:38 +00:00
baldurk 74b231a413 Make sure TES and TCS are the right way around 2015-01-20 11:51:31 +00:00
baldurk 68f8f1b6e3 Fix GL pipeline state table layouts 2015-01-20 11:39:06 +00:00
baldurk aa81a3955c Display 'read-write' type objects grouped together in GL pipe state
* This includes atomic counters, shader storage buffer objects and images.
2015-01-19 02:04:29 +00:00
baldurk de6d93c47f Improve GL shader reflection to include Atomic bufs, SSBOs and images 2015-01-19 02:04:08 +00:00
baldurk 48f98ebdef Add shader subroutines (placeholder) and transform feedback
* The transform feedback is placed on the geometry shader tab the same as
  in D3D11. It doesn't merit its own whole tab and that seemed like the
  best place to put it (last processing stage before rasterization).
* To aid understanding, further stages are marked disabled if rasterizer
  discard is on, and if no geometry shader is bound the stage is renamed.
2015-01-18 12:06:39 +00:00
baldurk 6107129286 Add group for multisample state on rasterizer tab 2015-01-18 11:34:26 +00:00
baldurk d344fc6c88 Add the other bits of rasterizer state to be included in the UI 2015-01-18 11:20:54 +00:00
baldurk c05272c23d Show seamless cubemap sampling state in UI 2015-01-18 10:55:09 +00:00
baldurk 8b91c8540b Pass through Read FBO, and handle Draw/Read Buffers indirection 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