Commit Graph

3034 Commits

Author SHA1 Message Date
baldurk fb418f883e Add a button to pipeline state view to save shader raw contents to file
* The exact contents depend on the API - on D3D11 this is the bytecode
  blob, on Vulkan it's the SPIR-V. On OpenGL it is just a concatenation
  of all the source files passed in sequence.
2016-08-30 16:43:52 +02:00
baldurk a35c88e577 Close some minor UX holes when live-connected but without replay context
* If there's no replay context we can still use the live connection to
  copy and delete captures remotely. Try to use that whenever possible
  and warn the user when it's not possible (i.e if the program has been
  closed and there's no replay context, we have no way to access the
  files anymore).
* If the user tries to open a remote log without a replay context,
  prompt them either to swithc to a replay context on that host or to
  save the log locally.
2016-08-30 11:55:36 +02:00
baldurk 279aa72064 While cross-compiling, force a host-side build of include-bin 2016-08-30 10:49:23 +02:00
baldurk 1efaca1883 Store view with EventUsage, and use to filter pixel history. Refs #341 2016-08-29 15:35:33 +02:00
baldurk 4f7f00a9c6 Don't try and query for immutability or fill out mips on buffer textures 2016-08-29 15:35:32 +02:00
baldurk e83fa057f3 Handle querying out cubemap face of FBO separate from layer. Refs #341
* In GL although the ARB_dsa extension allows binding of cubemap faces
  as if they were a 2D array (you know, the sane way), it doesn't let
  the queries return the cubemap face to the LAYER query. Instead it
  needs a separate query of CUBE_MAP_FACE.
2016-08-29 15:35:31 +02:00
baldurk e3a11dc453 Remove use of non-portable egrep in scripts 2016-08-26 13:44:10 +02:00
baldurk 74bd568724 As a last fallback for locating qrenderdoc, return the binary name
* This way if the binary is in the PATH somewhere but not in any of our
  expected locations, we can still execute it.
2016-08-26 13:35:55 +02:00
baldurk d3e4790ee8 Add command to renderdoccmd that will handle vulkan layer registration
* This is similar to the button on the capture dialog of the windows UI,
  except on linux the situation is a bit more complex as layers can be
  registered in two different system locations (one for distro packages
  and one for non-distro stuff), as well as in $HOME.
* On linux we make sure the json always contains an absolute path so we
  can tell from any given build whether or not a json is our own or not.
* By default we now install the json to /etc since /usr is reserved for
  proper distro packages, and shouldn't be written to by 'make install'.
  There's a CMake variable for overriding this for anyone who wants to
  make install into a custom folder (maybe for packaging).
2016-08-26 13:35:31 +02:00
baldurk 8897a1295a Handle parameters to SOSetTargets being NULL, use defaults. Refs #338
* It seems like actually ppSOTargets can only be NULL if NumBuffers is
  0, but the D3D runtime will happily accept a null pOffsets and just
  act as if it's full of -1 (which means append)
2016-08-25 21:07:40 +02:00
baldurk ced197abe3 Only enable stdout/stderr log output after main initialisation
* This suppresses lines like "RenderDoc v0.31 x64 (...) loaded in replay
  application" which are only useful for the logfile and not for actual
  user output.
2016-08-25 21:07:40 +02:00
Norbert Nopper b180aaaf11 Last, maximum wait time is 32 milliseconds. 2016-08-24 18:34:56 +02:00
Norbert Nopper 3dad918ad1 Increased wait time and changed retries for gathering proc entry.
(Not tested)
2016-08-24 18:34:49 +02:00
Norbert Nopper e46c41b4e7 Added UNKNOWN vendor.
Otherwise member variable can be uninitialized.
2016-08-24 17:10:30 +02:00
baldurk 136342b056 Add handling in GL for certain uncompressed special formats 2016-08-24 15:54:00 +02:00
baldurk c539510da8 Only flip uncompressed texture data out of GL when saving to disk
* When transferring over the network, we keep texture data consistently
  in GL origin-bottom-left order. This means we can just flip images on
  display and otherwise have things consistently behaving, while still
  preserving the behaviour of flipping on saving to disk to try and
  mostly 'do the right thing' when saving an image.
* The behaviour should be the same as before except for remote proxying
  which is fixed. The behaviour for GL is still that compressed images
  saved as compressed will appear to flip vertically from what is
  natively displayed in the UI, but I think this is the only sensible
  way to behave (and anyway, flipping compressed images is far too
  involved to be worthwhile).
2016-08-24 15:53:59 +02:00
baldurk c3e6f58580 Fix incorrect enum being passed to compressed format check 2016-08-24 15:53:59 +02:00
baldurk e8e3d50c86 Expose the different local and remote renderers to the UI 2016-08-24 15:53:58 +02:00
baldurk a4bf27098a Fix a overlay issue, glyph texture didn't have MAX_LEVEL set 2016-08-24 15:53:57 +02:00
baldurk ec67b41dfe Implement texture swizzling for BGRA order texture proxies on GL 2016-08-24 15:53:54 +02:00
baldurk 811552ef2e Improve error messages using GLenum strings 2016-08-24 15:53:54 +02:00
baldurk a1d0b72e79 Fix select() calls - nfds must be the highest fd value plus 1
* This was copy-pasted from windows where unfortunately the nfds
  argument is ignored and we could get away with just passing 0 (which
  I suspect is where the broken code came from originally - a windows
  example code that passed 0)
