Commit Graph

1164 Commits

Author SHA1 Message Date
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 bf36b775b1 Make sure to pass through flush if we really mapped underlying buffer 2015-02-13 20:49:41 +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 3c6a1316d5 Fix using the wrong ID for replacements & removing them 2015-02-12 21:15:25 +00:00
baldurk 6a39ec4f52 Fetch texture buffer contents via GetBufferData 2015-02-12 21:15:13 +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 40e06c17de Include vec3, vec4, dvec3 and dvec4 as input attributes 2015-02-12 20:55:49 +00:00
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