Commit Graph

9166 Commits

Author SHA1 Message Date
baldurk 2bb351fe0e Handle newer StorageBuffer storage class for reflection. Closes #1431 2019-07-01 16:57:56 +01:00
baldurk ad2c4a4dc6 Update vulkan headers to 1.1.113 and add support for new extensions
* VK_EXT_shader_demote_to_helper_invocation and VK_EXT_texel_buffer_alignment
2019-07-01 16:57:56 +01:00
baldurk 268173982a Fix return value of RemoteServer::DriverName() 2019-07-01 16:57:56 +01:00
baldurk af19a21e4c Clarify that android builds are only supported from a proper bash shell
* Not from the windows cmd prompt
2019-07-01 14:56:48 +01:00
baldurk 853189a3f3 Java is required for android builds 2019-07-01 14:56:24 +01:00
baldurk 679a71c345 Don't use -Werror on any kind of release build 2019-07-01 14:56:11 +01:00
baldurk 8ba6a72a70 Don't rely on awk/sed in cmake build. Closes #1430
* It's theoretically possible to have a bash shell without awk or sed available
  (though very strange), so we can use cmake string processing & configure_file
  to get the same effect.
2019-07-01 14:55:53 +01:00
baldurk 10f83298be Restore D3D11 context bindings before fetching global state
* Otherwise the UAV data fetched is from our internal UAVs used for snooping and
  fetching interpolated data.
2019-06-28 23:55:42 +01:00
baldurk bfe13573ed Add support for VK_EXT_fragment_shader_interlock 2019-06-28 14:38:41 +01:00
baldurk 52f204e5b5 Add support for VK_EXT_headless_surface 2019-06-28 14:32:07 +01:00
baldurk fd3c2c8d2f Add support for VK_KHR_surface_protected_capabilities 2019-06-28 14:32:07 +01:00
baldurk f2b9eef970 Add support for VK_KHR_uniform_buffer_standard_layout 2019-06-28 14:32:07 +01:00
baldurk fcd31fb949 Update to vulkan headers 1.1.112, and use own generated dispatch tables
* This removes the dependency on vk_layer_dispatch_table.h which makes it easier
  to update the vulkan headers in future.
2019-06-28 14:09:20 +01:00
baldurk f672db4a2b Add our own generated replacement for vk_layer_dispatch_table.h
* This way we only depend on vk.xml and the vulkan headers directly, not on this
  SDK/Vulkan-Loader generated file.
2019-06-28 13:39:32 +01:00
baldurk 56663ccfef Fix linux build 2019-06-28 11:43:19 +01:00
baldurk 7275934551 Add check in windows Qt project for PySide existence 2019-06-28 11:43:19 +01:00
baldurk 9780c6bb77 Add passthrough hooking of EGL 1.5 2019-06-28 11:01:27 +01:00
baldurk 7715188d0d GLES 3.1 can't handle MSAA array textures, only 3.2 can 2019-06-28 11:01:19 +01:00
baldurk 0dcedbbbcf Fix warnings on various GCC versions
* Primarily this change fixes -Wdeprecated-copy on GCC-9, but it also tidies
  warnings on other versions.
2019-06-27 11:47:45 +01:00
baldurk 9b70400eff Remove DENY_SHADER_RESOURCE flag on MSAA textures in D3D12
* We need to use MSAA textures as SRVs for copying them out in initial states.
2019-06-27 10:22:14 +01:00
baldurk ada5e55b28 Add some single-flush-validate code into D3D12 initial state preparation 2019-06-27 10:22:14 +01:00
baldurk 50266cdee2 Fix serialisation of D3D12_WRITEBUFFERIMMEDIATE_PARAMETER's gpu address 2019-06-27 10:22:13 +01:00
baldurk 24d55fde9f Don't crash in CreateUnorderedAccessView if a NULL descriptor is passed 2019-06-27 10:22:13 +01:00
baldurk 6487acdf0f Fail to capture if Create*PipelineState has no valid shader code
* This typically means that the user hasn't checked correctly for SM6 feature
  support before trying to upload DXIL shader, which will then result in
  unpredictable behaviour or crashes on replay.
* During capture we detect this and flag it in the overlay text, and prevent
  capturing. On capture load we fail to load if we detect such a PSO.
2019-06-27 10:22:13 +01:00
baldurk 039b65f89f Add a viewer of the diagnostic log in the UI itself 2019-06-27 10:22:13 +01:00
Benson Joeris 473d8a8e30 Vulkan: Optimize image barriers in Apply_InitialState
This changes the behaviour of Apply_InitialState for images with
BufferCopy type InitialState. Previously, the entire image was
transitioned to DST_OPTIMAL, along with a possible queue family
ownership transfer. Now, only the image subresources that are actually
copied/cleared are transitioned.

Change-Id: I92ab4d7160e99b81222231d1d974e707a55f7aef
2019-06-26 15:10:58 +01:00
Benson Joeris d6761de26d Vulkan: Optimize image copies in Apply_InitialState
This uses the new image tracking to avoid unnecessary copying of image
data when applying the initial state.

This change only affects image resets when all of the following apply:
  - The image initial contents tag is `BufferCopy` (not
    `ClearColorImage` or `ClearDepthStencilImage`),
  - The image is single sample,
  - The image is non-sparse,
  - The image has `ImgRefs` data,
  - The image has been completely initialized at least once, and
  - VulkanResourceManager::OptimizeInitialState() is true (currently
    disabled by default).

When all of these conditions are met, data will only be copied for those
image subresources which require reset according to the ImgRefs data.

