Commit Graph

4386 Commits

Author SHA1 Message Date
baldurk 11e6c1f478 Add dynamic sampler writes into frame capture record 2016-10-21 21:44:24 +02:00
baldurk 6060bb9fcb Fix indirect enum order 2016-10-21 21:44:24 +02:00
baldurk c23633b85d Handle ExecuteIndirect by cracking lists apart and patching during read 2016-10-21 21:44:24 +02:00
baldurk df903cd191 Allocate indirect buffers for storing immutable patched copies of args 2016-10-21 21:44:24 +02:00
baldurk 5978305794 Optionally skip adding event usage (if it will be done post-patching) 2016-10-21 21:44:24 +02:00
baldurk 9f319e035e Store list ID and relative EID for each drawcall use, for lookup later 2016-10-21 21:44:24 +02:00
baldurk 9a6a05bf6d Sure type and nodemask when resetting a list to allow cracking 2016-10-21 21:44:24 +02:00
baldurk 5921a50bc4 Close readback list after creation, so we can just always reset it 2016-10-21 21:44:24 +02:00
baldurk 12d9bd511a Remove unused chunk type parameter from AddEvent() calls 2016-10-21 21:44:24 +02:00
baldurk bd73731ba8 Execute command lists one-by-one during reading 2016-10-21 21:44:24 +02:00
baldurk 8dffc24383 Record command lists twice, so they can be cracked apart around executes 2016-10-21 21:44:24 +02:00
baldurk aeb5eb76f8 Track complete state vector during reading pass
* This will be needed for cracking apart command lists with indirect
  executes.
2016-10-21 21:44:24 +02:00
baldurk 19685c80a4 Handle replaying of ExecuteIndirect non-indirectly and add fake events 2016-10-21 21:44:24 +02:00
baldurk 52232ad5b8 For now, skip replaying query functions 2016-10-21 21:44:24 +02:00
baldurk 2ae4241174 Frame reference resources in query functions 2016-10-21 21:44:24 +02:00
baldurk 2893d67b93 Handle OPCODE_CUSTOMDATA when counting declarations 2016-10-21 21:44:24 +02:00
baldurk d4d9a855c4 Fix replaying through indirect draws on vulkan 2016-10-21 21:44:24 +02:00
baldurk 106308a3fa Note if a command signature is graphics or compute 2016-10-21 21:44:24 +02:00
baldurk ac53611f07 If any list executed contains an ExecuteIndirect, ref all buffers
* Since buffers can be referenced indirectly on the GPU by their GPU
  address, there's no feasible way to know if the buffer is actually
  used or not. If an ExecuteIndirect is seen at all we just have to
  pessimistically include all buffers.
* Generally textures take up the bulk of VRAM usage, so this likely
  won't be too bad.
2016-10-21 21:44:24 +02:00
baldurk febe2b1ad9 Patch ExecuteIndirect call data to point to replayed GPU addresses 2016-10-21 21:44:24 +02:00
baldurk 1c3b4dfc94 Add support for SM5.1 bytecode changes - primarily resource arrays 2016-10-21 21:44:24 +02:00
baldurk 7434077718 Extract register space from DXBC reflection info 2016-10-21 21:44:24 +02:00
baldurk c2553e0d65 Don't fill in register spaces if there's no root signature set 2016-10-21 21:44:24 +02:00
baldurk c997cad967 Set plane slice as necessary on stencil SRVs 2016-10-21 21:44:24 +02:00
baldurk f756cf363e Remove legacy DXBC padding of cbuffers array. Also stub reg spaces
* Historically there was no bindpoint mapping so it was convenient to
  just pad the cbuffers array so that the elements in it were indexed by
  their bind point. It doesn't make any sense anymore especially with
  D3D12's bind model, so just remove it and roll bind points into a
  struct member.
