Commit Graph

9181 Commits

Author SHA1 Message Date
Benson Joeris 30b02bc1dd Refactor ComposeFrameRefsUnordered
Change-Id: I4d80b626c3c37a4c576024b3f8c2145dcb3bf108
2019-07-09 16:15:56 +01:00
Benson Joeris 7edd6c0ab5 Add ComposeFrameRefsDisjoint
Previously, the ref type of the a VkDeviceMemory or VkImage resource
was calculated as the max of the ref types of the subresources. This
reliance on the ordering of the `FrameRefType` enum values is fragile--
in particular, this makes it more difficult to add new `FrameRefType`
alternatives.

Now, the ref type of composite resources are calculated using
`ComposeFrameRefsDisjoint` instead of `max`.

Change-Id: Id5db68b6756555cdc6b068d28f1b72cb827f3d1e
2019-07-09 16:15:56 +01:00
Aliya Pazylbekova c2db43aff5 vkCmdBlitImage dst image should have ResolveDst usage 2019-07-09 11:03:54 +01:00
baldurk e696c86170 Fix checks for extensions in GL counters. Closes #1442
* GLES doesn't support ARB_occlusion_query2 at all, and ARB_timer_query (or
  equivalent) may not be available for durations.
* Check for ARB_query_buffer_object before pushing or popping query buffer
  binding.
2019-07-05 14:02:33 +01:00
baldurk d03fd1dd25 Fix support for arrays-of-struct vertex outputs. Closes #1438 2019-07-04 16:28:15 +01:00
baldurk b5d10de243 Handle formatting double signature parameters 2019-07-04 12:50:30 +01:00
baldurk b89c80546c Don't generate recursive callbacks when changing capture comments 2019-07-03 20:51:57 +01:00
baldurk 0766028724 Change wording of non-core context GL overlay warning
* Technically if you create a context with *CreateContextAttribsARB and don't
  specify a profile mask at all, the spec says the value of the profile bit is
  CORE_PROFILE_BIT. In practice this means drivers may or may not give you a
  core or compatibility profile.
* However what we're really looking for here is the chance that the user code
  will use only modern GL or will use deprecated functionality, and in that case
  the high likelihood is if they omit the PROFILE_BIT entirely they are probably
  unaware of it, rather than letting it set its default value.
2019-07-02 19:15:36 +01:00
baldurk 69ca268f5f Fix android build 2019-07-02 18:12:45 +01:00
baldurk ffaa445cf2 Unbind annoying buffer binds on GL that mess with normal functionality 2019-07-02 17:22:53 +01:00
baldurk 534f39c723 Don't try to populate maps from dirty resources with no initial contents
* If a buffer has been marked as dirty mid-frame but wasn't dirty at the start
  of the frame then it won't have initial contents. We have to treat it as if it
  wasn't dirty and fall back to using our existing data for it, assuming that is
  a valid way to pre-populate the map's shadow buffer.
2019-07-02 16:57:12 +01:00
baldurk 31fff66d4c Don't try to fetch resource format for uninitialised render buffers 2019-07-02 16:57:12 +01:00
baldurk 2a0ddea474 Fall back to solid pipeline if lit mesh render pipeline is not available
* This is possible for point list topologies
2019-07-02 16:57:12 +01:00
Steve Karolewics 731b701107 Add support for WKPDID_D3DDebugObjectNameW 2019-07-02 09:13:37 +01:00
baldurk b1e6140747 Fix VulkanRenderState copying. Closes #1432 2019-07-01 17:03:38 +01:00
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