Commit Graph

11415 Commits

Author SHA1 Message Date
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
baldurk a0eadf47f5 Push GCN ISA support checks onto separate thread
* The executables can take a little while to run, so we can do that in parallel
  while loading the capture.
2020-09-04 17:43:32 +01:00
baldurk 54db5aaf3b Store entries in vulkan shader cache for GLSL generation inputs
* GenerateGLSLShader is reasonably expensive because it uses glslang to
  preprocess the shaders. If we can cache the input hash and look up the cache
  with that hash then we can skip it entirely.
2020-09-04 16:53:38 +01:00
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