Commit Graph

11343 Commits

Author SHA1 Message Date
baldurk ecbfeb7dc1 Fix linux compilation 2020-08-27 00:02:17 +01:00
baldurk 50089207c1 Fix 32-bit compile error 2020-08-26 20:56:28 +01:00
baldurk 8973ac0241 Don't serialise present chunk for glFrameTerminatorGREMEDY 2020-08-26 19:52:34 +01:00
baldurk f63a948392 Cache FBO attachments to avoid repeated query & lookup 2020-08-26 19:27:42 +01:00
baldurk 3a1b4500ee Avoid some unnecessary potentially expensive work on frequent calls 2020-08-26 19:27:42 +01:00
baldurk 022ba9ce67 Combine GL maps for looking up ID/Resource Record from resource name 2020-08-26 19:27:42 +01:00
baldurk 5e79465ab5 Avoid use of virtual function call for GetID within GL driver 2020-08-26 19:27:42 +01:00
baldurk c5887eb4e4 Reduce wasted iteration in GLRenderState::MarkDirty
* Only iterate up to the highest known bind for indexed targets, which will
  generally be low or 0.
2020-08-26 19:27:42 +01:00
baldurk 61d15e00ef Don't create empty GLRenderState for use with MarkDirty
* MarkDirty re-queries the state and doesn't use anything so it's wasted time
  initialising a massive structure
2020-08-26 19:27:42 +01:00
baldurk 55c62dd307 Serialise timestamps and durations as tick counts, and convert on replay
* When we're capturing programs with high-frequency enough API calls, the
  overhead of the math & extra function calls over Timing::GetTick() is
  measurable. Removing it and serialising pure tick based durations/timestamps
  and then converting on replay gives us identical results and saves time while
  background capturing.
2020-08-26 19:27:42 +01:00
baldurk 9fd7f447d2 Switch thumbnail to bytebuf instead of byte pointer and length 2020-08-26 19:27:42 +01:00
baldurk 51b228b042 Disable resource record chunk locking for command buffers
* The API user is supposed to lock this for us, so don't waste time locking
  ourselves.
2020-08-26 19:27:42 +01:00
baldurk 1b844d1498 Add resettable chunk allocator for recording command buffers 2020-08-26 19:27:41 +01:00
baldurk d922db6dff Fix broken re-use of resource shadow deferred ctx pointers. Closes #2023 2020-08-26 19:14:42 +01:00
baldurk 62f55a374c Add proper fence around overlay rendering command buffers 2020-08-26 18:46:56 +01:00
baldurk a457aa5a8f Fix handling of CONCURRENT swapchain images 2020-08-26 18:46:56 +01:00
baldurk f664d13bfc Clear up queue data when device is destroyed 2020-08-26 18:46:56 +01:00
baldurk 753806d526 Add a specialisation for buffer reference add/remove
* This skips some potentially expensive (and redundant) checks if the buffer is
  a view.
2020-08-25 17:24:23 +01:00
baldurk f013824f97 Cache D3D11 buffers being read-only to speed up bound-for-write checks 2020-08-25 16:16:39 +01:00
baldurk a32bf777be Add extra case to assert 2020-08-24 10:52:30 +01:00
baldurk 155d455f01 Fix typo in glClearFramebufferfv variants 2020-08-24 10:04:23 +01:00
baldurk a6871327aa GL renderbuffers do not have mips, return early from function
* Some of the other sub-functions don't handle non-texture targets
2020-08-21 11:49:44 +01:00
baldurk 409f256411 Fix event ID indexing for multidraw commands on GL. Closes #2019 2020-08-21 11:49:44 +01:00
Tim Gfrerer 07ee28c97f Allow Python 3.8 to be detected
Adds python 3.8 to the list of python 3 versions. 

Thank you so much for renderdoc!!
2020-08-21 11:07:11 +01:00
baldurk 5c0dadae84 Test that RTV descriptor copies in D3D12 are properly recorded mid-frame 2020-08-20 17:09:51 +01:00
baldurk 3e100109da Test destroying/freeing NULL handles, fix validation errors 2020-08-20 17:02:03 +01:00
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