Commit Graph

7266 Commits

Author SHA1 Message Date
baldurk d016aacb92 Add wrapper around RGP interface to expose to replay drivers 2018-04-25 19:10:47 +01:00
baldurk b0f4aebaa9 Commit RGP dependencies, building in separate project
* This is:
  - GPUOpen-Tools/DevDriverTools @ 92b3e34
  - GPUOpen-Tools/common-lib-amd-ADL @ 99cb60e
2018-04-25 10:44:53 +01:00
baldurk cbc01342a8 Expose VK_KHR_external_fence* extensions. Closes #742 2018-04-24 19:24:17 +01:00
baldurk ca38fb1a85 Implement extension VK_KHR_maintenance3.
* Not much to do here - this extension only exposes some queries, which
  we just need to ensure we can pass along and unwrap.
2018-04-24 19:24:16 +01:00
baldurk a1f5dbdaa6 Implement extension VK_KHR_maintenance2. Closes #818 2018-04-24 19:24:09 +01:00
baldurk bbc0581e7e Implement support VK_EXT_conservative_rasterization. Closes #898 2018-04-24 19:23:51 +01:00
baldurk e9a47112d4 Prepare for actually serialising pNext pointers in structs
* Any struct with a pNext pointer gets a Deserialise function, to clean
  up any dynamically allocated chains.
* The mechanism is as follows:
  - On writing, walk the pNext chain (assuming there is one) and skip
    any structs we don't care to serialise.
  - When we reach a struct we do want to serialise, save a nullable (i.e
    optional) VkStructureType* for it, then recurse and serialise the
    nullable casted struct.
  - If there is no pNext (or none we care about) we serialise a NULL
    VkStructureType*
  - On reading, we serialise the VkStructureType*. If it's NULL, rename
    it to look like a void *pNext = NULL.
  - If it's not NULL, use the structure type to serialise a nullable
    struct of the right type, and recurse.
* The pNext chain is dynamically allocated, which is why it gets cleaned
  up in the Deserialise() function.
2018-04-24 19:23:32 +01:00
baldurk 0fbeace478 Implement VK_KHR_bind_memory2 2018-04-24 15:57:44 +01:00
baldurk 8e0fd077a1 Report support for several SPIR-V side extensions
* These extensions don't need any special support from us, and only
  affect the SPIR-V consumption.
* The list of extensions is:
  - VK_KHR_16bit_storage
  - VK_KHR_relaxed_block_layout
  - VK_KHR_storage_buffer_storage_class
  - VK_KHR_variable_pointers
2018-04-24 15:45:26 +01:00
baldurk 4879f6da6e Mark which members of VkDescriptorImageInfo are valid to serialise
* We need to pass flags down from the parent struct to know, since it
  depends on the type of descriptor. This could happen in any case, but
  is most likely for templated descriptor updates where the memory that
  is referenced could be garbage.
2018-04-24 14:45:42 +01:00
baldurk ffa1920af8 Mark descriptors as referenced when updated, even if unused
* Previously we did this because unused descriptors don't have to be
  updated, but for consistency with templated updates we mark them ref'd
  now (although the contents are still not referenced until bound).
2018-04-24 14:42:08 +01:00
baldurk d9b038f7a6 Fix logic for adding extra 'API calls' marker in at end of cmd buffers
* This accounts for any non-draw API calls that happened in the command
  buffer just before it was ended.
2018-04-24 14:42:07 +01:00
baldurk 39d7bb3808 Don't hook all modules when loading an API set 2018-04-24 14:42:06 +01:00
baldurk 0442c46aff Implement VK_KHR_descriptor_update_template. Closes #934 2018-04-24 14:42:05 +01:00
baldurk ad887b1922 Allow for complex extension dependencies (i.e. two exts needed for func)
* This is fairly common with extension overlaps/interactions. Instead of
  having just one extension condition for a function, allow &&.