2016-10-21 21:44:24 +02:00
baldurk cc35215a12 Always call SetVariables from UI thread, don't use InvokeRequired 2016-10-21 21:44:24 +02:00
Michael Rennie 8856d3a6f2 Force-stop Android package before starting it for capture. 2016-10-19 20:32:00 +02:00
baldurk 652c4dfe22 Update expected size of FetchFrameRecord to account for increased stats 2016-10-19 19:41:58 +02:00
baldurk 9fb7cb81db Don't pass potentially remote path to Path.GetFileName. Refs #400 2016-10-19 19:14:58 +02:00
baldurk 459619ff0c Don't try to access file on local disk in statistics. Refs #400 2016-10-19 19:12:41 +02:00
Alberto Taiuti d1e5149527 Fix missing <math.h> header in qrenderdoc for Arch/clang++
Add the <math.h> header to some of the source files for the target
qrenderdoc. The build would not have succeded without these headers
declaration under Arch Linux/clang++.
2016-10-19 18:55:50 +02:00
baldurk ae06f86a1c 32-bit compile fixes (casts from uint64_t to size_t) 2016-10-18 21:02:58 +02:00
baldurk b8520a274d Fix compile errors on CI targets 2016-10-18 19:35:01 +02:00
baldurk 2fe22e96b5 Add support for tracking and saving mid-frame and persistent maps 2016-10-18 19:10:06 +02:00
baldurk 681eb21b0a Fetch debug messages before clearing the list 2016-10-18 19:08:47 +02:00
baldurk e959d4b826 Implement query functions (without applying predication on replay) 2016-10-18 16:27:30 +02:00
baldurk 812e4affd3 Tidy up remaining functions marking not-implemented stuff 2016-10-18 15:54:23 +02:00
baldurk 4dbfe17747 Use event usage to guess at buffer creation flags 2016-10-18 15:31:44 +02:00
baldurk cf5bf6f166 Track buffer usage as Indirect parameter buffer 2016-10-18 15:31:43 +02:00
baldurk 17493e9158 Track resources created with a cubemap SRV, to mark them as cubemaps 2016-10-18 15:31:42 +02:00
baldurk b220a61d79 Not sure complex resource releasing logic is needed
* I think we're mostly covered by the requirement that resources stay
  alive until GPU execution is finished.
2016-10-18 15:31:42 +02:00
baldurk 4253094557 Track resource event usage 2016-10-18 15:31:41 +02:00
baldurk 2d19d953c5 Handle debug messages on list execute
* It's not clear if the debug layer can usefully provide messages at a
  specific event or even a specific submission.
2016-10-18 13:06:57 +02:00
baldurk 5329bd4695 Serialise Wait() and SOSetTargets() 2016-10-18 12:30:55 +02:00
baldurk 99b45aefb5 Minimal possible residency handling code
* We unwrap objects and track residency state, and when preparing init
  states if necessary then we make those resources resident and sync the
  list execute so we can evict them again immediately afterwards.
* On replay, all resources are created and left as resident, which could
  go over the budget available. If a frame uses close to or more than
  its total budget over the course of a frame this could fail. One fix
  to that would be to track referenced resources in command lists at
  replay time, and only make resident what we need for each list and
  execute them in isolation, then evict right after (so all frame
  resources are 'default evicted').
2016-10-18 12:12:54 +02:00
baldurk ca3e394c19 Add proper locking around check of CAPFRAME state 2016-10-18 12:04:07 +02:00
baldurk e4cc738a13 Ignore D3D12 debug message about NULL map ranges 2016-10-18 12:03:16 +02:00
baldurk 529f230e4e Don't directly frame-reference lists being executed
* It's no longer needed as they don't have direct parents anymore, and
  it can break in cases where a list is being re-recorded while a
  frame capture is on-going (but hasn't been baked).
2016-10-18 12:02:21 +02:00
baldurk 63f505c95e Delete frame capture record on shutdown 2016-10-18 10:38:53 +02:00
baldurk 3cf71f158a Perform copies on wrapped descriptors so internal tracking is updated 2016-10-18 10:38:53 +02:00