Commit Graph

11317 Commits

Author SHA1 Message Date
baldurk 0b0beb3a20 Call virtual functions by explicit class in constructor 2020-08-20 16:11:05 +01:00
baldurk 81fbf4bcc9 Fix some dodgy memcpy calls 2020-08-20 16:11:05 +01:00
baldurk 112741a74c Remove some parameter name shadowing 2020-08-20 16:11:05 +01:00
baldurk fa24dc8872 Silence some PVS warnings 2020-08-20 16:11:05 +01:00
baldurk b5de095f53 Use explicit enum comparisons to check for empty flags 2020-08-20 15:26:02 +01:00
baldurk 52632ccc1c Fix incorrect array index used in disassembly 2020-08-20 15:26:02 +01:00
baldurk 274185f808 Fix wrong size for memset 2020-08-20 15:26:02 +01:00
baldurk c01dd73bf6 Remove some dead code/variables 2020-08-20 15:26:02 +01:00
baldurk 64f98f286e Add test of heavy descriptor reallocation and reuse 2020-08-20 13:48:17 +01:00
baldurk 077aebc9e1 Fix sanitisation of aspect mask in subresource range 2020-08-20 10:49:23 +01:00
baldurk 83714b825c Remove note about android support being new 2020-08-20 10:47:16 +01:00
baldurk a48ab556f3 Fix compile errors 2020-08-19 19:18:37 +01:00
baldurk ffac439cce Record which queries are reset in each frame & restore them to validity
* It's possible that a frame capture could copy from a query and then reset it,
  without then recording something valid into the query. Then the next replay
  the copy would be unavailable and if WAIT_BIT is set that would lead to a
  device lost.
* We already fill out queries with dummy valid data on create time, so now we
  record any queries that are reset and re-fill them with valid data again.
2020-08-19 18:02:03 +01:00
baldurk 4afc97e6dd Fix backwards assert 2020-08-19 17:57:50 +01:00
baldurk 213aded173 Fix compilation of single flush validate 2020-08-19 16:35:58 +01:00
baldurk 15f35931df Fix wrong string format specifier 2020-08-19 15:21:00 +01:00
baldurk 73cc1f5476 Add specialised rdcarray which implements key/value lookup 2020-08-19 15:21:00 +01:00
baldurk d2e0b7ceb1 Implement move semantics support for rdcarray/pair 2020-08-19 15:21:00 +01:00
baldurk babbdadc36 Cache a single value inline in ImageSubresourceMap
* Having a single subresource (range) is a common case, so avoid allocating
  storage in an array for that, only switch to the array when we have more than
  one range to store.
2020-08-19 14:24:51 +01:00
baldurk 8a350f28c8 Batch updates to background ref cache
* If the background cache is empty also (for a descriptor set that has never
  been written before) we can duplicate it straight from bindFrameRefs).
2020-08-19 14:24:51 +01:00
baldurk 0859aaa163 Change descriptor set lock to spinlock
* We don't expect contention on this, the only time it will contend is when
  actively capturing a frame between updates and submits reading the descriptor
  contents, so we penalise that case while making the background case faster -
  since a spinlock is 'free' to take when there's no contention.
2020-08-19 14:24:51 +01:00
baldurk 6eca4a4cd4 Cache call to FormatImageAspects 2020-08-19 14:24:51 +01:00
baldurk d0f59de405 Re-use descriptors in descriptor pool
* If an application allocates from and resets descriptor pools at very high
  frequency the overhead of freeing and reallocating those descriptor sets can
  be high. Instead use the descriptor pool as a pool for children and look up
  the freelist first for an existing descriptor set before trying to allocate a
  new one.
2020-08-19 14:24:51 +01:00
baldurk 488a9e3faf Block allocate storage for current descriptor set bindings 2020-08-19 14:24:51 +01:00
baldurk 78e2475dad Use a read/write lock for resource record access in resource manager 2020-08-19 14:24:51 +01:00
baldurk 7cc54fea20 Pass resource record into AddBindRefs when available
* This avoids a redundant call to GetResourceRecord when the caller already has
  it directly available.