Change-Id: I449eabfe969229fa64e233760aaadb489776ee23
2019-06-26 15:10:58 +01:00
baldurk 22203fbb02 Add checks for quad overdraw and triangle size overlays on mac
* These features aren't supported by the underlying implementation.
* Triangle size we can feature-detect properly - by checking for geometry shader
  support. Quad resolve should be supported but metal doesn't allow atomics on
  images so we have to check specifically for a metal backend.
2019-06-26 12:45:58 +01:00
baldurk 05282a3bdf Force linear images to be dirty on creation on vulkan
* This is necessary for e.g. the cube demo where it can create the image as
  LINEAR in HOST_VISIBLE memory and then the image never gets dirtied, so we
  don't properly create initial contents for it - instead only fetching the
  underlying memory which is not technically legal.
2019-06-26 12:23:44 +01:00
baldurk 2b7bcccbc6 Don't continue with vulkan postvs fetch if PSO fails to compile
* MoltenVK sometimes has problems with shader translation so we want to handle
  this gracefully if possible.
2019-06-26 11:29:18 +01:00
baldurk 88a5b4e0cf Add precise qualifiers on DXBC operations disassembly 2019-06-26 10:27:10 +01:00
baldurk ea12625193 Fix missing handling of DXGI_FORMAT_A8_UNORM 2019-06-25 20:19:37 +01:00
baldurk e525630a17 Add special resource type for A8_UNORM. Closes #1426
* While it's redundant this format is still valid in D3D so needs to be handled
  correctly.
2019-06-25 19:08:07 +01:00
baldurk 8fb0a3b80e Error out of D3D12 postvs calculation if too much data is generated 2019-06-25 19:08:07 +01:00
BJ 42e0ee8a36 Fix OpenGL integer vector uniforms
Initial state was only being serialized for the first element.
2019-06-25 19:07:46 +01:00
baldurk 0d2849458b Install generic gcc/g++ packages so configure scripts can find them 2019-06-25 10:55:48 +01:00
baldurk a90ec1ecbf Fix Qt Creator compilation on windows 2019-06-24 14:07:41 +01:00
baldurk 433222997f Always close pipes opened for subprocess communication. Closes #1424
* We still need to close the stdout/stderr pipes even if the subprocess failed
  to launch, otherwise we leak the fds.
2019-06-24 13:52:42 +01:00
baldurk 51de7255d3 Stop static linking libstdc++ in release builds
* This seemed to cause crashes on some systems as libproxy links to libstdc++
  and can then cause symbol conflicts between the static libstdc++ and the
  system's libstdc++.
* libproxy itself cannot be statically linked, so the solution is either to
  configure Qt without libproxy and break anyone who needs proxy support, or
  stop statically linking libstdc++ and add a new dependency. At commit time
  most distributions have at least g++-5's libstdc++ in their minspec so we can
  require that - the main two that seem to fall short are Debian Jessie and
  CentOS 7. Users on those systems will have to install a newer libstdc++ or
  compile from source rather than using the binary releases.
2019-06-24 13:27:45 +01:00
baldurk 1fcac940ae Always patch functions looking for bindless descriptor access
* Even if a function isn't passed a global binding array as a parameter, we
  still need to patch it in order to find any accesses it makes directly to
  global resources just as we do in the entry point.
2019-06-24 10:21:23 +01:00
baldurk a5c909ec0c Don't try to use MSAA array textures on MoltenVK 2019-06-21 12:51:52 +01:00
Benson Joeris f44ed367d6 Vulkan: Added serialization of image subresource ref type
Change-Id: Ifae412f3b4a171148f22b11825a370b84de816ee
2019-06-21 10:14:29 +01:00
Benson Joeris f4e7231fd5 Remove ImageInfo::imageType for serialization compatibility
This field was recently added to the `ImageInfo` struct, but had not yet
been added to the `ImageInfo` serialization. Serializing this field
would unnecessarily break capture compatibility.

The `imageType` field was added to detect 3D images--depth slices of 3D
images are interpreted as array layers when accessed through a 2D image
view. This data is (almost) redundant, because 2D images must have
`extent.depth==1`, according to the Valid Usage for `VkImageCreateInfo`.
The application could create an image with
`imageType==VK_IMAGE_TYPE_3D`, but with `extent.depth==1`; we would
interpret this as a 2D image, but, since this image would have 1 array
layer and 1 depth slice, this doesn't actually cause an issue.

Change-Id: I3d53d942cbe8f240845a80f6e12a7cecfdd86967
2019-06-21 10:14:29 +01:00
baldurk 38f0d27901 Use configure_file in CMake to force rebuild if git commit changes
* We also only use GIT_COMMIT_HASH where necessary to avoid rebuilding many
  files for no reason, including splitting version.cpp out into a separate
  project as we do with VS since otherwise changing its preprocessor defines
  rebuilds the whole renderdoc project.
* At the same time, move the git hash to be internal only so we don't have to
  try to link version.cpp into other projects like renderdoccmd or qrenderdoc.
2019-06-20 19:14:14 +01:00
baldurk cfa8e7c83e Remove old unused version tagging in embedded android library 2019-06-20 19:14:14 +01:00
baldurk 4547401c61 Set DisableFastUpToDateCheck on git version project
* This means the git commit is always fetched (which is cheap anyway) and
  projects get re-built with updated git commit version info
2019-06-20 19:14:14 +01:00
Aliya Pazylbekova e21ddb4877 Set analytics APIs for remote capture file and replay
The API used was not populated for the case of remote
capture and replay.
2019-06-20 19:13:57 +01:00
baldurk 4923aa9d88 Use up to date end pointer when patching android manifest. Closes #1415 2019-06-18 15:54:38 +01:00
baldurk bd36bccd43 Synchronise properly when passing commands to capture connection thread 2019-06-18 15:54:38 +01:00
baldurk 14b8560ebb On GL don't render from empty buffers - it can crash drivers 2019-06-18 15:54:38 +01:00