Commit Graph

4185 Commits

Author SHA1 Message Date
baldurk e7d092cdaf Check format/sample support for creating MSAA <-> Array renderpasses 2017-08-03 17:57:16 +01:00
baldurk 5c934f564e Don't create the AMD counters while capturing 2017-08-02 21:05:04 +01:00
baldurk 0d1c9c39fe Remove the D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE flag on replay
* This flag is purely an optimisation, it's never invalid to remove it.
2017-08-02 21:04:51 +01:00
baldurk ba67c3214b Don't name a resource before checking if it created successfully 2017-08-02 21:04:22 +01:00
baldurk 1708bee968 Use _exit instead of exit if exec() fails after forking
* Otherwise if we call exit() it can ruin the parent process by calling
  atexit(), signal handlers, and other things.
2017-08-02 15:30:59 +01:00
baldurk 9379633621 Ensure that dxbc file is disassembled before running debugging 2017-08-02 15:30:58 +01:00
baldurk eda02c2d11 Print the right platform-dependent amdspv executable name 2017-08-02 15:30:57 +01:00
baldurk f96874e5d1 Handle more error cases for VirtualContext 2017-08-02 15:30:56 +01:00
baldurk f5542ead7f Don't fetch possibly modified state when getting bound render targets 2017-08-02 15:30:55 +01:00
baldurk efbae91c5f Remove duplicated GCN (Capeverde) entry in device list 2017-08-02 15:30:54 +01:00
baldurk 4a1cd892f6 If SPIR-V compilation fails in glslang, store the error msg in "disasm" 2017-08-01 11:04:35 +01:00
baldurk 26c89b4a33 VirtualContext.exe doesn't return non-0 error code if context fails 2017-08-01 11:04:11 +01:00
baldurk 52c481bae2 Make HRESULT stringification prettier 2017-07-31 14:10:18 +01:00
baldurk 7b99bc6c6a Heap alloc enough space for uniforms, instead of only copying one elem
* Uniform arrays would be truncated after the largest single element
  size (a 4-wide double vector).
2017-07-31 10:41:51 +01:00
baldurk fb126d0f7e Initialise AMD extension pointer to NULL. Refs #708
* This means we can SAFE_RELEASE it safely.
2017-07-31 10:22:53 +01:00
baldurk 8aaa44d624 Fill out SPIR-V bytes array for compute pipelines 2017-07-28 19:06:40 +01:00
Janos Pantos 7d46b21fd6 Fix binary compatibility issue caused by 310ada8
Move the new multi-view chunk types to the end of GLChunkType enum.
2017-07-28 11:06:21 -07:00
baldurk fec5b60c67 Use the cached resource ResourceId inside views
* Slightly faster than calling to get the resource in WrappedView1 then
  looking up its ID.
2017-07-27 16:17:25 +01:00
baldurk 61db91eb42 Cache whether the current pipeline is partially-writing to OM targets
* This is updated whenever the OM bindings change, or viewport/scissors
  change. Much lower frequency than per-draw where we were calculating
  this information during capture.
2017-07-27 16:17:25 +01:00
baldurk 9f172daffc Don't mark renderstate dirty on each draw, mark dirty on bind
* Note this also means we can't mark resources clean when clearing them
  since you could bind -> clear -> draw and the resource wouldn't be
  re-marked dirty. This isn't much of a loss in precision though since
  usually any resource that's cleared is going to be dirty again in
  short order, so there's no point trying to track it in the hopes that
  it might stay clean.
* For the most part the code was doing this, but there were a couple of
  inconsistencies along the way.
2017-07-27 16:17:25 +01:00
baldurk d27c15a0ab Refactor render state to use cached resource ranges for views
* We also check for null resources and early out before fetching or
  constructing the range and doing the intersection test.
2017-07-27 16:17:25 +01:00
baldurk eba2c65870 Move ResourceRange out of the render state, and cache it in views
* We also store depth & stencil read-only state for DSVs and SRVs.
2017-07-27 16:17:25 +01:00
baldurk 5b828c8f9d Add template specialisations for GetIDForResource for most types
* This avoids having to go throug the pool checking when we know
  concretely what type we're looking up, we just need to cast to the
  wrapped type and fetch it.
2017-07-27 16:17:24 +01:00
baldurk 97e16e8333 Make sure to sync *all* GPU queues before processing ExecuteIndirect 2017-07-27 16:14:18 +01:00
baldurk 806876c540 Add a menu item to do nothing but replay the capture in a tight loop. 2017-07-27 16:14:17 +01:00
baldurk 2e8f559f51 Where available we replay to AMD markers as well as D3D12 markers 2017-07-27 16:14:17 +01:00
baldurk 72bae9bdc9 Re-organise debug marker handling during replay
* Where available or allowed, we replay the captured user markers.
* When we're doing partial replay and we only push some of the markers
  then stop, we keep track of how many were pushed so we can pop them
  again and keep things balanced.
* Also for renderdoc internal book-keeping around the frame replay
  itself we explicitly annotate the renderdoc internals
* On vulkan since there are no queue-level markers, we fire single-shot
  command buffers that do nothing but push/pop/insert a marker.
