Commit Graph

9394 Commits

Author SHA1 Message Date
baldurk 1107462f05 Use pipeline layout from descriptor set binds to iterate descriptor sets
* If a pipeline doesn't statically access a descriptor set, the corresponding
  descriptor set layout in its pipeline layout can be essentially anything and
  it doesn't have to match the actual descriptor set bound at a draw. It's just
  ignored.
* Rather than check for static access ourselves we take advantage of another
  fact - when the descriptor set is bound it must be compatible with the set
  layout from the bind call's pipeline layout. If the pipeline *does* statically
  use the descriptor set, its pipeline layout must be compatible with the bind
  call's pipeline layout for that set.
* So the end result is that we can safely use the bind call's pipeline layout
  for iterating over bound descriptors, secure in the knowledge that it's always
  valid for that data, and if the pipeline uses it then it's also valid for the
  pipeline.
2019-09-02 12:19:37 +01:00
baldurk e6d0c93b41 Fix wrong Qt cmake variable for qmake command being used 2019-09-02 11:37:55 +01:00
baldurk e15a10a0e6 Don't bind GL_QUERY_BUFFER if the extension isn't supported 2019-08-30 11:54:33 +01:00
baldurk 608c283c9b Use all non-negative shader lengths, not just positive. Closes #1508 2019-08-30 11:54:30 +01:00
baldurk c6dd97947b Check that qmake runs successfully and check Qt version 2019-08-29 11:21:58 +01:00
baldurk 2253c4e75d Don't include NULL in ID3D12CommandQueueDownlevel::Present marker 2019-08-29 10:37:32 +01:00
baldurk 061a376901 Fix D3D12 tests to run on D3D12On7 2019-08-29 10:20:38 +01:00
baldurk 096e5af08b Fix graphics tests to pass default replay options to OpenCapture 2019-08-29 10:02:29 +01:00
baldurk 12f08aa47f Take GL lock in WGL context functions 2019-08-28 23:10:47 +01:00
baldurk 0f3614a826 Fix preallocated chunk size for GL driver init 2019-08-28 23:06:03 +01:00
baldurk af710fe021 Add additional fallback path for fixing XFB varyings on GL
* On AMD's driver at least the reflection for a separable vertex program
  includes all declared outputs even if they're statically not written in the
  vertex shader. However trying to use these as XFB varyings fails.
* Unfortunately this makes it impossible for us to use our typical reflection to
  determine what outputs to write, so instead we make a last ditch attempt to
  get things working and link the non-separable program we're about to use for
  XFB and reflect that again, then use the reflection to remove items from the
  varyings and replace them with gl_SkipComponentsN.
2019-08-28 18:55:12 +01:00
baldurk ab05d4cbc8 Fix OpenGL SPIR-V compilation using external glslc in tests 2019-08-28 18:07:56 +01:00
baldurk f7b60f6d82 Fix SINGLE_FLUSH_VALIDATE crash with no queue/device available 2019-08-28 17:12:13 +01:00
baldurk 422cd728ad Move available GPU check onto thread at startup
* This hides a stall when first opening a window that needs the list of GPUs.
2019-08-28 15:34:28 +01:00
baldurk a32c48c863 Fix wrong loop increment in PostVS SPIR-V patching 2019-08-28 15:20:10 +01:00
baldurk e2f2b7191a Make sure to cache all replay shaders on D3D11 2019-08-28 15:19:55 +01:00
baldurk fbe4bca6fb Add illegal workaround for broken Android skia library
* Skia had a bug (which has been fixed) where it would incorrectly check for
  glGetError() to see if glProgramBinary() had succeeded. This is completely
  wrong and it should be checking the link status. When RenderDoc silently
  dropped the function call to leave the link status as invalid, Skia deleted
  the program and then tried to use it anyway leading to incorrect rendering.
* Potential other fixes in order of preference:
  - Spec-compliant: Return a random program binary format each time the
    program runs. This should prevent a correctly-written program from
    re-using cached binaries, but of course Skia ignores the binary format
    and uploads it anyway. We'd hit the same broken error check and we're
    back to square one.
  - Spec-compliant: Write a program binary format of our own that embeds all
    the shader source and replays it again. Would be valid and work, but is
    very complex.
  - Non-spec-compliant: Fake the error code that Skia is looking for. In a
    program which is written correctly we then poison glGetError() and cause
    unpredictable and possibly serious errors elsewhere.
* Instead we just return 0 for GL_NUM_PROGRAM_BINARY_FORMATS on Android, and
  Skia turns off its caching entirely. This is not spec-compliant either since
  the spec requires at least one format in the list that is returned by
  glGetProgramBinary, but if the Android OS is going to break the spec at us
  then we'll break it right back.
* Bottom-line: Android is an absolutely horrible operating system that is broken
  at every turn and no-one should be forced to deal with it.
