Commit Graph

6088 Commits

Author SHA1 Message Date
baldurk 38928667ee Remove most of the code, statically link lib into converter program
* The converter program will be able to open old captures, but is itself
  captureable in new renderdoc builds. This isn't a direct conversion
  but should allow a reasonable estimation and is better than nothing.
* NOTE: The resulting converted file will have no thumbnail, and no
  callstacks (if they were present before). As well as more minor things
  like backbuffers no longer appearing identified as backbuffers, some
  markers losing their colours, etc.
2018-03-06 14:32:50 +00:00
baldurk 1f3d300e74 Bump version to v0.92 on v0.x branch v0.92 2018-03-06 12:45:58 +00:00
baldurk 03ac799c78 Convert to sized format before calling into real GL
* There's a weird issue on mesa where copying between a texture with
  unsized format GL_RGBA and sized format GL_RGBA8 fails. The workaround
  is to promote to sized format immediately, which changes the behaviour
  slightly but as ever the unsized formats are explicitly ambiguous, so
  we're within our rights (as part of the GL implementation so to speak)
  to change it.
2018-02-27 19:55:24 +00:00
baldurk c4523a321d Don't do full-image transitions per subresource, just do it once 2018-02-27 19:52:53 +00:00
baldurk 0547be54ea Multiply index offset by stride when opening buffer viewers. Refs #884 2018-02-24 14:08:09 +00:00
baldurk 6d076aaf69 Initialise debug manager on frame capture if it's not ready. Refs #880
* If no swapchains have been created the debug manager won't be ready,
  so we need to ensure it's initialised here so we can use it during
  initial state preparation.
2018-02-24 14:04:04 +00:00
baldurk 24fa60aa14 Fix range size calculation for Map() data write 2018-02-21 10:42:17 +00:00
baldurk 9e46d923d1 Check for non-NULL resource desc when creating descriptor 2018-02-21 10:41:54 +00:00
baldurk 83431bc14d Handle multi-dimensional arrays in shader input/outputs. Refs #714 2018-02-20 16:16:55 +00:00
baldurk 368de4b000 Reduce initial wait time for fetching socket out of new process 2018-02-20 16:15:34 +00:00
Cory Bloor c9d7c7562c Speed up linux process connection
There's no need to wait for exponential backoff to satisfy
waitTime > MAX_WAIT_TIME if we already found the result.
2018-02-20 16:13:08 +00:00
baldurk 25713c7ef4 Don't query GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS if no subroutines
* Works around some mesa debug message spam if no subroutines exist.
2018-02-20 16:04:14 +00:00
baldurk 207b24854e Check for errors when invoking AMD DXBC disassembler 2018-02-20 16:02:18 +00:00
baldurk 477d5b6557 Use absolute dimensions of viewport to calculate aspect ratio. Refs #856
* On vulkan the viewport height could be negative to flip the NDC, but
  we don't care about its sign only its magnitude to calculate the
  aspect ratio.
2018-02-02 22:07:31 +00:00
Jasper St. Pierre 022d46ab7d Fix GLSL shader editing
The "files" system expects other files to be #included, which won't make
sense for GLSL sources, which are expected to be concatenated. Use the
concatenated string as a single "main.glsl" file.
2018-02-01 19:27:44 +00:00
baldurk c87dfebd2e Fix GetModifiedTimestamp to work with >2GB files on win32 (see 43946540) 2018-01-24 22:53:15 +00:00
Jimmy Lee 65b3b8b6d8 Fixed a problem with opening capture files larger than 2gb on windows 2018-01-24 22:53:15 +00:00
baldurk 9587cba45d Fix implementation of firstbit_(s)hi - thanks to Scott Kircher
* firstbit_hi counts MSB as index 0, BitScanReverse counts LSB as 0.
2018-01-22 20:53:54 +00:00
baldurk 6951b5b95a force flush of command lists & GPU sync when doing non-partial replay
* In some cases there was an unpredictable crash when starting a replay
  loop, doing a full frame replay immediately after a previous replay.
  There were no debug messages, and the debug layer fixed it - as did
  enabling single flush validate. It seems to me some timing/overloading
  issue, and doing this sync should be relatively harmless so we use
  this to avoid the crash.
2018-01-18 19:33:20 +00:00
baldurk ef173fb96f Append C++14 standard flag instead of prepending.
* This stops it from being overridden by the global --std=c++11 in the
  root CMakeLists.txt which ends up after it in the command line.
2018-01-18 17:55:52 +00:00
baldurk bbac580c3a Fix some missing whitespace around rst references in docs 2018-01-05 11:45:54 +00:00
David McFarland 7cbb1dfd2a Set TextureDescription.resType in image_viewer
This fixes image_viewer on gl_replay.  Previously, images would show up
as <Uninitialised Texture>.
2018-01-05 11:41:20 +00:00
baldurk d56fc083b7 Fix typo in in_application_api restructuredText, missing colon on param 2018-01-05 11:41:20 +00:00
baldurk 0f7fc5fbea Removing a resource replacement also needs to clear PostVS cache 2018-01-05 11:41:20 +00:00
baldurk ef19bd974b Add intermediate resolve image for multisampled outputs
* Technically the resolve doesn't allow format conversion at all, so
  instead of resolving directly to the swapchain image we need a middle-
  man image of the same format as we use internally for the MSAA target
  (RGBA8_SRGB) to resolve to, then blit from that to the actual
  backbuffer.
