Commit Graph

6785 Commits

Author SHA1 Message Date
baldurk 30bf276ae8 Return SPIRVId from Add*() functions for convenience's sake 2018-01-16 16:44:24 +00:00
baldurk 8fc56df0e0 Add utility function that expands an operation in-place with new words 2018-01-16 16:44:17 +00:00
baldurk 74ac75289b Add begin/end iterators for each section to ease iteration 2018-01-16 16:44:08 +00:00
baldurk e59dea2142 Add functions for adding declared constants 2018-01-16 16:44:00 +00:00
baldurk 78e0a7424f Add SPIRVIterator comparisons and SPIRVId stringification 2018-01-16 16:43:44 +00:00
baldurk 0a29df1f02 Ditch use of std::initializer_list, it's more pain than it's worth 2018-01-16 16:42:40 +00:00
baldurk 0f541ea6ee Add function and void type tracking, and helper for declaring structs 2018-01-16 16:39:53 +00:00
baldurk 7bb4754108 Don't keep SPIRVIterators around persistently, store IDs instead
* We have an ID -> offset lookup which can give us iterators on the fly,
  but this allows us to invalidate iterators and modify in-place.
2018-01-16 16:39:22 +00:00
baldurk d9db39b7c8 Add explicit param onto operator bool() to not accidentally cast to int 2018-01-16 16:37:38 +00:00
baldurk 32af79bf8c Allow removing or truncating operations by replacing words with OpNop
* It's not clear if OpNop is allowed to exist outside of function
  definitions, so we strip it ourselves. This is always fine anyway.
2018-01-16 16:37:07 +00:00
baldurk 64e41dc406 Add ability to re-use or declare new types 2018-01-16 16:37:05 +00:00
baldurk 93d7f86d60 add beginnings of a class to organise SPIR-V editing capabilities 2018-01-16 16:33:33 +00:00
baldurk a69efa1702 Refactor debug manager, reducing duplication and better organisation
* In many cases (particularly on D3D11/D3D12) the replay would simply
  forward functions as-is to the debug manager for implementation. This
  meant that change any of those function signatures required more
  tedious copy-pasting than was necessary, and didn't make much sense.
* Now the replay class is responsible for implementing all the
  functionality and owns any debug-only API resources, but can still use
  the debug manager for any indirect utility functions like caching,
  etc.
* The API resources are better organised by task in the replay class
  rather than being all over the place.
* Finally on vulkan, added some helper functions to reduce the
  boilerplate involved in initialising objects.
2018-01-16 16:29:39 +00:00
baldurk 67835c4d54 Split shader caching and text rendering out of debug manager classes 2018-01-16 16:29:36 +00:00
baldurk 25cfa2c9df Move GPUBuffer helper class out of VulkanDebugManager 2018-01-16 16:26:24 +00:00
baldurk fdfdda71ac Add helper #defines to allow declaring embedded resources by name
* We want to be able to declare a 'name' of a resource and then fetch it
  later. To do this we create a tiny little reference (either an int on
  windows, or a pointer+length elsewhere), then actually fetch the data
  later.
2018-01-12 10:55:18 +00:00
baldurk f87d058cfb Split out texture rendering and preparation into separate files 2018-01-12 10:55:17 +00:00
baldurk 770e6756f8 Split out conversion between MSAA textures and 2D arrays. 2018-01-12 10:55:16 +00:00
baldurk 013457ab5f Split out mesh rendering to separate files 2018-01-12 10:55:16 +00:00
baldurk 635a58280e Split output window handling out of debug files 2018-01-12 10:55:15 +00:00
baldurk 69f8571f43 Remove d3d11_analyse.cpp and merge code in elsewhere
* This is temporary until we split up the debug file further, but it
  makes the D3D11 codebase more consistent with the other APIs.
2018-01-12 10:55:14 +00:00
baldurk e287664730 Split apart pixel history and shader debugging from d3d11_analyse.cpp 2018-01-12 10:55:13 +00:00
baldurk db59ffddc6 Split overlay rendering out into separate files in each driver 2018-01-12 10:55:13 +00:00
baldurk 60ed3e2867 Split PostVS implementation out into separate files in each driver 2018-01-12 10:55:12 +00:00
baldurk e7991c07eb Add ability to create a mapping from RGP linear/interopId <=> eventId 2018-01-11 16:44:57 +00:00
baldurk 4b7e7f5df1 Add section type for embedded AMD RGP profiles 2018-01-11 15:33:43 +00:00
baldurk 21a16e051b Add support for pre-instance layer functions
* Added to the vulkan loader after 1.0.65, this lets us intercept the
  enumeration of instance extensions (before our layer is actually
  initialised) so that we can filter out unsupported extensions.
