Commit Graph

10088 Commits

Author SHA1 Message Date
baldurk da7d27fe9b Explicitly list versions of all android build components supported 2020-01-27 20:45:08 +00:00
baldurk 560a9669f2 Log java versions in both PATH and under JAVA_HOME 2020-01-27 20:45:08 +00:00
baldurk 4e53297535 Don't pass 0xdeadbeef marker values to GL from client-side buffers
* The actual offsets will be overridden when client side buffers are used -
  these marker values are left-over from client side buffers being present when
  preparing a VAO's initial contents.
2020-01-27 20:45:08 +00:00
baldurk 83f0398aa6 Add test to parameter zoo to catch descriptor referencing resources 2020-01-27 20:45:08 +00:00
baldurk 1899b5ffc3 Pass size when fetching cbuffer variables 2020-01-27 20:45:08 +00:00
baldurk d2cd2f0291 Check that vkCmdFillBuffer usage is properly populated in VK_Indirect 2020-01-27 20:45:07 +00:00
baldurk bcb08c1948 Treat vkCmdFillBuffer the same as e.g. vkCmdClear*Image, as a draw
* We also add 'Clear' usage to the buffer for these events.
2020-01-27 20:45:07 +00:00
baldurk ce7f3c0fa4 Ensure we correctly patch-up resource usage after indirect count draws 2020-01-27 20:45:07 +00:00
Benson Joeris a03499d909 Add SEPARATE_DEPTH_STENCIL_LAYOUTS support in new image state
Change-Id: I54458143cd075c0239f55ccb7e50916d725188ec
2020-01-27 20:44:54 +00:00
Benson Joeris cb66100840 Add new image tracking to replay side
Change-Id: I67ef6b1f6fd9b84621ec6700a8260c24afb35a05
2020-01-27 20:44:54 +00:00
Benson Joeris 1d44386724 Add new image tracking to capture side
One notable high-level change is the behaviour of `StartFrameCapture`.
The previous implementation serialised the image state when
`StartFrameCapture` was called. The new implementation just sets the
"old" (beginnin go frame) image state (layouts/queue families) to be the
current state at this point; at `EndFrameCapture` the full image state
is serialised, including both the "old" (beginning of frame) and "new"
(end of frame).

Change-Id: I04c18c16a97e065c7a7d0edf058ba3f4803dcf45
2020-01-27 20:44:54 +00:00
Benson Joeris 888abc6a55 Added ImageState serialization
Change-Id: I87b2bc26bf1fc7d56b464ad2d67b6dbdc0c72ff6
2020-01-27 20:44:54 +00:00
Benson Joeris c55937ffbf Add LockingImageState
Change-Id: I8f1adc8617295d4a86067908ce8df85ea04e8365
2020-01-27 20:44:54 +00:00
Benson Joeris 96bbeea4a5 Add ImageState
`ImageState` tracks the state of images and their subresources.
This functionality was previously split between the `ImageLayouts` and
`ImgRefs` classes.

Change-Id: I3242417dacf73fe07765f9bcfd449599e373e10d
2020-01-27 20:44:54 +00:00
Benson Joeris 3d90609e39 Add ImageBarrierSequence
`ImageBarrierSequence` represents a sequence of batches of
`VkImageMemoryBarrier`s. The intended use case is setting image state,
which may involve a combination of layout transitions and queue family
transfers, and may require multiple barriers executed on different
queue families, in the correct order.

It is moderately expensive to execute a sequence of separate queue
submissions, with synchronization to prevent overlapping execution.
`ImageBarrierSequence` attempts to address this in two ways:
- `ImageBarrierSequence::Merge` allows separate barrier sequences (e.g.
  on separate images) to be merged, so that, e.g. the first batches from
  each of the barrier sequences are all run together.
