Commit Graph

9084 Commits

Author SHA1 Message Date
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
baldurk 217506869f Only patch vulkan image layouts at the last second
* Instead of patching e.g. PRESENT to GENERAL early, we keep the 'real' layout
  even if that's UNDEFINED or PRESENT or whatever. We then do a last-second
  patchup whenever we're actually transitioning images in vulkan itself, to set
  the right layout.
* This requires us to do the patching in a few more places - anywhere like
  texture rendering or initial states where we want to go from current state ->
  custom state -> back to current state.
* This also allows us to more gracefully handle PREINITIALIZED image layouts. We
  internally promote them to GENERAL as soon as possible, but keep them around
  as PREINITIALIZED for display.
2019-06-04 18:18:10 +01:00
baldurk bbcf97efa2 Use nonCoherentAtomSize as an additional alignment for Vulkan buffers
* This isn't technically true but it makes the code much simpler to align
  offsets and sizes to it, so that then map flushes and invalidates all happen
  on multiples of the atom size.
2019-06-04 18:18:10 +01:00
baldurk 453c5ea9fc Don't try to reset states for images with no memory bound
* Normally such images wouldn't be in the capture at all since there's no way to
  reference them until after their memory is bound, but with "Ref all resources"
  it's possible.
2019-06-04 18:18:10 +01:00
baldurk bf4ea85470 Skip descriptorCount == 0 bindings when applying initial state
* This could cause memory corruption if the final binding(s) were so empty as we
  write off the end of the array before eventually skipping.
2019-06-04 18:18:10 +01:00
baldurk 776b9d048f Lock around mangement of D3D12 resource maps 2019-06-04 18:18:10 +01:00
baldurk 4738844122 Allow choosing activities for an android program. Closes #1387 2019-06-04 18:18:09 +01:00
ruslan_kutdusov e8e3972953 Fix error in D3D11DebugManager::CopyArrayToTex2DMS
* There was an error in case of depth copy. Before the first draw only
  registers t1-t9 are cleared, but shader also expects 2D Array SRVs on t11
2019-06-04 10:17:55 -07:00
ruslan_kutdusov 5291a9c19d Fix error in D3D11DebugManager::CopyTex2DMSToArray
* There was an error in case of depth copy. Before the first draw only first
  8 registers are cleared, but shader also expects 2D MS SRVs on t11-t15
2019-06-04 10:17:55 -07:00
baldurk 9c8018ba18 Fix linux build 2019-06-03 15:32:17 +01:00
baldurk 0842e50cb1 Don't transition to UNDEFINED if undoing implicit barriers. Closes #1394 2019-06-03 14:16:43 +01:00
baldurk 1fd75c50f8 Disallow implicit casts to/from SPIR-V Id
* This can lead to bugs, so instead we should be explicit about what is an ID
  and what is a uint
2019-06-03 14:16:43 +01:00
baldurk 587d562fa3 Fix NaN and INF value comparisons in tests 2019-06-03 14:16:43 +01:00
baldurk d4e7a0633c Move SPIRVId/SPIRVIterator/SPIRVOperation to common header
* We also add an rdcspv namespace, which we'll be generating our own enums etc
  to replace the spirv.hpp spv namespace.
2019-06-03 14:16:43 +01:00
baldurk c3d5924f0d Remove unnecessary includes in Intel GL counters project 2019-06-03 14:16:42 +01:00
baldurk a27234c28c Split apart some of the SPIR-V headers
* We don't want to have glslang specific bits mixed in with general SPIR-V bits.
  This is also preparing for moving some SPIR-V structs into common code that
  can be re-used in new reflection/disassembly as well as editing.
2019-06-03 14:16:42 +01:00
baldurk 312b448f72 Convert tabs to 4-spaces 2019-06-03 14:16:42 +01:00
Benson Joeris 7f955daa40 Add BitFlagIterator to iterate over bits
Change-Id: I201eaa36ab50b42e32aa06976d34c1c070b8a3c4
2019-05-31 07:26:43 -07:00
Benson Joeris 08f9a93574 Vulkan: Add ImageLayouts::imageType
The image type is required to correctly handle 3D images accessed through 2D
views

