Commit Graph

9131 Commits

Author SHA1 Message Date
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
baldurk 29a63245ee Don't try to create initial states for render buffers 2019-06-18 15:54:38 +01:00
baldurk 96b13075c5 Fix 32-bit compilation of autotest demos 2019-06-18 15:54:38 +01:00
Benson Joeris 71ab0c508c Vulkan: Switch commands to use new image subresource tracking
Change-Id: Ic87e341239842e4b40aa06c751540e227b643083
2019-06-18 15:54:23 +01:00
Benson Joeris accbca579c Vulkan: Add image subresource tracking for descriptor set records
Change-Id: Ic336b5e65435743729e85ed231ad114f556b3811
2019-06-18 15:54:23 +01:00
Benson Joeris 666e6730df Vulkan: Add image view tracking for command buffer records
Change-Id: I60718d7d7dbadd0e1ed1c8072d87f2de49282f08
2019-06-18 15:54:23 +01:00
Benson Joeris 0f8c1d3f09 Vulkan: Add image tracking for command buffer records
Change-Id: Iecac4cc07453457d289fd04788cf5eb0c2942f0c
2019-06-18 15:54:23 +01:00
Benson Joeris 16e410d310 Vulkan: Add image subresource tracking to VulkanResourceManager
Change-Id: I9e14cb8bbb98142c8b6ff194c0d989e22f040a06
2019-06-18 15:54:23 +01:00
Benson Joeris 54c5a9c303 Vulkan: Fix EndFrameCapture with null wnd
This ensures that a thumbnail is created using the image from last
presented swapchain.

This swapchain, and the thumbnail still could be null. `CreateRDC` was
incorrectly asserting that the thumbnail contained non-null data. In
fact, `CreateRDC` already behaves correctly in the case of null
thumbnail data, so this assertion is removed.

Change-Id: I5b35463898029b0130fe9d8f39dda30e192deef6
2019-06-18 11:18:05 +01:00
Benson Joeris e702598212 Vulkan: ImgRefs now uses ImageInfo.
Also added some additional `ImgRefs` tests for 3d images.

Change-Id: I36805ef5135207e691a1c27e6b4fd0903bb8a4f3
2019-06-13 18:33:03 +01:00
Benson Joeris aa62d20477 Vulkan: Make image info available through ResourceInfo
The image info (layerCount, levelCount, sampleCount, extent, format,
type)  was previously only available through `ImageLayouts`. This info
is now also stored in `ResourceInfo`.

Storing this in `ResourceInfo` makes this info easily accessible from
`VkResourceRecord`s representing `VkImage`s and `VkImageView`s. This
simplifies upcoming changes to the image tracking and avoids the lock
protecting the `m_ImageLayouts` map.

To simplify this duplication, a new struct `ImageInfo` is added here to
hold the image info in both `ResourceInfo` and `ImageLayouts`.

Change-Id: I390cbba4c3ce7b0bd6f004521497c21bf4c1e97f
2019-06-13 18:33:03 +01:00
Benson Joeris e66acc5429 VkResourceRecord::resInfo presence no longer indicates sparse bindings
This VkResourceRecord::resInfo being non-null was previously used as an
indicator that VkBuffer or VkImage resources had sparse bindings. Now,
`resInfo->IsSparse()` must also be true for the resource to be
considered as having sparse bindings.

Change-Id: Ia8a93ecb3248a682f71fcf6455d0d583ca129679
2019-06-13 18:33:03 +01:00
baldurk 5556eb3c93 Add missing serialise instantiation 2019-06-13 18:31:28 +01:00
baldurk 16985b8098 Allow unknown GUIDs to be queried via EnumAdapter* calls 2019-06-13 14:01:52 +01:00
baldurk 6adaa4dd09 Handle querying for ID3D12Pageable on interfaces that support it 2019-06-13 14:01:37 +01:00
baldurk 0bef9cb973 Do friendly stringification of vulkan API versions in serialised data
* We use a wrapper type instead of uint32_t to let us stringify it as
  VK_MAKE_VERSION