- `InlineSetupImageBarriers`/`InlineCleanupImageBarriers` allow barriers
  to be inlined into an existing command buffer, when possible. E.g.
  to read the contents of an image, the barrier sequence may simply have
  a layout transition to `TRANSFER_SRC_OPTIMAL` (assuming the image is
  already on the correct queue family), and this can be inlined into the
  command buffer before executing the copy, avoiding the need for an
  extra queue submission.

Change-Id: I7f2edc650d9ff66871c9be5711789bfe33ca8c5e
2020-01-27 20:44:54 +00:00
Benson Joeris c84fcc2aae Add last present queue and semaphores to swapchain info
This is used for queue family tracking of presented images.

Change-Id: I64ac88a8e4b379bd947f56f5cf2c1db929e8c620
2020-01-27 20:44:54 +00:00
Benson Joeris 8ccff3de48 Make queue family available in vkCmd* functions
This allows much simpler analysis of queue families. E.g. in
`vkCmdPipelineBarrier`, we can differentiate between queue family
release and acquire operations; we can also mark used subresources as
implicitly acquired by the command buffer's queue family.

Change-Id: I3e90ea1be5938781bdec675e69918b5f2bc49a49
2020-01-27 20:44:54 +00:00
Benson Joeris e7303660d7 Add additional fields to ImageInfo
Three new fields are added to `ImageInfo`
- `VkImageType imageType`: this is used to distinguish 2D and 3D images,
  to correctly handle access through 2D image views.
- `VkImageLayout initialLayout`: this is the `initialLayout` in which
  the image was created (`UNDEFINED` or `PREINITIALIZED`). This is used
  to correctly initialize `PREINITIALIZED` images (See: TODO).
- `VkSharingMode sharingMode`: This is needed to correctly generate
  queue family transfers, because we must *not* generate queue family
  transfers for images with `CONCURRENT` sharing mode.

This also refactors `SwapchainInfo` to use `ImageInfo`, rather than
duplicating some of `ImageInfo`s fields.

Change-Id: Ic42077c382e4055cb27af069045c46eacbd122cc
2020-01-27 20:44:54 +00:00
Benson Joeris 687f12f492 Add ImageSubresourceRange
`ImageSubresourceRange` is a common representation of subresource
ranges of Vulkan images, including `VkImageSubresourceRange` and
`VkImageSubresourceLayers`.

Additionally, `ImageSubresourceRange` can represent a range of depth
slices--this is used to model access to 3D `VkImage`s through 2D
`VkImageView`s, where the view array layers are mapped to the image's
depth slices.

Change-Id: Id08329b499a02817ccd3487bdbb9c1bb0f86262a
2020-01-27 20:44:54 +00:00
Benson Joeris 35a15cf8d1 Add Unknown FrameRefType
This represents a (sub)resource for which no usage info is available.
It should be conservatively assumed that such a resource needs to be
re-initialized before each replay (and this behaviour is reflected in
`InitReq()`).

Change-Id: I12235a6cb1c4b2e3e21bed8834653ec6a3aea009
2020-01-27 20:44:54 +00:00
baldurk ecd108c6c3 Fix handling promotion of extensions
* An extension can be promoted but behind an optional feature bit
2020-01-24 12:37:30 +00:00
baldurk 3523d1ef15 Make sure to set correct buffer device address flag on memory for KHR 2020-01-24 12:15:56 +00:00
baldurk 2d668e13b7 Prevent race condition if multiple threads create identical D3D12 object
* We use HasWrapper() to deduplicate D3D12 objects which must not be created as
  duplicates, but we need to ensure that checking for existing wrappers and
  adding a new one all happens atomically with respect to other checks.
