Commit Graph

3517 Commits

Author SHA1 Message Date
baldurk f00a0a8a5e Keep image initial states as buffers in CPU memory, copy from there
* This is potentially slightly less optimal as it means the initial
  states aren't in GPU memory for a faster copy, but it means we're much
  less likely to hit OOM due to way more GPU allocs, and it's still
  pretty fast.
* Further optimisation is possible by reducing the number of images that
  actually either need initial states at all (detect when images are
  first used to clear via a renderpass), or by detecting images that are
  frame invariant and we only have initial states for immutable contents
  and avoid copying them more than once.
2016-07-15 13:26:42 +02:00
baldurk 48cd7143d7 Track descriptor sets per-cmd-buffer while reading
* This lets the usage actually have the right descriptor sets to check
  against.
* It was lost as a result of a bad fix after copy-pasting removed the
  previous read-time tracking.
2016-07-15 13:24:33 +02:00
baldurk 3be0d6d1de Fix mistaken memory leak tidy up
* Sort of confused false positive - some pipeline SPIR-V blobs were
  leaking but it was because they weren't being cached when they should
  have, not because saving the shader cache doesn't destroy its blobs.
2016-07-15 12:39:42 +02:00
baldurk f353d852f9 Don't hook into nvidia's opencl driver, it uses wglGetProcAddress 2016-07-15 00:11:46 +02:00
baldurk 80bdfe6058 Fix errors and leaks found by valgrind on linux replay host
* These are some leaks, some mismatched new/deletes and some uninit'd
  values. Mostly the leaks are what we care about so that the replay
  host can be kept alive for a long time rather than needing to be
  constantly restarted.
* Also added a valgrind suppression file to suppress some of the false
  positives I ran into while testing.
2016-07-14 20:37:32 +02:00
baldurk a7eca41a81 Fix 32-bit compile error 2016-07-14 20:32:48 +02:00
baldurk 95e00d58bf Add SIGINT signal handler on linux to cleanly shutdown replay host 2016-07-13 17:55:47 +02:00
baldurk 0c55e9374c For platforms printing to stdout/stderr, skip debug msgs & long prefix 2016-07-13 17:55:21 +02:00
baldurk 13a6c98143 Handle duplicate semaphores (mesa returns all handles as 0x1 atm) 2016-07-13 17:07:16 +02:00
baldurk edf553137c Create all proxy depth textures as depth-bindable and typeless 2016-07-13 16:49:30 +02:00
baldurk a7dc5f207f Size readback buffer for initial states based on what we need
* No need to base readback buffer on image memory requirements which
  could be packed tighter than our requirements for readback (e.g. depth
  and stencil combined formats)
