Commit Graph

13694 Commits

Author SHA1 Message Date
baldurk 080b3dbb75 Add license note for nvidia nsight perfsdk redistributable portions 2023-02-01 11:22:22 +00:00
Z Guan b68381598b Fix sampler-only slots with immutable samplers in vulkan shader debug 2023-01-30 17:46:00 +00:00
baldurk 9eaabe516a Fix calculation of mip co-ordinates. Closes #2836
* Also adds a unit test to verify these helpers
2023-01-27 14:13:21 +00:00
baldurk 2dab264dee Disable print to stderr from nvperf 2023-01-27 10:24:34 +00:00
Roman-Skabin bb80255925 Replaced checking android version with ckecking SDK version.
Also some code refactoring based on review remarks. (+3 squashed commit)

Squashed commit:

[6aad908e4] Review refactoring

[19e4ef6b9] Formatting fix.

[49c852081] Android 13 fix
2023-01-26 19:08:47 +00:00
baldurk b72fe1d503 Sync all queues after fetching counters on D3D12 2023-01-25 11:25:01 +00:00
baldurk c6c5c147dd Pick unorm as default type for 1-byte textures
* Normally we rely on a query from the driver, but not all drivers return valid
  data here unfortunately so we want a better fallback.
2023-01-25 11:05:27 +00:00
baldurk 2e0b872592 Don't query seamless cubemap state per texture
* This has been broken for a long time, but this state is only global there is
  no per-texture query.
2023-01-25 11:04:05 +00:00
baldurk b8b9fff7f0 Fix order, update texture before fetching histogram. Closes #2828
* This is only relevant when using a custom shader since otherwise nothing is
  'updated', though could also affect overlays potentially. If we don't then the
  custom shader texture may not have been re-rendered before we fetch the
  histogram data and we'll get stale information.
2023-01-25 10:38:16 +00:00
Jonathan Glines 4e02449617 Fix errors from NvPerfUtility displayed when no library present
Errors from NvPerfUtility do not need to be displayed if the Nsight Perf SDK
library is not installed.
2023-01-19 23:59:17 +00:00
baldurk 0042f6dfd9 Handle inlined shader modules created for compute PSOs. Closes #2826 2023-01-19 17:09:51 +00:00
baldurk 653028fa0d Fix compile error, oops! 2023-01-18 14:39:54 +00:00
baldurk 6b734708cf Store enabled extensions during capture at vkCreateDevice time 2023-01-18 14:07:05 +00:00
baldurk a45f1f929f Don't clamp array stride to 16-bit in shader reflection
* Looks like this was leftover from some refactors where the stride was going to
  be packed into 16-bit but never was.
2023-01-18 13:34:50 +00:00
baldurk b1efc1ea8f Fix D3D12 if MSAA is disabled on output windows 2023-01-18 12:57:01 +00:00
Leonard Tsai f578e62684 Allow multiple depth targets to be viewable in the TextureViewer 2023-01-18 12:56:47 +00:00
Jonathan Glines 588d205279 Show errors from NvPerfUtility in the RenderDoc UI
Errors related to collecting NVIDIA hardware counters are now shown in the
"Errors and Warnings" window of the Renderdoc UI. Previously, these errors were
only visible in stderr. This includes errors for device compatibility, resource
availability, and insufficient privileges.
2023-01-18 10:45:03 +00:00
Jonathan Glines a362e42124 Add custom logging callback mechanism to NvPerfUtility
This is needed to send log messages to the RenderDoc UI rather than to stderr.
2023-01-18 10:45:03 +00:00
baldurk fce1920d5b Strip new kind of dxil type mangling from typenames 2023-01-17 20:09:34 +00:00
baldurk 82f205ead6 Add support for VK_EXT_image_view_min_lod 2023-01-17 18:39:06 +00:00
baldurk 823103e111 Add support for VK_EXT_depth_clamp_zero_one 2023-01-17 18:39:06 +00:00
baldurk a440fa2a23 Add support for VK_EXT_non_seamless_cube_map 2023-01-17 18:39:06 +00:00
baldurk caa2ede2b1 Add support for VK_EXT_border_color_swizzle 2023-01-17 18:39:06 +00:00
baldurk 1ab648c3fa Always show DebugValue in SPIR-V disassembly. Closes #2823
* These were previously hidden by default since they generate a fair amount of
  noise in the disassembly which is not neccessarily directly useful.
* The problem is that DebugValues are steppable and so will generate an
  instruction in the debugging, but without a disassembly line you can have two
  different 'instructions' on the same disassembly line but with different
  source lines:
   > DebugLine 100
   > DebugValue ...
   > DebugLine 101
   > OpSomething ...
   In this case the DebugValue and OpSomething will both have the same disassembly line, but different source lines. This means it is impossible to reliably place a disassembly breakpoint and know which instruction to stop on, and produces some odd effects when stepping in asm (it will step to the DebugValue then the OpSomething and not visibly move).
* Overall the reduction in readability is worth this fix, especially considering
  that when debug info is present is exactly when people are least likely to be
  using the disassembly at all.