2018-01-05 11:41:20 +00:00
baldurk a453307d5e Account correctly for UAV mip slice when fetching 2D texture data 2018-01-05 11:41:19 +00:00
baldurk de7a74c7e5 Disable -Wunused-lambda-capture which complains about nonsense sometimes 2017-12-14 10:55:59 +00:00
michaelrgb 78c402bb34 Create uniform translation table from live prog instead of initial prog.
The table is used on the live program, and we have seen the driver choose
different locations in the initial program due to the TF varyings.
2017-12-13 22:49:13 +00:00
michaelrgb ea7475f65f Mesh Viewer: end TF if captured app already used TF on its draw call. 2017-12-11 20:12:34 +00:00
baldurk 49d39f32a5 Attempt to fix weird SWIG compile error with lacking relocatable flag
* Although we're only making binaries so this doesn't seem like it
  should be necessary.
2017-12-07 19:00:34 +00:00
baldurk b471f95c6a Prevent recursive calls in CreateProcess hooks
* In one case the kernel32.dll version called into an API set version,
  and we don't want to hook twice.
2017-12-07 18:37:24 +00:00
Ken Hu ecdbfc9978 Fix sampler slot extraction on gather4_po_c when debugging dxbc shader
gather4_po_c has 6 operands and offset of sampler should be 4 instead of 3.
2017-12-07 18:37:24 +00:00
baldurk c1c94d14e1 Allow NULL in glClear*Buffer and glClear*Tex functions
* The spec says that if data is NULL, it acts like a buffer filled with
  zeroes, so we can just memset.
2017-12-07 18:37:23 +00:00
baldurk c6ab587875 Add hooking for CreateProcessAsUser and CreateProcessWithLogonW 2017-12-07 18:37:22 +00:00
baldurk 7bdb3174b4 Check for ARB_texture_storage in CopyTex2DMSToArray and used it
* ARB_texture_view only works on textures allocated with
  ARB_texture_storage so we have to check for both extensions and then
  use texture storage to allocate space for the destination array
  texture.
2017-12-07 18:13:21 +00:00
baldurk 1431fd66cf Snoop and disable requests for intel DX11 extensions. Refs #816 2017-12-07 18:13:04 +00:00
baldurk 1d0d49f694 Clear PostVS cache when a resource is replaced. Refs #729
* For now, resource replacement implicitly means shader edits, but other
  replacements could also affect the results of PostVS (e.g. buffer or
  state changes). Trying to capture all this state in the cache key is
  not very useful.
* The PostVS cache will be re-filled immediately after, as any
  replacement does a force-refresh of the current event.
2017-11-10 18:36:31 +00:00
baldurk 0e0921271b Fix emulation of glMapNamedBuffer - pass correct map access bits 2017-11-09 18:33:38 +00:00
baldurk d4225b2262 Add some hefty padding to reported image required size on AMD. Refs #795
* AMD reports image required sizes with some variation even for the same
  creation parameters. This can mean the same image is reported with
  less required size during capture compared to replay, meaning memory
  binds won't work.
* To get around this, we pad up the requirements to alignment * 4 and
  fudge to try and encompass any possible variation.
2017-11-09 18:33:24 +00:00
baldurk fecd7dd318 Fix formatting from bad git cherry-pick
* Apparently git cherry-pick doesn't apply commit hooks :(.
2017-11-03 20:02:48 +00:00
baldurk 522dba1981 Handle vulkan base pipelines properly, creating record dependencies 2017-11-03 15:54:13 +00:00
baldurk 423938801b Disable buggy and user-hostile NV optimus layer 2017-11-03 15:54:13 +00:00
baldurk 93efdf46e1 Fix remapping multiple capture vulkan phys. devs to 1 replay phys. dev 2017-11-03 10:25:12 +00:00
baldurk c016855dce Fix copy-paste error checking wrong count for validity. Refs #789 2017-10-28 14:12:10 +01:00
baldurk 155571eecf Ensure descriptors for multi-plane images are valid on replay 2017-10-25 00:24:19 +01:00
baldurk 4befa9dd22 If a resource is NULL, make sure we don't use an invalid descriptor
* This can happen if the resource was not included in the capture, but
  there was a descriptor passed (i.e. not NULL desc which is handled
  separately) which specifies some parameters, but leaves the format
  as UNKNOWN.
2017-10-25 00:24:19 +01:00
baldurk 6589e1fa9a Make sure to set refData to NULL whenever it's released 2017-10-24 23:04:10 +01:00
baldurk e23ddb98b3 Clamp currentIndex from Qt which can come back as -1 in some cases
* If this gets propagated far enough and used as an index it can cause
  crashes, so we clamp to 0 when we know the value should be
  non-negative.
2017-10-24 23:04:02 +01:00
baldurk d887e25b8d Ignore format truncation warning on utf8printf.cpp
* We deliberately truncate in some tests, to check our printf behaves
  correctly.
2017-10-24 23:03:57 +01:00
baldurk 400b9487e1 Check for renderdoc.dll precisely when injecting, not just close match
* This means we don't call into a random dll if it happens to contain
  the substring 'renderdoc.dll' somewhere.
2017-10-24 23:03:57 +01:00