Commit Graph

14141 Commits

Author SHA1 Message Date
baldurk 2758c080c8 Disassemble inner coverage variable correctly. Closes #3137 2023-11-15 14:51:04 +00:00
baldurk 0ed8c5eb4c Limit device core vulkan version to declared instance version
* This prevents us from returning function pointers that should be NULL for core
  functionality (or promoted extension functionality) which an application may
  see and then try to call. The spec requires us to return NULL for these cases
  (except for non-maint5 future core versions, but we can legally return NULL
  there and that's the correct thing to do as the maint5 feature bit is stupid).
2023-11-15 14:51:04 +00:00
baldurk d9fd975138 Add a test of unmapping read-only persistent buffers on GL 2023-11-15 14:51:04 +00:00
Steve Karolewics caef1b9c69 Add D3D12 per fragment callback for pixel history
This callback gets info for each fragment of a draw during pixel
history, to determine which ones were discarded and why.
2023-11-13 16:26:48 +00:00
baldurk f2c1435a7d Make it more clear that wayland is unsupported at build time. Refs #3124 2023-11-13 11:45:39 +00:00
baldurk 4a1d1896b7 Try to avoid being forced onto unsupported wayland path. Refs #3124 2023-11-13 11:45:39 +00:00
baldurk b2667b4e2e Unmaps of persistently mapped readonly buffers aren't writes. Refs #3124 2023-11-13 11:45:39 +00:00
Jake Turner e9b7dfcc4c Extend D3D12 Depth Test Overlays
Support shader exported depth by replaying using the capture pixel shader to determine passing pixels
2023-11-13 10:56:01 +00:00
jathoma98 bcb7dfd3ae Update stb_image version 2.12 -> 2.28
stb_image v2.12 has a memory corruption bug, updated to v2.28 to fix.

The only real API change is stb_image_resize.h is now stb_image_resize2.h, and stbir_resize_uint8_srgb() doesnt take alpha channels or flags as params.
2023-11-11 13:07:25 +00:00
Steve Karolewics 73c604d2f0 Add D3D12 test failed callback for pixel history
This callback determines which tests passed or failed for a given
draw during pixel history. The set of tests mirrors the Vulkan
implementation, with some adjustments for D3D12 capabilities.
The code for updating PixelModification structs during pixel
history is included as well since they're related.
2023-11-10 09:52:07 +00:00
William Pearson e03d7c9002 Fix links in buffer format help
The buffer format help can be accessed via first opening the raw
buffer viewer (e.g. from the actions section on the texture viewer),
and then clicking the "?" under saved formats. It includes a nice
summary of the format syntax, but says that "Exhaustive documentation
can be found in the online docs." That was supposed to include a link
to https://renderdoc.org/docs/how/how_buffer_format.html, and in fact
it renders as if it were link, but clicking on it did nothing.

This has been fixed by adding `Qt::LinksAccessibleByMouse` and
`Qt::LinksAccessibleByKeyboard` to `textInteractionFlags`, and also
setting `openExternalLinks` to true (which requires use of a
`QTextBrowser` instead of a `QTextEdit`). I left the full list of flags
as `Qt::TextBrowserInteraction` does not include the
`TextSelectableByKeyboard` flag (which seems useful here and was
included before).

I verified that other uses of links work properly via checking all of
them found via `git grep href`:
* CaptureContext: Uses `QMessageBox` which defers to the style's `SH_MessageBox_TextInteractionFlags` which in practice has at least `Qt::LinksAccessibleByMouse`:
  * https://github.com/qt/qtbase/blob/v5.15.11-lts-lgpl/src/plugins/styles/mac/qmacstyle_mac.mm#L2850-L2852
  * https://github.com/qt/qtbase/blob/v5.15.11-lts-lgpl/src/widgets/styles/qcommonstyle.cpp#L5303-L5305
  * https://github.com/qt/qtbase/blob/v5.15.11-lts-lgpl/src/widgets/styles/qfusionstyle.cpp#L3702-L3703
* AboutDialog: sets `openExternalLinks` to true on the `version` and `contact` labels in the ui file
* AnalyticsConfirmDialog and AnalyticsPromptDialog: uses `on_label_linkActivated` as an automatic slot (as it needs custom handling for opening the documented analytics report)
* SettingsDialog: uses `on_analyticsDescribeLabel_linkActivated` as an automatic slot (and only has an internal link for opening the documented analytics report)
* CrashDialog: several different ones:
  * captureFilename works via `on_captureFilename_linkActivated` as an automatic slot (and opens a file in explorer)
  * reportText has `openExternalLinks` in the ui file
  * on_send_clicked uses `RDDialog::information` with an email address, which uses `QMessageBox` (see CaptureContext)
  * finishedText has `openExternalLinks` in the ui file
* ExtensionManager: sets `openExternalLinks` to true on the `URL` and `author` labels in the ui file
* TipsDialog: sets `openExternalLinks` to true on the `tipUrlLabel` label in the ui file
* nv_counter_enumerator.cpp: sets `openExternalLinks` to true on the `counterDescription` label in PerformanceCounterSelection.ui
2023-11-09 17:57:02 +00:00
William Pearson a64c24ff96 Add missing brackets to docs/how/how_buffer_format.rst 2023-11-09 17:57:02 +00:00
Jake Turner 74b0a8b1a7 Small tweaks to GL and HLSL shaders used to copy depth for Depth overlay 2023-11-09 15:10:54 +00:00
Jake Turner e1e179bd53 Extend D3D11 Depth Test Overlay
Support shader exported depth by replaying using the capture pixel shader to determine passing pixels

Don't write depth or stencil during the reply of failing pixels
No need to restore depth-stencil after replay of failing pixels
2023-11-09 12:05:57 +00:00
Jake Turner 769a2612d9 When loading a layout, force close any orphaned windows
An orphaned window has a NULL parent.
An orphaned window is unable to be re-opened if it already exists in m_ToolWindows because when it tries to raise the existing window it does not have a valid parent
2023-11-09 11:23:48 +00:00
Jake Turner 063a92d930 Update from toolwindowmanager repository @ 4e4280ca78c 2023-11-09 11:23:48 +00:00
Jake Turner 77b2c51355 Logging when layout's are loaded and saved 2023-11-09 11:23:48 +00:00
William Pearson b531fe90a8 Update Android SDK/JDK setting tooltips to match RDOC_CONFIG
Previously, the SDK tooltip was inconsistent between the label and the
text field/button, with the latter incorrectly saying the location of
adb.exe should be used. There also was no description at all for the
JDK option.

I've copied the descriptions from the RDOC_CONFIG macros in
android_tools.cpp, which should make it easier to set these correctly.
2023-11-09 10:15:45 +00:00
William Pearson 9cf30b190e Fix crash when descriptor update template uses unreferenced layout
It is possible for the VkDescriptorUpdateTemplateCreateInfo to have its
descriptorSetLayout or pipelineLayout be the only reference to the
corresponding object, as vkCmdPushDescriptorSetWithTemplateKHR and
vkUpdateDescriptorSetWithTemplate only require that the actual layout
matches/is compatible with the one used by the template. Before, there
was no dependency from the update template to the layout, so if it was
the sole use of a layout, the layout would not be saved in the capture,
resulting in a crash during playback.

This change also modifies the vk_parameter_zoo to test this case. With
those modifications, the change to vk_descriptor_funcs is required to
prevent the crash. Note that on my machine, I needed to comment out
other parts of vk_parameter_zoo, or else it would crash (even when
not run under renderdoc) due to driver issues.

For reference:

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDescriptorSetWithTemplateKHR.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-layout-07993
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUpdateDescriptorSetWithTemplate.html#VUID-vkUpdateDescriptorSetWithTemplate-pData-01685
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDescriptorUpdateTemplateCreateInfoKHR.html#_members
2023-11-09 10:15:00 +00:00
Dan Hawson 0ff1c66ca7 Removed demos project reference to '.clang-format' file
This was added by mistake in an earlier commit.
2023-11-08 15:25:36 +00:00
Dan Hawson 910f1dcd7e Add new d3d12_multi_wait_before_signal.py test
It's currently forcibly disabled via 'check_support' because it's known
to fail due to the fact that the commands are always serialised and
replayed in submission order instead of the order that respects queues
blocked on fence waits that get signalled later from other queues.
2023-11-08 15:25:36 +00:00
Cam Mannett ec408e21c0 Android extra flags not applied on initial CMake generation
CMAKE_CXX_FLAGS was overwritten if not already in the cache (i.e. when first built).  Presumably down to toolchain loading order.
2023-11-07 19:01:04 +00:00
baldurk b711a0576c Limit how much we allow D3D12 addresses to go out of bounds 2023-11-06 15:31:27 +00:00
Er2 dcbbcee6a8 Add some fixes. 2023-11-06 14:42:45 +00:00
Er2 86cb3ebf80 Add FreeBSD operating system support. 2023-11-06 14:42:45 +00:00
Jake Turner de06321536 Extend GL Depth Test Overlay
Support shader exported depth by replaying using the capture pixel shader to determine passing pixels via a stencil mask
2023-11-06 14:38:04 +00:00
Jake Turner b804e99ea3 Set PixelUnpackState to match serialized data for GL Tex APIs
The pixel data has been serialized as pure bytes with no padding or packing.

It was already handled in:
glTexSubImage1D
glTexSubImage2D
glTexSubImage3D

glCompressedTexSubImage1D
glCompressedTexSubImage2D
glCompressedTexSubImage1D

Apply the same handling to:
glTexImage1D
glTexImage2D
glTexImage3D

glCompressedTexImage1D
glCompressedTexImage2D
glCompressedTexImage3D

These APIs do not handle a non-zero offset with the GL_PIXEL_UNPACK_BUFFER
2023-11-06 12:02:50 +00:00
Jake Turner cf004e8ba5 Basic tests for non-zero UNPACK_ROW_LENGTH and glTexImage?D APIs
Covers:
glTexImage1D
glTexImage2D
glTexImage3D
2023-11-06 12:02:50 +00:00
Steve Karolewics 37fe6e098e Add occlusion and color/stencil callbacks for D3D12 pixel history 2023-11-05 15:15:44 +00:00
Jake Turner b19665212c Fix demos compile error on Linux & Android 2023-11-05 13:10:53 +00:00
Jake Turner c93c265681 Wait for GPU before destroying counter query pools
The get query results uses VK_QUERY_RESULT_WAIT_BIT option which makes destroying the query pool safe (the validation layers must not handle this case or it isn't specified behaviour).

This change adds a GPU sync which removes the following validation error. The GPU has already been waited on by the queries using VK_QUERY_RESULT_WAIT_BIT options.

Validation Error: [ VUID-vkDestroyQueryPool-queryPool-00793 ] | MessageID = 0x5ef3bf2b | Cannot call vkDestroyQueryPool on VkQueryPool 0xf49d4000000029b[] that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to queryPool must have completed execution (https://vulkan.lunarg.com/doc/view/1.3.261.1/windows/1.3-extensions/vkspec.html#VUID-vkDestroyQueryPool-queryPool-00793)
2023-11-04 10:32:31 +00:00
Dan Hawson 7619414b8a Add multi-queue wait-before-signal test
This tests submitting commands, signals, and waits to graphics and
multiple compute queues where the entire frame's submission for each
queue depends on the other queues and the submission order is not the
order in which the GPU (and replay) need to be processed.  This is to
ensure any capture or replaying deserialises adequately.
2023-11-03 10:46:42 +00:00
Dan Hawson fb02202505 New D3D12BufferCreator and D3D12TextureCreator state setters
Added 'D3D12BufferCreator::InitialState(D3D12_RESOURCE_STATES)' to allow
user code to avoid adding unnecessary transition barriers after resource
creation.

Added 'D3D12TextureCreator::ClearVal(const D3D12_CLEAR_VALUE &)' to avoid
a PIX performance warning/tip about clearing resources that haven't had
their clear value set on creation.
2023-11-03 10:46:42 +00:00
baldurk 845a2e5718 Handle limited 64-bit only Android devices that don't support 32-bit
* When we detect a new version of Android and a 64-bit device where the 32-bit
  version of RenderDoc fails to install completely, ignore this and don't warn
  the user about it.
2023-11-02 13:48:41 +00:00
Jake Turner bbd1fe6243 Handle variable sized descriptor sets in FetchShaderFeedback
For variable sized descriptor sets compute feedbackStorageSize using the active descriptor set layout instead of the creation time data.
2023-11-01 14:53:06 +00:00
Jake Turner 3fbf060894 Test for very large variable sized descriptor binding
New Binding 3
Initial size is UINT32_MAX
Updated to be sized DESC_ARRAY3_SIZE
Used in the shader to ensure the binding is referenced

Stress tests the FetchShaderFeedback code when it computes the maximum size of feedbackStorageSize.
2023-11-01 14:53:06 +00:00
baldurk b103d1fcb6 Fix crash disassembling root signature in DXIL metadata 2023-11-01 11:46:42 +00:00
baldurk 8805afd56e Also blacklist 32-bit AMD driver dll to workaround driver quirk 2023-10-30 10:24:30 +00:00
baldurk e16500c97f Only recreate depth on resize for D3D12 if depth was originally used 2023-10-30 10:24:30 +00:00
baldurk 8ba23ccea0 Process member decorations immediately in SPIR-V editor after parse 2023-10-30 10:24:30 +00:00
baldurk 29a2925eef Strip unused reflection of arrayed builtin outputs on vulkan 2023-10-30 10:24:30 +00:00
baldurk 89d482ec36 Handle barycentric shader builtin 2023-10-30 10:24:30 +00:00
baldurk a4da2f1eb2 Add SPIR-V processor accessors for data types and decorations by id 2023-10-30 10:24:30 +00:00
baldurk 84e61014a1 Add a SPIR-V editor helper to insert a sequence of operations at once 2023-10-30 10:24:30 +00:00
baldurk 2b779038af Add a SPIR-V editor helper to add or re-use a builtin input 2023-10-30 10:24:30 +00:00
baldurk f87c50af25 Add a SPIR-V editor helper to register a constant with a pre-given ID 2023-10-30 10:24:30 +00:00
baldurk 3ac150d273 Improve SPIR-V code generation
* Prefer vendor-neutral extension aliases for enums over vendor-specific.
* When disassembling opcodes with optional parameters, only include the
  parameters when present.
2023-10-30 10:24:30 +00:00
baldurk 8b4f04c58f Allow the pipeline flow chart control to change stages dynamically 2023-10-30 10:24:30 +00:00
Cam Mannett aec25cfcaa Add -Wno-deprecated-declarations to demo when NDK >=26 is used
Compiles the demo APK with -Wno-deprecated-declarations when the NDK is v26 or over, otherwise it fails to compile the fmt core header.  In the LLVM version used in the NDK, using std::char_traits with non-std types is marked as deprecated.
2023-10-27 18:12:15 +01:00
Cam Mannett 3746f83039 Minor functional test fixes
* Fixed issue where a previously built demo APK would be added into the APK archive upon next build
* Correct the functional test's --in-process help output
2023-10-26 15:38:48 +01:00