2016-08-24 15:53:53 +02:00
baldurk 3d6214622b Switch error code from AmdDxExtCreate11 properly to E_FAIL 2016-08-24 15:53:51 +02:00
Michael Rennie 129f4218c9 Choose FB config with a GLX_VISUAL_ID that matches the X screen.
Fixes glXCreateWindow returning "BadMatch (invalid parameter attributes)".
Also delete the GLX_ALPHA_SIZE=8 criteria, else there might not be any
matching config.
2016-08-23 20:37:10 +01:00
Michael Rennie 86fd623a54 Fix char* format specifier. 2016-08-23 20:26:28 +01:00
baldurk e7cbc905e6 Add AMD D3D11 extensions headers, and force-disable AMD exts on create
* If the AMD extensions are active and captured, the driver will crash
  on replay in a hard to diagnose way (unless you know what's really
  wrong!)
* With this change, the target application should see the extensions
  failing to create and gracefully fallback to not using them.
2016-08-23 17:23:42 +02:00
baldurk 5826777dfe Blind (untested) implementation of wrapping/handling for VK_KHR_display 2016-08-23 17:18:42 +02:00
baldurk 872fbe017b Make xlib and xcb support optional (but default on) on linux
* Also allow disabling GL a little better by removing the dependency in
  renderdoccmd.
* Disabling them now completely removes all xcb and xlib build
  dependencies. The resulting library/executable is only useful in
  limited situations - e.g. replaying vulkan remotely which doesn't need
  any window system interaction. Or capturing vulkan as well with the
  KHR_display WSI extension which doesn't need any built-time includes
  or libs.
2016-08-23 16:25:21 +02:00
baldurk f8bbedeb8b Ping the connected host regularly and check other hosts at lower freq.
* This lets us detect when a remote server has been disconnected and
  needs to be restarted, as well as alerting the user if this happens in
  the middle of a replay session.
* Pinging other hosts means the context switcher is reasonably up to
  date if one of them comes up.
2016-08-23 15:21:52 +02:00
baldurk 0ddfd3d65b Shut down active client properly when killing remote server 2016-08-23 13:47:06 +02:00
baldurk a8cfc753df Bullet proof the replay renderer against the proxy going away suddenly 2016-08-23 13:37:24 +02:00
baldurk 27b7077c36 Add versioning into remote server protocol 2016-08-23 13:02:07 +02:00
baldurk 1b06e2b553 Handle EAGAIN and EINPROGRESS where appropriate as well as EWOULDBLOCK 2016-08-23 11:31:01 +02:00
baldurk d632bc7ba8 Fix crash fetching data with an offset larger than the buffer size 2016-08-22 10:07:04 +02:00
baldurk 21a5bfd55a Fix compile warnings about shadowed variables. 2016-08-19 19:23:59 +02:00
baldurk 8183c0d2ac Better handling of BGRA8 dds saving and loading 2016-08-19 17:36:36 +02:00
baldurk 79b860c1d5 Fix saturate on the wrong sub-expression clamping sRGB white slightly 2016-08-19 17:26:39 +02:00
baldurk 6008458216 Fix LZ4 compression for replay proxy texture data transfer
* The compression bound was just a hacked 'uncompressed size + 512'
  which might not be enough for true worst case.
* Worse, the serialisation was transferring size_ts so it would break if
  proxying between 32-bit and 64-bit executables.
2016-08-19 17:26:38 +02:00
baldurk d2faf76356 Save machine ident in captures and compare to machine ident on open
* If the machine idents differ in significant ways that we'd consider
  it to be a different platform (currently just OS), and if so mark it
  as supported but suggested to be replayed remotely.
2016-08-19 17:26:36 +02:00
baldurk 52a754d4c1 Add function to get a coarse machine identifier
* This can be used to determine what kind of machine a capture came from
  and potentially decide to alert the user and suggest replaying on that
  kind of machine if it's very different.
2016-08-19 17:26:35 +02:00
baldurk b5e6f8bef2 Allow specifying environment variable modifications
* This works for local and remote invocations of programs, but is mostly
  useful on unix systems (Windows programs use env vars less often)
2016-08-19 17:26:33 +02:00
baldurk 71cca06683 Make windows environment variable modification case-insensitive 2016-08-19 17:26:33 +02:00
baldurk 23cf596d52 When requesting directories for '/' on windows, return the drives 2016-08-19 17:26:29 +02:00
baldurk aebed0e900 Expose directory listing functions to C# 2016-08-19 17:26:28 +02:00
baldurk db57f18b08 Add function to get home/documents folder 2016-08-19 17:26:27 +02:00
baldurk 593e2c5903 Add an function to return directory list of files and basic properties. 2016-08-19 17:26:27 +02:00
baldurk 5dc70c2a72 Rename ProxySerialiser to ReplayProxy 2016-08-19 17:26:26 +02:00
baldurk d63e3b89ad Add support for copying files back from remote server 2016-08-19 17:26:24 +02:00
baldurk 6437347081 Don't double-delete serialiser of data into replay proxy 2016-08-19 17:26:23 +02:00
baldurk 42f57990d9 Change remote server to have server thread & client threads
* This lets us respond to multiple clients (although all but one will
  get a busy signal).
2016-08-19 17:26:18 +02:00