2016-07-13 16:49:10 +02:00
baldurk bf707845d1 Fix readback copying of depth-stencil images 2016-07-13 16:46:50 +02:00
baldurk d4e78f785c Fix stencil pixel picking - it comes back as uint32, not float 2016-07-13 15:53:15 +02:00
baldurk ee63587813 Rename IsDepthStencilFormat to IsDepthOrStencilFormat 2016-07-13 15:53:01 +02:00
baldurk 504b18ab3f D32S8 type formats are 8 bytes per pixel, not 5. 2016-07-13 15:52:19 +02:00
baldurk 28c6105215 On posix systems, set SO_REUSEADDR 2016-07-13 13:54:25 +02:00
baldurk d5fd26f267 Make sure the 0 VAO gets properly frame referenced 2016-07-13 10:35:59 +02:00
baldurk 23665b6e05 Don't draw an indexed mesh if there is no index buffer available to bind 2016-07-13 00:40:22 +02:00
baldurk 532cdcb7a1 Compile fix for appveyor 2016-07-12 21:55:52 +02:00
baldurk 61d8060630 Fix QRenderDoc to new replay API call 2016-07-12 19:54:04 +02:00
baldurk 99c0177cd9 Remove unused GetUsername() function 2016-07-12 19:39:41 +02:00
baldurk 2b5e37b442 Make handling of mips more consistent around locked textures. Refs #292 2016-07-12 19:22:17 +02:00
baldurk 2a68153def Make sure resource context menu items are large enough 2016-07-12 19:00:37 +02:00
baldurk 123476fd30 Allow fetching view params (bound mip, etc) for copy/compute. Refs #292 2016-07-12 18:48:03 +02:00
baldurk 53d739c659 Add fallback if miplevel doesn't have a selected value 2016-07-12 18:41:51 +02:00
baldurk 80b61b2e37 Fix picked pixel co-ordinates as well as hover co-ords. Refs #300 2016-07-12 18:39:10 +02:00
baldurk 5c53e623df Add win32-specific commands (crash handle, upgrade, global hook) 2016-07-12 17:39:24 +02:00
baldurk 90f6a9da20 Remove old code 2016-07-12 17:39:24 +02:00
baldurk e66794018c Implement cap32for64 internal command 2016-07-12 17:39:24 +02:00
baldurk ced8a62af6 Add replay command (with optional remote replay) 2016-07-12 17:39:23 +02:00
baldurk 884c201aff Add replay host command 2016-07-12 17:39:23 +02:00
baldurk 73dc89f25a Allow specifying a listen interface and port, for remote replaying 2016-07-12 17:39:22 +02:00
baldurk aaa2bd1d7d Check for help in one place rather than every command 2016-07-12 17:39:22 +02:00
baldurk 67337b390d Implement capture and inject commands 2016-07-12 17:39:22 +02:00
baldurk 120b03e859 On windows, make sure cmd.exe can see the stdout/stderr 2016-07-12 17:39:21 +02:00
baldurk 2970f49754 Process capture options common to all capturing commands 2016-07-12 17:10:43 +02:00
baldurk 1cb11daf85 Switch base renderdoccmd to dispatch to commands, doing arg parsing 2016-07-12 17:10:43 +02:00
baldurk eb9a545104 Move common functions declarations into header 2016-07-12 17:10:42 +02:00
baldurk af3cfa8932 Add replay entry point to get git commit hash 2016-07-12 17:10:42 +02:00
baldurk 06e4263bad Minor tweaks to cmdline.h to better suit my usage
* Descriptions for readers, for better error reporting and usage help.
  This also allows these descriptions to be multiline, and they're
  indented correctly.
* A bit better formatting of options and defaults.
* Print full list of errors when there are more than one.
* #undef max
* Header as well as footer on single-line command help.
* Remove parse and parse_check variants I don't use.
* Allow processing without looking at argv[0].
* Optionally stop the processing at the first non-command, so that
  you can have a program and its arguments without trying to parse
  the arguments themselves.
2016-07-12 17:10:42 +02:00
baldurk cfe0e0e78f Modify cmdline.h to compile without warnings, don't use RTTI 2016-07-12 17:10:41 +02:00
baldurk f24e3b20d9 Add cmdline.h from https://github.com/tanakh/cmdline
* BSD licensed - Copyright (c) 2009, Hideyuki Tanaka
2016-07-12 11:47:53 +02:00
baldurk b74b833121 Switch renderdoccmd to use vector<string> for passing args 2016-07-12 11:22:51 +02:00
baldurk 2373f0e445 Keep pixel context pixel size at consistent size for mips. Refs #301 2016-07-11 18:55:07 +02:00
baldurk e12d789a83 Fix incorrect use of texture height instead of mip. Refs #300 2016-07-11 18:54:22 +02:00
baldurk 85f4641620 Disable texelFetch entirely on nv - broken with latest glslang 2016-07-11 18:28:00 +02:00
baldurk 7a09ab0807 Make sure not to mix and match dispatchable & non- objects. Refs #290
* On 32-bit, dispatchable objects are 32-bit wide since they're pointer
  sized, vs 64-bit non-dispatchable objects. Using a dispatchable
  pointer to write both types of objects leads to incorrect stepping.
2016-07-11 18:03:11 +02:00
baldurk 951b6287d7 Update descriptor counts for capture-time pool 2016-07-11 18:02:17 +02:00
baldurk 9e820723f6 Allow descriptor set updates to 'roll over' between bindings. Refs #295
* The spec allows for descriptor set updates that write beyond a given
  binding's array count to continue on into the next consecutive binding
  providing that it is the same type.
2016-07-11 14:08:32 +02:00
baldurk 6f3fd03488 Make sure to tidy up render passes created even while capturing 2016-07-11 13:04:25 +02:00