2020-08-19 14:24:51 +01:00
baldurk 88c6dc27e4 Use plain array instead of set for resource record parents array 2020-08-19 14:24:51 +01:00
Thomas Poulet 7a65dba274 Fix dry-run option in CreatePipelineLibrary
This commit addresses an issue where the application is crashing when receiving nullptr in ppPipelineLibrary. As per the specifications, ppPipelineLibrary can optionally accept nullptr and perform a dry run. Since pipeline libraries are not supported, we return the driver unsupported case.
https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device1-createpipelinelibrary
2020-08-18 14:22:30 +01:00
baldurk 466debe9a4 Clean background frame references every 20 submits
* This means the background references array won't build up even for programs
  that don't present.
2020-08-17 12:44:47 +01:00
baldurk bf8390d313 Fix docker build to work with https apt sources 2020-08-17 10:26:30 +01:00
baldurk 01e05e6d96 Cancel a rename in progress if a different resource is selected 2020-08-17 10:22:23 +01:00
baldurk 7f1748e8fc Don't misbehave when freeing or destroying VK_NULL_HANDLE 2020-08-14 19:48:21 +01:00
baldurk 2b990bdf46 Remove RightToLeft property that was accidentally added 2020-08-14 19:19:16 +01:00
baldurk e7657f6212 Use QTextBoundaryFinder to truncate resource names 2020-08-14 14:58:16 +01:00
baldurk bf2cee8bc5 Fix D3D12On7 presents not properly adding frame capturer 2020-08-14 14:58:15 +01:00
baldurk 73248c8488 Include RenderDoc logfile after test runs 2020-08-14 14:58:12 +01:00
baldurk e11c3523a6 Fix subprocess timeout not properly kicking in 2020-08-14 14:58:08 +01:00
baldurk 407b4740f2 Re-evaluate composite spec constants when data is available. Refs #1908 2020-08-13 12:27:00 +01:00
baldurk bc3f23e867 Add missing bounds check for 32-bit indices 2020-08-13 11:36:07 +01:00
baldurk aac929af8f Go back to reporting normalised vertex inputs on GL as SNorm/UNorm
* This is still accurate, what we're missing is "read data as int, then cast to
  float" which is represented by setting 'floatCast' to true. A normalized cast
  or interpret is accurately represented by saying the input is snorm/unorm
  typed.
2020-08-13 10:22:56 +01:00
baldurk 9df6103be4 Remove debug log left in 2020-08-12 15:15:33 +01:00
baldurk 61c6d88b7d Update reftype on rollover from one binding to another
* When we roll over from one binding to another due to descriptor count being
  larger than a single binding, we need to update the frame reftype since it
  might go from storage to sampled or vice-versa and so change from read-only to
  read-write.
2020-08-12 15:15:33 +01:00
baldurk d274599880 Remove IDs from background ref cache as appropriate
* This prevents the cache from growing unbounded.
2020-08-12 15:15:33 +01:00
baldurk e2e7c1f80c Add the ID for the resource underneath image views
* Without this we don't properly cache the references for images, only for
  views.
2020-08-12 15:15:33 +01:00
baldurk b0d3fb12a9 Don't perform queue submit until after flushing maps/references
* While active capturing we might do significant work to flush coherent mapped
  memory regions and prepare initial contents for postponed resources that are
  about to be write-referenced. We need to do that before submitting the actual
  work to the queue or else the contents may be corrupted.
2020-08-12 15:15:33 +01:00
baldurk 50b2964c88 Don't dirty memory on allocation, wait until a buffer is bound
* Otherwise we'll prepare and serialise contents for memory that's only used for
  images, which is wasteful at best.
2020-08-12 15:15:32 +01:00
baldurk 7f9b5d1103 Detect mapped memory writes to tiled images and skip. Closes #1863
* We track memory bindings to see which regions of a memory object are only used
  for tiled images, and discard any writes in case this was accidental detection
  of changes by the GPU which we don't want to replay. In the case of aliasing
  if there's linear and tiled resources then we still replay the writes.
* Note that we have to take a slower path involving a copy since we can't
  serialise straight into memory in this case, so applications should avoid
  mapping memory behind
2020-08-12 15:15:32 +01:00
baldurk 18689e3b89 Fix handling of deprecated debug marker object type enums 2020-08-10 16:12:40 +01:00
baldurk 6bb177ec02 Lazily create readback buffer
* This means we don't allocate a large buffer even though we won't actually use
  it. Most important for memory constrained platforms like android.
2020-08-10 16:09:32 +01:00
baldurk c456d16fc7 Avoid crash if mapped memory is changed while diffing 2020-08-10 15:28:24 +01:00