2018-04-24 14:42:01 +01:00
baldurk 8b2d943556 Handle extension promotion to core when detecting enabled extensions 2018-04-24 14:41:59 +01:00
baldurk 94548886eb Implement VK_KHR_push_descriptor extension. Closes #905 2018-04-24 14:41:57 +01:00
baldurk ad5a0d7417 Update to split vulkan headers from 1.1.73.0 SDK 2018-04-23 18:15:20 +01:00
baldurk 4f32e62886 Align shader tooltips to account for negative 9-digit ints. Closes #964 2018-04-23 14:04:56 +01:00
baldurk 1096025963 If normal patching fails, try to use glslang to preprocess GLSL
* We need to patch in fixed blocks, so we can try to use glslang to
  preprocess away confusing code, and then do the patching on the
  pre-processed output. This has a risk of affecting the results but it
  can be a last-ditch attempt which is better than having no separable
  program to reflect at all.
2018-04-20 17:23:52 +01:00
baldurk af4dbcd29b Don't reference in-progress command buffer recordings. Closes #925
* When pulling in command buffers, we want to include their allocation
  chunk and descriptor pool. Previously we did this by marking their
  record as referenced, however this had the problem where if the
  application started recording new commands into that command buffer
  before the record was referenced and processed, the capture would
  include those chunks without any of the proper references etc.
* To avoid this, we take advantage of the fact that the allocation chunk
  is already stored in a separate record so that it doesn't get thrown
  away every time the command buffer is baked. We can instead directly
  reference this record when pulling in at submit time.
2018-04-20 16:40:18 +01:00
baldurk 550f4f4424 Add extra column of empty data for unbound sampler row 2018-04-20 16:37:00 +01:00
baldurk 172e937206 Pass through and display format for texel buffer views. Closes #957 2018-04-20 15:40:21 +01:00
baldurk cbf7239607 Fix GL binding applying re-sort permutation to binding points 2018-04-20 15:40:20 +01:00
baldurk 342d86242b Fix incorrect interpretation of spec text in unpack state. Closes #952 2018-04-20 15:40:20 +01:00
baldurk 4312953ab8 Make sure to init PostVS buffers before fetching
* Normally a mesh rendering replay output would do this implicitly when
  an event is selected, but if accessing purely through script this may
  not happen, so we should initialise it ourselves here.
* If it's already init'd, it's almost free to call again.
2018-04-20 15:40:20 +01:00
baldurk 9f07b073dc Fix vector iterator invalidation properly - store as index and restore
* The previous fix was insufficient, the iterator being at end() is only
  one way push_back can invalidate it, the other is if the array being
  expanded is large enough (or things are just right) that the vector
  resizes.
2018-04-20 15:40:20 +01:00
baldurk 701fd0282a Only append comparison/min/max status to filter, don't replace 2018-04-20 15:40:20 +01:00
baldurk 557dc71d42 Only add cache as derived resource if it's non-NULL 2018-04-20 15:40:20 +01:00
tabi.katalin f84eb1f180 Get default Activity on Android 6.0
"cmd package resolve-activity" is only available from Android 7.0. Pre Android 7.0 we can use "pm dump <packagename>" to get the default Activity name.
2018-04-19 18:13:16 +01:00
scottmarsland e7dec9e5ae Fixed the removal of the device frame capturer in vkDestroyInstance. 2018-04-18 15:41:32 +01:00
baldurk 6e152884ce Concatenate GL shader sources before attempting to separable-patch
* Since we search for #version, if it appears in a separate source
  string from the rest of the shader, we fail to find the right place to
  insert the patch blocks. If we concatenate first, it makes it easier.
2018-04-13 17:01:07 +01:00
baldurk 8f3b2d9b60 Enable GL_DEBUG_OUTPUT_SYNCHRONOUS to work around nvidia driver bug
* Some queries around VAOs and index buffers don't work correctly
  without this flag set.