2023-01-17 18:39:05 +00:00
baldurk c1bb3abb07 Add support for EXT_surface_maintenance1 and EXT_swapchain_maintenance1 2023-01-17 18:39:05 +00:00
baldurk a9d445d779 Add support for VK_EXT_acquire_drm_display. Closes #2664 2023-01-17 14:15:09 +00:00
baldurk fe4a79054f Update vulkan headers to latest 2023-01-17 14:15:08 +00:00
baldurk 83c2b004c6 Update SPIR-V headers to latest 2023-01-17 14:15:08 +00:00
baldurk cfe4d08c81 Use the proper calculation for partial-miptail wrapped updates 2023-01-17 14:15:08 +00:00
baldurk 28e243e7d1 Copy from correct subresource in initial states if some are unmapped 2023-01-17 14:14:53 +00:00
baldurk abf613c173 Don't print an error when precaching common types 2023-01-16 10:27:17 +00:00
baldurk f57a53a59d Fix some minor deltas to dxc's disassembly 2023-01-16 10:27:17 +00:00
baldurk 2f1823aaa2 Fix DXIL editing of referential function constants 2023-01-16 10:27:16 +00:00
baldurk 08517ff2f8 Put some dxc disassembly compatibility options under #ifdef 2023-01-16 10:27:16 +00:00
Steve Karolewics d8664d4ae5 Fix D3D12 PSO creation errors with missing stream subobjects.
If some stream subobjects are missing, PSO creation will use the
defaults for those elements. For primitive topology, this is
triangle rather than undefined, and for depth stencil, it defaults
to depth disabled until either depth stencil state is encountered
or a DSVFormat is specified.
2023-01-16 10:25:43 +00:00
baldurk 5e1c1cf549 Fix passing rdcstr through variadic args 2023-01-12 18:33:43 +00:00
baldurk 8a6ee78c40 Allow for optional support for 3D and cubemaps with depth format
* These are not required to be supported and some drivers may not handle them,
  but on implementations where they are supported we need to support debugging
  them.
2023-01-12 18:00:00 +00:00
baldurk 5d801636ab Disable discard patterns if resolve feedback loop detected. Closes #2045
* This won't catch all cases as it won't be able to detect reads via plain
  descriptor, those will still break if this kind of feedback loop is in place.
2023-01-12 16:28:56 +00:00
baldurk 86d101eb88 Add test to make sure replay and analysis features work with library PSO 2023-01-12 15:20:28 +00:00
baldurk d2c4312078 Fix handling of spec constant operations returning bool in shader debug 2023-01-12 15:13:15 +00:00
baldurk f78b585018 Add D3D12_Vertex_UAV test to demos project 2023-01-12 13:48:13 +00:00
Jake Turner 359e1a4bed Fix brew python upgrade errors in Mac CI
brew unlink python then brew force link python 3.10 & 3.11
2023-01-12 10:32:25 +00:00
baldurk 3e839fc5e9 Handle specialising pipeline being different from final linked pipeline
* With graphics pipeline libraries there can be a different pipeline bound to
  the state as the one used to specialise a shader. Since this is a many:1
  relationship (per shader object) we can express it with a simple map lookup to
  redirect the specialised pipeline.
2023-01-11 18:37:54 +00:00
baldurk 56b519ea06 Explicitly set array layer selection value to 0 in D3D shader debugging
* This value should be ignored, so may contain something else from the register
  that we need to remove.
2023-01-11 18:37:53 +00:00
baldurk 6e85d40ead Check HRESULT for fatal errors when reading back output windows on D3D11 2023-01-11 18:37:53 +00:00
baldurk 72c9cbf37f Lock around access to capturer list
* This removes a potential narrow race where a capturer is removed or added on
  one thread while another thread is iterating the list of capturers for target
  control communication.
2023-01-11 18:37:53 +00:00
Shahbaz Youssefi c86e8d2446 Fix Vulkan-only build
NVIDIA counters build assumed Vulkan build implies GL build.  This is
not necessarily the case.
2023-01-11 16:47:35 +00:00
Jake Turner 70df111a5e Guard Metal APIs newer than MacOS SDK 12.0
macos(13.0) guarded using #if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_13_0
macos(12.5) guarded using #if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_12_5
2023-01-08 11:42:23 +00:00
Jake Turner aaa12d3fb7 Metal: Compile time support for MacOS SDK 13.1
Changes to Metal protocols to support MacOS SDK 13.1
Removed #if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_12_0 guards now the CI can compile MacOS SDK12.0
2023-01-08 11:42:23 +00:00
baldurk 220b26aa59 Handle collisions with existing UAVs in root signature when patching
* When debugging a pixel or doing quad overdraw we replace the pixel shader and
  patch in our own UAV. Previously we were moving other UAVs out of the way that
  were visible to the pixel shader, but this fails if a UAV is visible to all
  stages and used in a vertex stage.
* Now instead for pixel shader inputs we pick a free space and use it. For quad
  overdraw we pick an arbitrary high space to hopefully use the precompiled
  shader, and if it's somehow not free we recompile the shader with a free
  space.
2023-01-06 16:53:20 +00:00