2018-01-11 13:48:35 +00:00
baldurk 32d57f4019 Enable sorting in debug messages 2018-01-11 13:48:34 +00:00
baldurk 3170d8fa53 Add option to fetch debug messages at runtime and display them in the UI
* By default this is off as it will continually add more and more
  messages each time the frame is replayed. It could be useful to turn
  on to
* We also enable VK_EXT_debug_report any time it's available, not just
  when we're enabling the validation layers.
2018-01-11 13:48:34 +00:00
baldurk da5cefbac2 Add workaround for when vulkan ICD is libGL.so and we repoint it to us
* Some distribution packages (Ubuntu at least I think) point the nvidia
  vulkan ICD registration at libGL.so. Since for libGL hooking we have
  to redirect dlopen("libGL.so") to ourselves, this means the vulkan
  loader loads librenderdoc instead of libGL. If we don't export the VK
  ICD entry points, it will fail to load that ICD.
* This solution isn't perfect - we export all three main ICD entry
  points. If the real ICD doesn't export one, we will fail and cause
  problems, since the loader won't fall back to older paths unless the
  symbol is completely missing. For now though this is fine since the
  nvidia ICD exports all three.
* The only way to solve that properly would be to intercept all calls to
  dlsym and redirect these functions by name to go to the real handle
  instead of ourselves - vastly overcomplicated for this edge case.
2018-01-11 13:48:34 +00:00
baldurk b5d9034698 When opening raw index buffer view, multiply offset by index width 2018-01-11 13:48:33 +00:00
baldurk 316b57e06f Initialise buffer view information with wrapped create info 2018-01-11 13:48:33 +00:00
baldurk d7f5d7f1c6 Don't try and enable validation layers on android even if enabled
* We'd have to bundle the layers with our apk and we don't do that, it
  just causes replay to fail.
2018-01-11 13:48:33 +00:00
baldurk dc98914eef Don't add android hosts synchronously in menu popup (it started slowing)
* This was fast before but I started noticing the lag. Instead, we can
  do it asynchronously when polling for remote host status, every few
  seconds. This should still be good enough as people are probably going
  to be used to devices taking a moment to appear.
2018-01-11 13:48:33 +00:00
baldurk 01ee0e32ba Update preview settings after fetching PostVS data 2018-01-11 13:48:32 +00:00
baldurk 079c255bd8 Fix some missing whitespace around rst references in docs 2018-01-11 13:48:32 +00:00
baldurk ef788c7e4f Account correctly for UAV mip slice when fetching 2D texture data 2018-01-11 13:48:30 +00:00
baldurk 565f8e2f97 Fix circular loop when adding debug messages in D3D12 2018-01-11 13:47:43 +00:00
baldurk 8fdf2bed62 Discard debug messages after starting the frame capture
* This prevents us from serialising debug messages caused by the
  initial state preparation accidentally.
2018-01-11 13:47:43 +00:00
baldurk 8220b98601 Remove use of renderdoc.props with git commit hash where it's not needed
* This causes a full rebuild in VS because the command line has changed
  every time you commit or checkout in git (because the git commit
  /D parameter has changed).
* Since we only need it in UI-facing projects we remove it from
  every project except qrenderdoc, core renderdoc, and renderdoccmd.
  They will still rebuild when the commit changes but technically VS is
  right to do so.
2018-01-04 21:46:41 +00:00
baldurk a6f856d2d9 Fix mistaken && insteasd of & checking control key modifier 2018-01-04 21:46:41 +00:00
baldurk 0991642393 Add error message in case reading from file fails while embedding 2018-01-04 21:46:41 +00:00
baldurk 3c4d9147fb Fix potential NULL dereference if no draw is found rendering overlay 2018-01-04 21:46:41 +00:00
baldurk dec06a19fb Don't pass NULL f to fclose, passing --no-clobber if file doesn't exist 2018-01-04 21:46:41 +00:00
David McFarland 9013c1babf image_viewer: fix corruption when viewing rgba32_float images 2018-01-04 12:32:27 +01:00
michaelrgb 89eb933be5 If user resumes APK after server shutdown, restart cmdthread.
Also make sure ANativeActivity_finish/DetachCurrentThread are called.
2018-01-03 11:11:25 +01:00
David McFarland b9be6a70e3 gl: Fix initial data preparation on wrong context. 2018-01-03 11:11:17 +01:00
David McFarland c32f5902e9 gl: Avoid passing initial data pointers through the queue.
This reduces the possibility of a logic error leading to memory
corruption by using a dangling pointer.
2018-01-03 11:11:17 +01:00
David McFarland e63f696ddb gl: Delete context owned resources from resource manager.
This fixes tracking problems when a context id is reused.
2018-01-03 11:11:17 +01:00
baldurk 089b9c1ece Don't use ToQStr for converting rdcstr to QString, just cast 2018-01-02 17:19:54 +00:00