Commit Graph

1154 Commits

Author SHA1 Message Date
baldurk ae243b8a49 Create MS/Array copy shaders even in replay - needed for initial states
* This means these will spam errors if anyone is using a feature level
  10.x or below device without ps_5_0 support, but that's unavoidable
  and not too important (in release it'll just be some log spam).
2015-02-12 20:38:15 +00:00
baldurk 7cbb68f329 Implement quad overdraw overlays for GL
* The implementation needs the fine dFdx/dFdy variants, which are only
  available in GLSL 4.50 and above. Without that support we fall back
  to the normal dFdx/dFdy which are implementation dependent. In my
  quick test on nvidia it so happened that it was still fine, but that's
  not guaranteed.
2015-02-12 20:04:48 +00:00
baldurk a7185cbf9c Remove pipeline validation (was just for debugging) 2015-02-12 18:13:11 +00:00
baldurk 4a3217fdcc Be cheeky and pack extra overdraw levels into slight colour changes
* Since we decode the visual colours into an integer by looking them up
  in the overdraw ramp rather than re-running to get an integer return,
  we make some invisibly subtly different colours above the highest
  overdraw colour, and use these to tell overdraw levels above 20.
2015-02-12 17:02:46 +00:00
baldurk 086cc0e491 Rejig overlays to use separable programs instead of monolithic prog
* This means the overlays should now work for separable and monolithic
  program setups.
2015-02-12 16:46:09 +00:00
baldurk 3679205256 Compile fix for 64-bit 2015-02-12 09:02:02 +00:00
baldurk 6cc506f7fd Expose GetTextureData function to user code (no resolving/downcasting) 2015-02-11 15:25:44 +00:00
baldurk e048d5ba6b Implement proxy textures/buffers on GL, needed for local proxy replay 2015-02-11 15:15:01 +00:00
baldurk dad64bf6cb Implement MakeGLFormat and add a couple of details for ResourceFormats 2015-02-11 15:13:22 +00:00
baldurk be65a45f23 Fix crash on proxy serialising 2015-02-11 15:12:49 +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 7da38a9a8b Pass through signature parameter types properly 2015-02-10 16:49:34 +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 bdb823c20b Slice index for 3D textures is always relative to overall depth 2015-02-09 12:32:44 +00:00
baldurk 381eb24b01 Don't set depth to 6 for cubemaps, set array size 2015-02-09 11:52:57 +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 a282b68c58 Flip UV sample vertically for cubemap +ve X direction 2015-02-09 11:48:31 +00:00
baldurk 065acf8ac9 Fix crash in image viewer since it doesn't go through ReadLogInit() 2015-02-09 10:58:52 +00:00
baldurk 2513eabb17 Return compressed format ResourceFormat descriptors properly 2015-02-09 10:35:07 +00:00
baldurk ad1ff5712a SRGB8(_ALPHA8)? are UNSIGNED_BYTE based formats, not signed BYTE 2015-02-09 10:34:45 +00:00
baldurk 6e42f645e4 GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT is not enabled directly
* It's only used in glRasterSamplesEXT, so it's an error to either
  glEnable/glDisable it or check via glIsEnabled. It's already handled
  properly to RasterFixed, so just drop it from the enabled bits.
2015-02-09 10:34:22 +00:00
baldurk 6f711a3470 Handle a couple of error cases more gracefully in GL xfb 2015-02-08 10:45:36 +00:00
baldurk c3ca815da1 #version technically needs to come even before #if preprocessor stmts 2015-02-08 10:34:32 +00:00
baldurk 24577f3612 Drop LazyInit() inside GetDebugManager()
* We call LazyInit() in the first swapchain create, and on replay log
  initialisation. This is guaranteed to be before we use it (on replay
  it will always be hit, and in program if there's no swapchain, we
  won't use the debug manager for text rendering). It's also late enough
  that it won't be triggered for every device while enumerating or such.
2015-02-04 17:47:58 +00:00
baldurk e6e22b1fb7 Don't create shaders & UAV buffers that aren't necessary while injected
* This saves on errors and other spam (and internal compile errors if
  an older d3dcompiler.dll is used) when none of these resources are
  used. We only use what's necessary for font rendering.
2015-02-04 17:46:47 +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 c5fafbed5d Implement GPU duration counters on OpenGL 2015-01-29 10:17:51 +00:00
baldurk 96d0f472e0 compile error fix 2015-01-29 08:19:46 +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 50e571e7d4 Restrict to windows only, in case stl structures change size elsewhere 2015-01-28 17:19:35 +00:00
baldurk 68b9179f89 Bring back the "manage replay hosts" window menu item 2015-01-28 13:11:49 +00:00
baldurk ea0ed8b064 Implement mesh rendering over the replay proxy - now feature complete! 2015-01-28 13:09:38 +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 c9f106b0cb Fix up the replay proxy serialising functions
* Also add some compile time asserts to try and help keep them working.
2015-01-28 12:34:12 +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 d41a285f4d Skip built-in input attributes when copying attrib locations over 2015-01-26 19:50:23 +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 4c44fc67cb Fix copy-paste error, use the right interface for getting name 2015-01-26 19:48:00 +00:00
baldurk 00226df891 Fix making TCS/TES/GS shaders separable by inserting gl_PerVertex 2015-01-26 19:10:00 +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 20927953ed Add some handling for strangely formed DXBC shader files. Refs #122
* This is the fun with reverse engineering formats, sometimes they do
  mad crazy stuff.
2015-01-26 18:07:01 +00:00