2019-08-28 14:14:49 +01:00
baldurk fa56e74181 Increase the wait after starting android remote server
* No surprise here, Android is bad so it takes ages after starting the program
  before it is actually running.
2019-08-28 12:15:27 +01:00
baldurk 0d7c7eb247 Fix linux compilation 2019-08-27 19:44:29 +01:00
baldurk 80bfa1b409 Fix display of ResourceId text in log viewer 2019-08-27 18:51:57 +01:00
baldurk 21be21cb8f RichResourceText QTextDocument should use parent widget's font
* Otherwise the hit-testing might be off
2019-08-27 18:51:57 +01:00
baldurk c18708cfd8 Remove warning that's falsely triggered now in valid cases 2019-08-27 18:51:57 +01:00
baldurk 1d270254c1 Add documentation for replay options 2019-08-27 18:51:57 +01:00
baldurk 9d5379b740 Remove problematic assert, only check that returned image count is OK 2019-08-27 18:51:57 +01:00
baldurk 6203909791 Expose replay options to the UI
* The defaults can be configured from the settings menu, and there's a new "Open
  Capture with Options" menu option to open a capture with different options
  temporarily.
2019-08-27 18:51:56 +01:00
baldurk b4a3fb4490 Fetch debug messages at replay time if option is enabled 2019-08-27 18:51:56 +01:00
baldurk c7682ca7a8 Only mark referenced pipeline members if a pipeline is bound 2019-08-27 18:51:56 +01:00
baldurk 3b04011f7f Use replay optimisation level to set vulkan InitState reset policy 2019-08-27 18:51:56 +01:00
baldurk b0933dcf33 Implement forced GPU override on D3D11, D3D12 and Vulkan 2019-08-27 18:51:56 +01:00
baldurk 20be9f3d52 Add ReplayOptions struct to contain replay-time configuration
* Not currently exposed to the UI or used by the drivers, we just pass the
  default object through
2019-08-27 18:51:56 +01:00
baldurk 878acd4ad9 Add a function to enumerate which GPUs are available at replay time 2019-08-27 18:51:56 +01:00
baldurk d81331918e Save info about the used GPU on D3D11, D3D12 and GL
* On GL this is purely informational, but on D3D11 and D3D12 we use this to
  select the closest available adapter on replay, as we already do on Vulkan.
2019-08-27 18:51:56 +01:00
baldurk 8c6fc67acd Make it extra clear that RenderDoc needs to find the Android SDK 2019-08-27 18:51:56 +01:00
baldurk 04a221226d Identify Google Swiftshader and Microsoft WARP PCI vendor IDs 2019-08-27 18:51:55 +01:00
baldurk f46ec7c21e Fix leaking resource when creating dummy/proxy vulkan driver 2019-08-27 18:51:55 +01:00
baldurk f53f52b172 Fix loads of subsequent D3D12On7 captures 2019-08-27 18:51:55 +01:00
baldurk c579c6f264 Be a bit more explicit about the GL disassembly being SPIR-V if it fails 2019-08-27 18:51:55 +01:00
Connor Abbott 09e6d7ca58 Only copy existing bindings in PatchReservedDescriptors()
* Fixes a crash when looking at certain draws in No Man's Sky, which
apparently sometimes binds a descriptor set with fewer bindings than the
layout specified.
2019-08-26 17:08:34 +01:00
baldurk 6971a585aa Fix compilation on 32-bit windows 2019-08-26 16:52:09 +01:00
baldurk af3c242b35 Fix signed/unsigned comparison 2019-08-26 14:52:58 +01:00
baldurk d6289b93d0 Fix check for whether LastCaptureFilePath should be updated 2019-08-26 13:49:58 +01:00
baldurk 2ed4547fe8 Implement support for VK_IMG_filter_cubic / VK_EXT_filter_cubic 2019-08-26 13:33:43 +01:00
baldurk 3b524ea7f1 Fix reflection of arrays-of-binds - textures and buffers 2019-08-26 13:22:26 +01:00
baldurk d38109d047 Fix bindless feedback SPIR-V modification 2019-08-26 13:10:18 +01:00
baldurk b2d8f12fa6 Fix replay of single-int uniforms 2019-08-24 15:49:49 +01:00
baldurk 2a8d7eddec Set sampler name for combined image/samplers in pipeline HTML export 2019-08-23 23:41:19 +01:00
baldurk cf6a021db9 Ignore descriptor writes with descriptorCount == 0 2019-08-23 19:27:52 +01:00
baldurk c2fe16b44a Add support for D3D12On7 2019-08-22 18:43:48 +01:00
baldurk 346ee91f70 Store location not byte offset for loose globals in SPIR-V 2019-08-22 10:16:18 +01:00
baldurk 4c9fec4cb4 Fix calling convention on vulkan layer function. Closes #1500 2019-08-22 10:14:39 +01:00