2020-01-23 15:51:13 +00:00
baldurk 332925d47e Handle OpLine/OpNoLine in SPIR-V disassembly 2020-01-23 15:08:02 +00:00
baldurk 0f8c9073b7 Hopefully fix handling of physical device functions in vkGet*ProcAddr 2020-01-23 12:32:04 +00:00
baldurk 4c9bb5d844 Add special push/pop logic for WGL contexts
* We can't easily restore the application's context if the DC that was current
  has been released. Instead we check to see if the last known window is still
  valid - if so, we get the DC handle from it. If not then we assume that
  rendering to the application's context setup would have failed so we bind our
  own backdoor window (but with the application's context still).
2020-01-22 19:05:53 +00:00
baldurk 14b3a06361 Add test of D3D12 ExecuteIndirect 2020-01-22 19:05:53 +00:00
baldurk a49f3f5462 Add test of degenerate vertex shaders with no outputs but full GS output 2020-01-22 19:05:53 +00:00
baldurk 9b29c5b35e Fix selection of MSAA pipeline variant on D3D12 2020-01-22 19:05:53 +00:00
baldurk d8c112dd78 Don't try to initialise texture when structured exporting on GL 2020-01-22 19:05:53 +00:00
baldurk 6c68576707 Add workaround for strange systems with difficult visualinfo setups 2020-01-22 19:05:53 +00:00
Steve Karolewics 0d2275ac02 Fix pixel pick value in D3D12 with a sRGB target 2020-01-22 19:05:37 +00:00
Aliya Pazylbekova ea5e63cfa6 VK pixel history: Update which tests failed
Run the same draw multiple times with an occlusion query and
tweaking the graphics pipeline to figure out which test failed
(if any).
2020-01-22 19:05:25 +00:00
baldurk 9dc53d4dd1 Add a test of D3D12 sharing resources 2020-01-21 18:28:57 +00:00
baldurk 1cb3cd5a1b Handle replaying captures that use VK_EXT_tooling_info 2020-01-21 18:28:57 +00:00
baldurk 60951195c2 Use VK_EXT_tooling_info in VK_Simple_Triangle 2020-01-21 18:28:57 +00:00
baldurk a869f12c9c Update vulkan headers and volk in tests project 2020-01-21 18:28:57 +00:00
baldurk 1a93888999 If no vertex pick result is found in a single instance, return error
* We don't want to return that no vertex was found in one particular instance,
  as that is misleading.
2020-01-21 18:28:57 +00:00
baldurk 45f983f97b Fix compilation of GL demo on linux 2020-01-21 18:28:57 +00:00
baldurk 0dd050f785 Add extra warning if target control ident isn't found on linux systems 2020-01-21 18:28:57 +00:00
baldurk 6b1d186e6f Collapse variable initialisation & assignment into just init
* This doesn't make any difference but removes some warnings from PVS Studio and
  is slightly cleaner.
2020-01-21 18:28:56 +00:00
baldurk 4a779e371b Add bracketing to macro use of parameters 2020-01-21 18:28:56 +00:00
baldurk 322e3c667d Fix some memcpy/pointer access issues identified by PVS Studio
* I don't think any of these were bugs, but they're certainly better off being
  fixed.
2020-01-21 18:28:56 +00:00
baldurk 7dd116abd4 Remove redundant/tautological comparisons identified by PVS Studio 2020-01-21 18:28:56 +00:00
baldurk 8fa93105f2 Fix some casts/calculations to keep PVS Studio happy
* It identifies some potential overflows which we know likely won't happen, but
  the fixes are harmless.
* Some issues are definitely bad, though not actual bugs.
2020-01-21 18:28:56 +00:00
baldurk baac06ca93 Remove redundant/dead code identified by PVS Studio 2020-01-21 18:28:56 +00:00
baldurk 68b9d223b0 Add explicit comparisons where we were implicitly checking for non-zero
* This fixes some warnings from PVS Studio, though none of these checks were
  actually wrong it's better to be explicit.
2020-01-21 18:28:56 +00:00
baldurk 421201df7a Fix support for fetching postvs from vertex shaders using subgroups 2020-01-21 18:28:56 +00:00
baldurk a2ce7215ff Ensure work is flushed before D3D12On7 presentation 2020-01-21 18:28:55 +00:00
baldurk 22dd60e0f1 Support MSAA backbuffers for headless outputs on D3D12 2020-01-21 18:28:55 +00:00