Commit Graph

11407 Commits

Author SHA1 Message Date
baldurk 2bfa2c0ced Move histogram/minmax shaders into vulkan shader cache
* This lets us cache all shaders instead of having some be regenerated outside
  the cache and looked up into it.
2020-09-04 16:39:42 +01:00
baldurk 311dcb989b Default to D3D11 pipeline state at the last minute
* If we default to D3D11 at construction time, if we have persist data (very
  likely) and it's for another API then we'll have to destroy the D3D11 viewer
  and recreate the other API's viewer.
2020-09-04 15:02:04 +01:00
baldurk acd755324e Load main window initial layout before running python scripts 2020-09-04 15:00:16 +01:00
baldurk d55cf930f8 Don't make command line parsing a fatal error 2020-09-04 14:59:17 +01:00
baldurk eba6f5251c Add success logs when each renderpass segment is verified
* It makes the log easier to read and so we know which part we're at if a pixel
  fails.
2020-09-04 12:51:56 +01:00
baldurk 5a6feec9c1 Speculative fix for intermittent failure in GL_Multithread_Rendering
* It seems like on nv windows we need to explicitly rebind the main context to
  the main thread and give each worker thread its own window, to prevent the
  worker thread from being unable to bind its context sometimes.
2020-09-04 12:39:04 +01:00
baldurk 9fc97f6097 Erase m_CurrentResources from the end not the beginning
* Since it's a sorted vector this avoids O(n^2) time to erase everything one by
  one.
2020-09-04 12:06:09 +01:00
baldurk 9b37a8b8a7 Don't print renderdoc log to stdout when running tests 2020-09-04 12:05:48 +01:00
baldurk 55ac2c95a8 Tweak handling of failed tests in artifacts log 2020-09-04 11:50:02 +01:00
baldurk 6de8c53f85 Fix VK_Extended_Dynamic_State 2020-09-04 11:39:10 +01:00
baldurk d524eb8cc8 Fix overlay bugs with extended dynamic state 2020-09-04 11:29:12 +01:00
baldurk c96b05ec3b Fix primitive topology from extended dynamic state not being respected 2020-09-04 11:29:01 +01:00
baldurk 0e7bdc4cc7 Fix python call to GetDisassemblyTargets 2020-09-04 10:43:36 +01:00
baldurk 18a7e3c05c We shouldn't return physical device entry points in vkGetDeviceProcAddr
* The spec says we only return a function pointer for device or device-child
  functions. In practice the loader wraps instances and physical devices so when
  calling a direct GDPA returned function the loader won't unwrap it so we won't
  get our proper wrapped objects and will crash.
2020-09-04 10:32:17 +01:00
baldurk 0c71c71645 Store command buffer page set in baked commands. Closes #2039
* If we keep the page set in the command buffer and destroy it on reset, we'll
  free the pages behind the baked chunks that we stored. If a capture records
  and resets a command buffer multiple times within a capture we need to store
  multiple baked command buffers.
* So instead we give the baked commands ownership of those pages and reset them
  when the baked commands record is destroyed (either because the command buffer
  has been reset as it was before - or if we hold onto a reference during
  capture then after the capture is done).
2020-09-03 18:58:30 +01:00
baldurk 56f82f6bf1 Optimise UI for large descriptor arrays with few dynamically used binds
* We tune the pipeline state view and texture viewer to only iterate over a
  small list of dynamically used binds in the (vastly more common) case where
  unused binds are not being shown.
2020-09-03 18:09:47 +01:00
baldurk afe3bee92d Only lock in resource manager while capturing
* On replay currently we only have single-threaded access so the lock is just
  overhead
2020-09-03 18:08:39 +01:00
baldurk 54286833bf Switch some maps to unordered_map where we only use them for lookups 2020-09-03 18:08:35 +01:00
baldurk ec023ac660 Avoid unnecessary re-layouts when populating thumbnails 2020-09-03 18:07:47 +01:00
baldurk c39a0bae5f Re-jig Following to hold a reference to TextureViewer
* This simplifies the code flow because we can be sure that we always have
  cached read-only/read-write resources (this was true before, but now it's
  clear).
2020-09-03 18:07:47 +01:00
baldurk 4dbfca2390 Add std::hash overload for ResourceId to allow use in hashmaps/hashsets 2020-09-03 18:07:46 +01:00
baldurk 3ac8746b01 Auto-size log view columns by hand
* Using the auto-resizing mode of RDHeaderView resizes based on the whole column
  every time, which is wasteful when only a few lines are added to a large log.
2020-09-03 17:45:41 +01:00
baldurk d71d275dc4 Don't re-read entire logfile every time, only read from last position 2020-09-03 17:45:41 +01:00
baldurk da0c836aef Cache bufferviewer column width calculation 2020-09-03 17:26:48 +01:00
baldurk 31b81ade3c Switch descriptor refs lock back to normal lock
* Unfortunately some programs have extreme contention on this lock due to
  multithreaded descriptor set writes enabled by UPDATE_AFTER_BIND.
2020-09-02 10:22:11 +01:00
baldurk 55febc88c4 Check shiboken2's python version matches python version we're linking to
* We also reverse Python_ADDITIONAL_VERSIONS so it finds the newest one. It
  doesn't seem like there's a way in general to make these match, so we hope
  that searching from newest to oldest will find the same in both - or at least
  it makes it easier for the user to fix by installing the newest in both.
