Commit Graph

11459 Commits

Author SHA1 Message Date
baldurk 496bbbe976 Don't allocate chunks from allocator when data is external
* This can lead to lifetime issues if the allocator is reset and now the
  external-data pointer or bool can be trashed. Instead if the data allocation
  can't come from the allocator, allocate both data and chunk externally.
2020-09-15 13:11:37 +01:00
baldurk 9877b63595 Fix disassembly of relative-addressing operands in DXBC
* Most of the time we can map this to a reflection variable but if we can't, we
  must print the correct index.
2020-09-15 11:24:06 +01:00
baldurk 4ec6281856 Fix disabled convenience test for unit testing DXBC 2020-09-15 11:23:34 +01:00
baldurk c8fcdbae05 Update fetch_shader python example to latest API 2020-09-14 15:58:20 +01:00
baldurk 8615c5fc14 Speculative support for 10-bit backbuffers on GL 2020-09-14 15:30:49 +01:00
baldurk ce1cfe5330 Provide more specific error on external-imported resources
* When capturing some external memory driver implementations have completely
  disjoint memory type bits allowed for external and non-external resources.
  This means it is impossible to capture it as external and then replay it as
  non-external, leading to a broken capture.
* This is warned about at capture time but easy to miss. Adding this error here
  is more likely to be seen and found.
2020-09-14 15:27:46 +01:00
Omar El Sheikh 60eb2c5ab7 Handle pNext Chain for Android External Memory
Updated vk_next_chains.cpp to handle serializing of the new structs

Updated VkCreateInfo function to check for Android External Buffer

Fixes to vk_serialize.cpp to serialize structs properly
2020-09-14 15:19:51 +01:00
Omar El Sheikh 6236f2b6c1 Added Struct Handling/Serialization
Added initial support for these structs:
*VkAndroidHardwareBufferPropertiesANDROID
*VkMemoryGetAndroidHardwareBufferInfoANDROID
*VkAndroidHardwareBufferFormatPropertiesANDROID
*VkExternalFormatANDROID
*VkAndroidHardwareBufferUsageANDROID
*VkImportAndroidHardwareBufferInfoANDROID
2020-09-14 15:19:51 +01:00
Omar El Sheikh f5786077e5 Added Android Hardware Buffer Extension Support
Added support for the VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER
device extension on Android
*Created necessary hooks for vkGetAndroidHardwareBufferPropertiesANDROID
and vkGetMemoryAndroidHardwareBufferANDROID
2020-09-14 15:19:51 +01:00
baldurk 1286f4b272 Fix issues identified by synchronisation layer 2020-09-14 13:01:14 +01:00
baldurk 213e19be01 Fix double-delete of immediate context on D3D11 2020-09-14 12:33:28 +01:00
baldurk c455fa9d49 Fix broken Unwrap() on D3D12 2020-09-14 12:31:57 +01:00
baldurk 76d91d5eef Don't allow static logfile string to destruct before RenderDoc singleton 2020-09-12 23:18:04 +01:00
baldurk ac8a90ebbe Fix refcounting of D3D12 shader objects 2020-09-12 23:16:15 +01:00
baldurk 433a51cf64 Fix replay refcounting of D3D11 objects 2020-09-12 23:15:44 +01:00
baldurk 50ebd8d379 Fix mistake enabling BDA capture replay if original BDA wasn't enabled 2020-09-12 23:15:17 +01:00
baldurk 6225c83d12 Fix handling of CreateCommandList1
* We would accidentally ignore the first Reset() call by attempting to avoid the
  fake Reset() that CreateCommandList creates.
2020-09-11 20:52:10 +01:00
baldurk 925b49daa6 Fix handling of instance extensions in vulkan tests 2020-09-11 18:51:27 +01:00
baldurk 8ca96aa83a Fix arrays of UBOs not displaying properly in vulkan pipeline state 2020-09-11 16:32:17 +01:00
baldurk 0d70327b21 Store resource type directly in VkResourceRecord
# Conflicts:
#	renderdoc/driver/vulkan/vk_resources.h
2020-09-11 16:31:10 +01:00
LukeRoss00 33a1c9b2c6 Update win32_callstack.cpp
Module offset was mistakenly being erased together with .pdb extension
2020-09-11 15:31:31 +01:00
baldurk 966db7bdb0 Add some more identified markers 2020-09-10 22:57:22 +01:00
baldurk 809b8f9f29 Add fallback on android if gpu debug layers are broken or inaccessible 2020-09-10 16:41:35 +01:00
baldurk 255f457c0b Fix crash accessing non-running thread 2020-09-10 15:30:04 +01:00
baldurk d671c66bea Remove reliance on wrapped pool IsAlloc
* In most cases we either know the type, or we can use the generic parent
  WrappedDeviceChild11 to get what we want.
2020-09-10 14:45:46 +01:00
baldurk fdeea5204d Refactor and optimise D3D11 refcounting implementation
* In heavy D3D11 workloads the refcounting overhead especially during fast
  binding changes was significant. Refactoring the refcounting to work on a
  different model and deferring destruction of objects removes most of the
  overhead.