2018-04-13 16:43:45 +01:00
baldurk e51a14f18a Fix display of RTVs and DSVs in D3D12 pipeline state viewer 2018-04-13 16:43:44 +01:00
Noah Fredriks 93866387a7 Fix illegal vkCmdPipelineBarrier
Adhere to vkImageMemoryBarrier valid usage:
If image has a depth/stencil format with both depth and stencil
components, then aspectMask member of subresourceRange must include both
VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT
2018-04-13 13:34:06 +01:00
baldurk b88d6eaf86 Print resource ID with missing reference message.
* This makes it easier to track down after the fact.
2018-04-09 17:11:26 +01:00
baldurk 4dca51ae0b Include EID in shader reflection cache key for GL. Closes #951
* On GL shader reflection is mutable but only between different events
  (we can expect it to be consistent/cacheable for a single event).
* We don't want to delete shader reflection pointers out from under the
  UI, and it's not feasible to invalidate all pointers it might hold at
  any point - e.g. previous to this change when a ReplayLog happens.
* Instead we just add another dimension to the cache key and allow the
  cache to bloat more on GL, preserving possibly redundant reflection
  objects.
2018-04-09 17:11:26 +01:00
baldurk bd983ad783 Handle double precision when converting to vulkan format 2018-04-09 17:11:26 +01:00
baldurk 96629e8e96 Unpack non-texel-buffer compatible formats when doing Post-VS on vulkan
* We were already fetching and compacting vertex buffers so this wasn't
  as big a change as expected - it just needs to expand out e.g.
  R16G16B16A16_SNORM to R32G32B32A32_SFLOAT so that it can be created
  as a texel buffer (where the former may only be supported via fixed
  function vertex inputs).
2018-04-09 17:11:26 +01:00
baldurk 6aa7345016 GL min/max lod and lod bias are sampler parameters as well as texture 2018-04-09 17:11:26 +01:00
baldurk 3224df835b Fix disassembly view not working in shader viewer list of files 2018-04-09 17:11:26 +01:00
baldurk ba2280c5c7 Apply extra sort to SPDB file list to put entry file first. Closes #950
* This isn't 100% reliable but it seems reasonably consistent that while
  the first file in the streams isn't always the entry file, the first
  name of a file in the list of names which map to files is. So we
  re-sort by the list of names.
2018-04-09 17:11:25 +01:00
Jimmy Lee 6c35697edc fixed a problem that is preventing opengl es capture 2018-04-06 22:50:30 +01:00
baldurk 3129a44495 Actually comment out skipped fixed-size members. Closes #948 2018-04-06 14:11:52 +01:00
baldurk d51f968ffd Fix an issue with obj references stacking up on def contexts. Refs #924 2018-04-06 10:34:02 +01:00
baldurk e4bda8d7bd Implement queue-level markers (begin/set/end) on D3D12 2018-04-05 18:35:05 +01:00
baldurk b4878bf4e9 Fix auto-detection and manual specification of conversion formats on CLI 2018-04-05 17:51:40 +01:00
baldurk 6102b638a6 Add an overflow system for descriptor pools that have high use
* This can happen in cases where the application syncs to the GPU after
  using one set of descriptors from a pool, resets it, and then
  allocates more descriptors out of the pool to use later in the frame.
* Since we allocate all descriptors up-front before the frame starts we
  end up allocating more than the high-water mark, and running out of
  room in the pool.
* Instead we just allocate duplicates of the pool as needed, as overflow
  space, and then use those overflow pools to satisfy any extra need.
2018-04-05 17:34:13 +01:00
baldurk 6e5ee75215 When binding framebuffers, GL_FRAMEBUFFER target sets read and draw FBs
* This is in contrast to most other framebuffer functions, where
  GL_FRAMEBUFFER acts as an alias for GL_DRAW_FRAMEBUFFER.
2018-04-05 16:23:20 +01:00
baldurk 2974ca8d12 Delete replay outputs on replay thread, not on UI thread
* On OpenGL this can cause problems with not being able to make the
  output context current because it's already current on the replay
  thread.
2018-04-05 12:34:22 +01:00