Change-Id: I18364584413d83c186535f1091226c00d2bbf018
2019-05-31 02:26:37 -07:00
Benson Joeris bc9f84f61b Vulkan: Add FormatImageAspects to get VkImageAspectFlags from VkFormat
Change-Id: I82c13d0e106dcd579096f0a4e0e5ffe50bae3092
2019-05-31 02:25:27 -07:00
baldurk 2e578ee418 Emulate EXT_direct_state_access functions when emulating other exts
* Also add explicit prints for each extension we emulate
2019-05-29 17:37:53 +01:00
baldurk d86d270f3e Fix float value comparisons, only consider values equal if both are NaN 2019-05-29 10:49:59 +01:00
baldurk cf4ddc3434 Clean up vulkan creation info when destroying objects
* Otherwise internal resources like pipelines for mesh-output fetch can lurk
  around in the creation info structures and cause problems when e.g. editing
  shaders.
2019-05-27 17:44:52 +01:00
baldurk 395fb3ed50 Use KHR_driver_properties and versions to better match physical devices 2019-05-27 17:34:32 +01:00
baldurk 2ff6adb659 Add tests of D3D11 and D3D12's mutable typed backbuffer formats 2019-05-27 14:12:07 +01:00
baldurk 4b1f527eaa Clean up D3D11 shader debugging test for easier processing, auto-test it 2019-05-27 13:58:08 +01:00
baldurk 5f6be4c10b Fix old main() test signatures 2019-05-27 13:30:03 +01:00
baldurk ffe2ec7aba Workaround Intel driver not reflecting array if [0] isn't accessed 2019-05-27 13:23:41 +01:00
baldurk 877802bef2 Check descriptor indexing test doesn't overflow physical device limits 2019-05-27 13:23:29 +01:00
baldurk 789abdf130 Remove no-longer used shadow pointer members 2019-05-27 12:48:55 +01:00
baldurk 72ddba1a58 Check second draw with vertex offset in primitive restart test 2019-05-27 12:01:40 +01:00
baldurk 1fbcade162 Add test of GL's per-type texture unit bindings 2019-05-27 11:49:06 +01:00
baldurk 7ab3d943b0 Add helper function to look up ResourceDescription for a ResourceId 2019-05-27 11:48:06 +01:00
baldurk fe406b8ce9 Fix capture times not being timezone-adjusted. Closes #1393 2019-05-27 10:56:08 +01:00
baldurk 605f77217d Don't automatically open a single capture if a dialog is open
* Prevents a crash if the LiveCapture window is closed while it owns a popup
  dialog for e.g. saving or deleting a capture.
2019-05-27 10:21:30 +01:00
baldurk 57084fd911 Check final memory usage, not peak memory usage, in Repeat_Load test
* We are really looking for persistent memory leaks here not fluctuations in
  memory use. There are too many false positives from memory usage increasing up
  high part-way through the iterations and then reducing down for the final
  iteration, which could be many lazy or deferred things running and completing
  over time.
2019-05-27 10:09:32 +01:00
baldurk 38d3145964 Be more generous with glslc timeout 2019-05-25 16:57:38 +01:00
baldurk e353d23364 Don't require /tmp/rdoc_tmp to exist 2019-05-25 16:36:18 +01:00
baldurk dc7ef30a60 Fix tests compiling with threads on linux 2019-05-25 15:01:48 +01:00
baldurk db81116fae Image clears should still dirty on vulkan
* Even though a clear feels like it shouldn't dirty the image, it still means a
  write to the image which we need to be sure to save as initial contents.
2019-05-24 20:03:53 +01:00
baldurk e9dda84b9f Add test that draws many windows in parallel 2019-05-24 20:03:20 +01:00
baldurk 3c4dbaca30 Factor out window-specific and related resources separately in tests
* This will let us run multiple windows (and multiple threads) relatively
  easily.
* The hammer is fairly big, we move some things into the window that don't need
  to be there necessarily if we have multiple windows on a single thread, but it
  keeps things simple.
2019-05-24 19:57:13 +01:00
baldurk 42f074187c Fix some validation issues with tests 2019-05-24 19:17:11 +01:00
baldurk bdf7213613 Add tests for edge-case vertex attributes & interpolators
* Tests that we can pass integer, double, matrix, array values through the
  vertex pipeline and query the correct values at each stage.
2019-05-24 17:12:55 +01:00
baldurk 6e2e2abb22 Fix check for strip restart, only apply if an index buffer is active 2019-05-24 17:12:55 +01:00
baldurk 3999dd0091 Fix incorrect resource type on D3D12 initial contents objects 2019-05-24 17:12:55 +01:00
baldurk 4451c9d67f Fix semantic comparisons in PipeState::GetVertexInputs() 2019-05-24 17:12:55 +01:00
baldurk b6104da0af Remove GL shader/program object labels, add support for geometry shaders 2019-05-24 17:12:55 +01:00