2020-09-10 13:35:32 +01:00
baldurk fb19ccb535 Don't pool-allocate D3D12 shaders 2020-09-10 13:35:16 +01:00
baldurk e9360a819f Don't pre-allocate such large wrapped pools
* The cost of searching a few more pools to check allocations isn't so bad
  especially if we can move IsAlloc() off the hot path. Better that than
  allocating 100MB in pools.
2020-09-10 13:35:16 +01:00
baldurk 3b04aa227b Reduce the memory footprint of D3D12 objects 2020-09-10 13:34:44 +01:00
baldurk 2eb39ef8fe Check that shiboken/pyside targets exist
* Some ways of installing pyside provide a cmake script that's broken and
  doesn't produce actual libraries/headers to link against.
2020-09-10 13:34:28 +01:00
baldurk 10a0153511 Make Shiboken2/PySide2 searches QUIET to avoid scary warnings
* By default cmake will print huge scary warnings if the packages aren't
  available instead of silently continuing and letting us check, which is a bad
  default for optional packages.
2020-09-10 11:49:16 +01:00
baldurk 7cd7616401 Serialise max anisotropy level in GL texture & sampler initial states 2020-09-09 16:40:07 +01:00
baldurk 78f1f8f3d1 Remove volatile from Atomic parameter declarations
* This was leaky from windows' InterlockedIncrement etc declarations, and is not
  necessary.
2020-09-09 16:40:04 +01:00
baldurk 3f26f42541 Fix enabling of bufferDeviceAddressCaptureReplay
* We only enable this if we find an existing struct somewhere enabling the base
  feature. Otherwise we might try to enable this when it's not supported at all.
2020-09-09 16:40:00 +01:00
baldurk 75cb5d18d6 When memory has a dedicated allocation buffer, use it for wholeMemBuf 2020-09-08 12:57:01 +01:00
baldurk 3d5aabdd80 Make sure to enable bufferDeviceAddressCaptureReplay on replay
* We used to get this 'for free' by serialising our patched device next chains,
  but we no longer do that so we need to enable this bit on replay as well.
2020-09-08 12:57:01 +01:00
baldurk 218ce2abf7 Set NULL descriptor updates to valid offset/range 2020-09-08 12:57:01 +01:00
baldurk 515d4c5dc3 Ignore generated initial states for images with no memory bound 2020-09-08 12:57:00 +01:00
baldurk facf150efe Properly refresh all rows when filter model changes 2020-09-08 12:57:00 +01:00
baldurk 47b972c8fb Set priority only after thread is running 2020-09-08 12:57:00 +01:00
baldurk b1c12ce1ae Don't re-order chunks for indirect draws. Closes #2042
* If we insert chunks next to the recorded commands for indirect draws we need
  to update all other commands which are recorded but not submitted which have
  chunk indices. Updating this could be very complex if the command buffer
  record is only partially complete when the submit happens (which is quite
  possible if it's not submitted until later), so instead we abandon trying to
  have indirect chunks next to the recorded command chunks since it's not
  strictly necessary.
2020-09-07 18:09:04 +01:00
baldurk 8def317971 Don't use separate xfb objects without ARB_transform_feedback2 extension
* EXT_transform_feedback allow us to use what we want and is core in the minimum
  replay version (3.0 for GL/GLES), but it doesn't include separate xfb objects.
2020-09-07 16:58:49 +01:00
baldurk 9b46bf7c91 Don't reset chunk allocator mid-capture
* We may still need these chunks for previously submitted frames if we're saving
  everything in a capture.
2020-09-07 11:56:24 +01:00
baldurk b522224572 Fix the wrong context params being serialised for implicit thread switch 2020-09-07 11:44:57 +01:00
baldurk fb178c4602 Fix missing thread sync when checking for GCN ISA support 2020-09-07 11:44:42 +01:00
baldurk f446307d12 Add missing Qt header 2020-09-05 00:21:15 +01:00
baldurk eaa24f859d Mac compile fix 2020-09-05 00:00:31 +01:00
baldurk fb3c293621 Create a default SRV/UAV descriptor when needed. Closes #2040
* In D3D12 if the user passes NULL for the UAV or SRV descriptor when calling
  Create*View we don't have the runtime to generate a default one for us when we
  query, we'll just have nothing stored. So instead when we need to generate a
  default "whole resource" descriptor to look up.
2020-09-04 23:23:31 +01:00
baldurk a2fa98becd Move QNetworkAccessManager access onto separate thread
* QNetworkAccessManager is supposed to be asynchronous and threaded internally,
  but calling get() the first time can take multiple *seconds* while it
  initialises proxy data and loads ssl libraries.
* Qt's threading rules are so strict it's impossible to feasibly move
  QNetworkAccessManager to another thread.
* Instead we use Qt's cross-thread signals and slots to move the whole thing
  into a wrapper object. It's stupid.
2020-09-04 19:39:11 +01:00
baldurk ecd23041a4 Don't delete thread in LambdaThread until destructor
* This means a non-self deleting thread can be waited for or queried about still
  after it's completed.
2020-09-04 18:34:28 +01:00