2019-06-13 10:07:20 +01:00
baldurk 88189e316f End stream-out queries in ClearState(). Closes #1412
* Also add tests of stream-out and DrawAuto()
2019-06-12 19:07:22 +01:00
baldurk 48cdc00b7f Fix callback not being run for injection path. Closes #1411 2019-06-11 20:33:20 +01:00
baldurk dc93c71a1f Patch chunkIndex for vkBeginCommandBuffer event in vkCmdExecuteCommands 2019-06-10 14:39:03 +01:00
baldurk 28e4660ffe Sanitise image layouts for revert of partial renderpass layout changes 2019-06-10 14:38:23 +01:00
baldurk c155a85945 Always emulate EXT_direct_state_access on replay. Closes #1409
* Some drivers like NV are buggy with EXT_dsa functions leaking state or
  breaking objects
2019-06-10 11:39:13 +01:00
baldurk f31f9e46a4 Fix linux build 2019-06-07 19:51:27 +01:00
baldurk 3d81638d06 Fix some copyright dates still referring to 2018 2019-06-07 18:54:10 +01:00
baldurk f09c40b8c9 Fix broken cases with GL_ARB_gl_spirv. Closes #1405
* We can't rely on the driver's reflection, since name information might be
  stripped and the driver is within its rights to not reflect anything even if
  we have names. Similarly queries by names etc will not work.
* Also we can't try to change bindings that are immutable on SPIR-V shaders -
  UBO/SSBO bindings, transform feedback varyings, attrib and fragdata locations.
* Programs can't mix and match SPIR-V and GLSL, so when including our own
  shaders in the overlay program make sure they match what the user's shaders
  are.
* For mesh output, we need to patch the SPIR-V if it's a SPIR-V shader instead
  of trying to use the GL XFB varyings set.
2019-06-07 18:53:02 +01:00
baldurk 48d854365d Move AddXFBAnnotations into common SPIR-V code so it can be shared 2019-06-07 18:45:57 +01:00
baldurk c15693d149 Generate fixedcol and quadwrite overlay shaders in SPIR-V on GL
* Only when the extension is supported - otherwise we won't need it
2019-06-07 18:45:27 +01:00
baldurk 28cde37849 Add support for generating SPIR-V shaders for OpenGL
* Only a couple of these are needed - ones we might link with user shaders in a
  program
2019-06-07 18:44:13 +01:00
baldurk 9e09de40ce Fix analytics tracking of capture features
* We want these flags to be 'sticky', not to be unset if they aren't used in a
  capture.
2019-06-06 17:39:14 +01:00
baldurk f58f5dd406 Fix double-delete of GL program. Refs #1406 2019-06-06 13:11:59 +01:00
baldurk 7c6921248f Exit on compile error on travis OSX build 2019-06-05 19:03:57 +01:00
baldurk c082a3ca7d Fix apple build 2019-06-05 19:01:42 +01:00
baldurk 70007d0794 Don't consider interim position builtins to be projected/rasterized
* Even if the VS outputs to the position builtin, if there's a tessellation or
  geometry shader consuming it that doesn't mean much.
2019-06-05 17:57:28 +01:00
baldurk 700b100dc5 Add /usr/local/lib to macOS vulkan search path attempts 2019-06-05 17:57:28 +01:00
baldurk 257e78dbff Return dummy do-nothing IDXGIInfoQueue, the same as ID3D11InfoQueue 2019-06-05 17:57:27 +01:00
baldurk 63386cb765 Add extra check to not try to delete shader/program 0. Closes #1406
* The GL spec says that this is clearly allowed, but some buggy Android drivers
  throw warnings or errors so we can add this harmless check on shutdown.
2019-06-05 17:52:56 +01:00
Benson Joeris be2a6549dd Vulkan: Add ImgRefs to track usage of image subresorces
Change-Id: I7f111fb8aa4e1296315a8c852830205cf51f05e5
2019-06-05 09:52:33 -07:00