2020-09-01 17:39:05 +01:00
baldurk 3b9b0d8887 Check that both pyside2 and shiboken2 are found
* It seems like packaging of these two is inconsistent, and pyside2 dev files
  being available doesn't always imply shiboken2 dev files are present. Be safe
  and check both.
2020-09-01 17:20:52 +01:00
Andreas Hollandt f32262ad24 support Intel performance counters on Windows 2020-09-01 16:59:08 +01:00
baldurk 10878bb5a9 Never clamp to an invalid index even for invalid inputs
* This prevents a crash as at least index 0 is always a valid scalar lookup.
2020-09-01 16:39:19 +01:00
baldurk 83f7a26ee9 Query which shader disassembly formats require a pipeline
* This allows us to be a bit more friendly in the UI when we don't have a
  particular pipeline associated with a shader.
2020-09-01 14:03:59 +01:00
baldurk 6b2f763bfa Ignore sets of empty name strings on resources 2020-09-01 11:09:03 +01:00
baldurk 865f9002da Keep remote server connection alive if it disconnects mid-replay
* We need to keep it alive until we've shut down the replay controller, and we
  keep that alive until the user explicitly closes the capture.
2020-09-01 11:08:01 +01:00
baldurk 9f5e6a725b Batch calls to UpdateBackgroundRefCache on descriptor copies 2020-09-01 10:42:42 +01:00
baldurk eb575e12ef Don't hook vulkan-1.dll, prevents layered implementations from recursing 2020-09-01 10:36:28 +01:00
baldurk d6b36f7abf Fix handling of saving cubemaps to disk in GL
* GL needs special handling because cubemaps need to be treated partially as
  arrays to select the target, then not as arrays when the data is retrieved.
2020-09-01 10:32:48 +01:00
baldurk e61794dd88 Don't forcibly change tab in texture viewer when one is closed 2020-09-01 10:27:45 +01:00
baldurk b5a6796240 Allow qrenderdoc command line python scripts to call sys.exit()
* Previously we'd catch the sys.exit "exception" and print it then show the
  window.
2020-08-31 13:10:38 +01:00
baldurk d5f45f6476 Allow overriding the python install on windows
* Also document the new requirement for os.add_dll_directory as of python 3.8
2020-08-31 12:38:49 +01:00
baldurk 8b935a1c11 Wrap and serialise calls through ID3D12CompatibilityDevice 2020-08-31 10:51:32 +01:00
baldurk 052cd255e8 Don't initialise AMD extensions during capture 2020-08-31 10:43:19 +01:00
baldurk 0ca90bd34e Fix variable descriptor count test 2020-08-31 10:10:51 +01:00
baldurk 4e8f96ac3f Re-enable chunk allocators on vulkan, reset individual pages
* On vulkan command pools aren't necessarily reset often or at all, individual
  command buffers are. So the chunk allocator needs to support freeing subsets
  of pages. When a command buffer ends we force that page to finish up and store
  a list of the pages the command buffer used, which can then be reset back when
  the command buffer is reset.
2020-08-28 20:54:19 +01:00
baldurk 05eef7b99a Temporarily disable chunk allocator on vulkan until reuse is fixed 2020-08-28 19:27:00 +01:00
baldurk 30ecf66cca Fix handling of variable descriptor counts to not allocate maximum size
* We previously ignored the variable descriptor size allowed by descriptor
  indexing,
2020-08-28 19:06:06 +01:00
baldurk 75f2dc119c Fix missing free() calls for miniz allocations 2020-08-28 19:06:06 +01:00
baldurk 0e5b08d0e1 Fix test compilation on linux 2020-08-28 19:06:06 +01:00
baldurk 482bdbae6f Allow building from a custom Qt more easily on windows
* Setting RENDERDOC_QT_PREFIX64 or RENDERDOC_QT_PREFIX32 environment variables
  pointing to a Qt install root will use that instead of the built-in Qt.
2020-08-28 19:06:06 +01:00
baldurk 716c72f399 Remove custom FindPySide2.cmake, rely on normal packaging
* It seems PySide2 packaging is much more stable now, so we can generally rely
  on the distro packages.
2020-08-28 19:06:06 +01:00
baldurk 285c4b95df Add Qt5Qml.dll stub for 32-bit pyside2 distribution
* When the pyside2 we ship was built it accidentally included a small dependency
  on Qt5Qml, which we don't distribute so the pyside2 libraries wouldn't load.
* We can generate a tiny stub with the right exports and load it manually from
  the PySide2 folder on 32-bit qrenderdoc builds to allow pyside2 to load
  subsequently. The stub source is tiny, and added alongside.
* Putting it in the PySide2 folder means that even if someone puts RenderDoc's
  build folder in their PATH, our stub Qt5Qml won't break anything because it
  won't be loaded. If they put PySide2 in the PATH it might, but then it's their
  fault!
2020-08-28 19:06:05 +01:00
baldurk 0c1b304917 Verify JSON documents being saved don't contain byte arrays
* Newer Qt versions will base64 the byte arrays even if we've already base64'd
  them so they're safe. To prevent this we explicitly convert to QString
  afterwards.
2020-08-28 19:06:05 +01:00