2017-07-27 16:14:17 +01:00
baldurk 180947ddcb Unify handling of extension fetching between capture & replay
* Instead of hardcoding which extension functions we fetch on replay,
  we do the same as on capture and fetch all functions for the
  extensions that are actually enabled.
2017-07-27 16:14:17 +01:00
Jimmy Lee 517251caee fixed vrapi swapchain mip level inaccuracy 2017-07-26 02:31:34 -07:00
Jimmy Lee 310ada841a gles multi-view support 2017-07-26 02:31:34 -07:00
baldurk fb1c75ab1c Don't fork to new process if we don't have anything to run
* If we fork and then exit it seems to leave weird processes around that
  hang around.
2017-07-25 20:34:38 +01:00
baldurk 7ba92df31e Fix incorrectly swapped for Vulkan/OpenGL ISA generation ability 2017-07-25 09:23:37 +01:00
baldurk 434534d2e3 Release DIA2 handles when shutting down callstack resolver
* Otherwise a handle is kept open to the PDB and you can't recompile.
2017-07-25 09:11:17 +01:00
baldurk d539fed918 Add support for VK_KHR_get_memory_requirements2 & dedicated_allocation
* Unverified as yet, but the former is relatively straightforward and
  not serialised, and the latter is quite similar to the NV dedicated
  allocation extension.
2017-07-21 18:52:15 +01:00
baldurk 001b6b4e92 Update to vulkan.h 1.0.55
* Drop support for now deprecated KHX sharing extensions:
  - VK_KHX_external_memory
  - VK_KHX_external_memory_capabilities
  - VK_KHX_external_memory_win32
  - VK_KHX_external_memory_fd
  - VK_KHX_external_semaphore
  - VK_KHX_external_semaphore_capabilities
  - VK_KHX_external_semaphore_win32
  - VK_KHX_external_semaphore_fd
  - VK_KHX_win32_keyed_mutex
* And add support for the KHR promoted versions (which are almost the
  same, with some minor changes).
2017-07-21 18:52:14 +01:00
Cody Northrop d66afc0144 android: Add ability to check RenderDoc support, try to fix it
After selecting an application to launch on Android, inspect it to see if
it contains the RenderDoc layer and required permissions. If it does not,
display a warning similar to desktop. When clicked, if only the layer was
missing, offer to patch the APK, uninstall, and reinstall, with the
warning that it doesn't work for all applications (or at all for GLES).
Also provides pointers to how to package the layer yourself.

The process works by using the host temp directory to pull the APK and
modify it.  If the steps fail for any reason, the log is populated and
patching is halted.
2017-07-21 10:29:46 -07:00
Cody Northrop 296854da73 strings: Helper to remove pattern from the end 2017-07-21 10:29:46 -07:00
Cody Northrop cde58e7326 process: Add a path to execute scripts 2017-07-21 10:29:46 -07:00
Cody Northrop 488820e291 FileIO: Move PATH searching into its own function 2017-07-21 10:29:46 -07:00
Cody Northrop c735a30750 os: Update LaunchProcess to consume all stdout before checking stderr
For commands that write to stdout multiple times before writing
stderr, the second ReadFile would hang indefinitely.  This was
seen using "adb pull" with a sufficiently large APK (~20MB).
2017-07-21 10:29:46 -07:00
Cody Northrop e0dfdedb24 android: Add execCommand and update adbExecCommand
This adds a convenient way to call out to commands other than adb
and see their result.  Updated adbExecCommand to use the new helper.
2017-07-21 10:29:46 -07:00
Cody Northrop 930cc2cfb0 posix: Don't modify env while getting app path
This code was inadvertently changing the working environment
of applications that called it.  Hasn't been a problem until
we started calling scripts which need PATH to remain good.
2017-07-21 10:29:46 -07:00
baldurk 1ff3da4a82 Split up C-comment in a multi-line macro that was confusing clang-format
* Every time clang-format applied to this file, it would add a new \
  on the end of the first line of the comment. Splitting it into two
  single-line C comments works around this behaviour.
2017-07-21 17:29:09 +01:00
baldurk 5b3ffcd5b1 Add --build-id link parameter on android so that symbols can be loaded
* Without this android studio/lldb can't load the symbols if the lib
  inserted in an apk has been stripped.
2017-07-21 17:24:47 +01:00
baldurk 1c75ee886c Restore single-channel selection for depth/stencil display
* Use color mask to prevent depth from being splatted out across all
  channels and writing into where 'stencil' data should be.
2017-07-21 17:21:19 +01:00
Jimmy Lee 06502e12c4 remap all depth format for gles depth fetch 2017-07-21 08:18:56 -07:00
Janos Pantos 74b343afe3 Add support for glBlendBarrier GLES core function 2017-07-20 11:22:47 -07:00
Janos Pantos 5123da2acd Add GLES 3.2 core header and its dependencies 2017-07-20 11:22:47 -07:00
Janos Pantos 6eac3dea9d Fix emulating luminance format during replay 2017-07-20 09:51:17 -07:00
Janos Pantos 5af1aa5cad Don't use glCopyImageSubData for compressed textures on GLES
It seems that it does not works for compressed textures on GLES, so
it isn't used during serialization and replay.
2017-07-20 09:51:17 -07:00