Commit Graph
3924 Commits
Author SHA1 Message Date
baldurk db1cc10598 Unset pipeline state values if shaders/pipelines are not bound
* Since we're updating a single member struct in-place and not starting
  from a clean slate, we need to be sure to unset state values instead
  of just skipping them and assuming the default is empty.
2018-02-20 13:33:23 +00:00
baldurk dbfa3cdc4d Remove DrawFlags::SetMarker from API Calls events
* This made them behave inconsistently and was not really necessary
  anyway.
2018-02-20 10:02:40 +00:00
baldurk 13b2b3b15e Inherit renderpass state from primary into secondary command buffers 2018-02-19 21:04:43 +00:00
baldurk 4b7f6d7d71 Be explicit when encountering an unsupported SPIR-V version 2018-02-19 21:04:32 +00:00
baldurk 3b73ca9fe4 Fix double-application of index byte offset in GL vertex picking 2018-02-19 18:40:15 +00:00
baldurk 0fea65d741 Implement barrier EventUsage tracking on D3D12 2018-02-19 18:24:28 +00:00
baldurk 52de64de26 Fix column major matrix transpose when reading cbuffer values. Refs #800 2018-02-19 17:41:37 +00:00
baldurk 2eb56e4279 Display matrix memory order in cbuffer type column. Refs #800 2018-02-19 11:53:20 +00:00
baldurk 41112d10e5 Allow uuid for ID3D12CommandList in CreateCommandList
* This is as well as ID3D12GraphicsCommandList which is the actual
  type returned.
2018-02-19 10:51:50 +00:00
baldurk 934800793a Improve workflow for capture import/export
* If the export doesn't need buffers, we export directly from the loaded
  capture file instead of re-loading it.
* Add progress bars for the load step so it shows what's happening
  instead of looking stalled.
* Reduce compression rate on XML+ZIP buffers as it took too long trying
  to compress when exporting large captures.
2018-02-19 00:52:13 +00:00
akharlamov 48c2678fed Fix stringifcation of VkAttachmentStoreOp enum 2018-02-17 01:11:18 +00:00
baldurk 41ba4be01e Don't serialise anything in between serialising buffer & fetching offset 2018-02-16 13:15:22 +00:00
baldurk f3f688fd48 Fix crashes if exporting structured data with open D3D12 capture 2018-02-16 12:37:44 +00:00
baldurk 81b9a94bbe Change label at the start of D3D12 command list 2018-02-16 12:37:30 +00:00
baldurk 8126e182e0 Don't modify renderstate unless recording partial command list 2018-02-16 12:37:01 +00:00
baldurk 7c7a4ae5ea Fix a crash if framebuffer size changes before overlay is set. Refs #863 2018-02-15 17:48:15 +00:00
baldurk 56e87514f6 Enable primitive restart for rendering strip-topology meshes. Refs #862 2018-02-15 17:07:38 +00:00
baldurk 38d87b9b3b Don't be surprised by multiple functions in SPIR-V editing
* Once we've reached the function bodies we can ignore any more function
  opcodes.
2018-02-15 16:03:14 +00:00
baldurk 32a360db8f Per-instance flag array should be indexed by attribute binding index 2018-02-15 15:17:12 +00:00
baldurk 96f611e649 Fix a couple of cases where re-ordering serialisation broke logic 2018-02-15 15:16:50 +00:00
baldurk c3ce289da4 Fix crash if vertex input elements are not compact 0-based indices 2018-02-15 12:47:15 +00:00
baldurk 48b7af9e87 Fix case trying to allocate off the end of a memory block
* If we're aligned up past the size of the allocation (possible if we
  apply bufferImageGranularity due to the incoming allocation being
  image and the last allocation in the block being a buffer) the next
  required offset would be past the size, so avail = block.size - offs
  would overflow and we'd try to allocate past the end of the block.
2018-02-15 11:41:33 +00:00
baldurk ce6275920e Fix typos in vkCmdClear*Image. Thanks to @null77. Refs #876 2018-02-15 10:57:32 +00:00
baldurk 919c0f11dd Override type for structured data when directly serialising a ResourceId 2018-02-15 10:57:31 +00:00
baldurk 64406b47a3 Add an SDBasic type for ResourceId.
* This type is core enum and used globally (not API specific) that it
  merits becoming a specific structured data type
2018-02-15 10:21:52 +00:00
baldurk a1c104f6f8 Serialise VkMemoryHeap::flags as typed enum 2018-02-15 10:09:38 +00:00
baldurk 80128f8e9f Stringise VkFlagWithNoBits as 0 instead of empty string 2018-02-14 22:35:50 +00:00
baldurk 453b4e7d6e Serialise GL FBO 0 properly as a real resource, not as "no resource" 2018-02-14 19:55:13 +00:00
baldurk 90a6683e2b Fetch ResourceId even for handle == 0
* This happens in two cases - the legal one for FBO 0 (the window's
  backbuffer) - and the compatibility one for VAO 0.
2018-02-14 19:30:23 +00:00
baldurk 1ee01e1f82 Apply a normalisation pass over the serialised data
* This is a backwards-incompatible change, so it's done here before v1.0
  so that we can freely break compatibility and not need to define a lot
  of ugly compatibility code.
* The primary motivation is to make the serialised data more uniform
  and have fewer special cases where the serialised form is naturally
  defined from the functions/structs in question.
* There are still some special cases or variances but they should be
  more isolated and only where really necessary.
* Remove some cases in the D3D12 struct serialising where we were
  directly serialising child struct members in the parent struct.
* We now try to match argument/struct member order as closely as
  possible.
* Serialising an array with a count no longer reads the count back out
  into that variable, counts must be serialised separately. This means
  all members/arguments are explicitly present in the structured data
  and also eliminates the awkward case where a count needed to be
  serialised separately after an array if we want to have the count be
  a valid number even if the array could be NULL. It also means we don't
  need the FIXED_COUNT() macro since array lengths can be plain values
  and don't have to be a reference type.
2018-02-14 15:57:53 +00:00
baldurk ef12af50b4 Fix some issues when exporting vulkan structured data. 2018-02-14 00:41:04 +00:00
baldurk 2d07861227 Remove special case strings from vulkan stringification 2018-02-13 21:10:13 +00:00
baldurk 2f73ed373b Implement GLES overlays by dropping use of separable programs
* GLES separable programs are completely broken, so we need to just go
  back to ye-olde style of linking shaders together. On GLES this is
  particularly painful as it means we have to version match whatever
  shader the user was using.
2018-02-13 21:10:11 +00:00
baldurk c9a2d4cca8 Fetch declared #version for each shader (will be needed on GLES) 2018-02-13 21:10:08 +00:00
baldurk 8b66e3dcd9 Apply the fake backbuffer in glDrawBuffers 2018-02-13 21:10:04 +00:00
baldurk caaa392e85 Make sure to use original IDs when stringifying any IDs in draw names 2018-02-13 21:10:03 +00:00
baldurk 8368f9b8be Stringify ResourceIds consistently as "ResourceId::12345"
* This means even strings generated in the core code will become
  richtext in the UI.
2018-02-13 21:10:01 +00:00
baldurk 3c72341f63 Set category name for all API's built-in counters, not just D3D11 2018-02-12 20:48:07 +00:00
baldurk bb72a39894 Fix D3D11 structured import/export 2018-02-12 20:47:54 +00:00
baldurk e44b7c3c34 Initialise debug values to NULL 2018-02-12 20:47:53 +00:00
baldurk d3bf628394 Handle opening vulkan shaders that are not in a pipeline.
* Previously we were relying on the pipeline info create to initialise
  the reflection for an entry point, now we do it on demand wherever it
  is needed.
2018-02-09 19:03:55 +00:00
baldurk 387de2527e Handle multi-dimensional arrays in shader input/outputs. Refs #714 2018-02-09 19:02:25 +00:00
baldurk 634c63637f Make sure *all* bindings are available to compute, not just vertex
* This fixes a problem where dynamic offsets would be wrong because we
  only opted-in to the vertex bindings in the layout, not the fragment
  bindings.
2018-02-09 13:06:35 +00:00
baldurk 360b37b1a7 Re-order any variables that we point to new pointer types to the end
* As explained in the code, if we repoint an input variable to refer to
  a previously declared private type, it might start referencing forward
  in the SPIR-V which is invalid. So to fix this and be safe, we just
  move the variable to the end.
2018-02-09 13:05:54 +00:00
baldurk 0f38dda951 Use a state machine for tracking SPIR-V sections and add nops to pad
* We want to make sure every section always has at least one word in it
  so we can unambiguously tell which section we're appending to. If the
  debug section is empty, it's hard to tell the difference between
  appending to the entry point section and inserting into the debug
  section, so we add a nop that will get stripped out later.
2018-02-09 12:18:40 +00:00
baldurk 6944f6f728 Don't allow direct == or != on SPIRVIterator, use <
* The reason is if comparing directly against the end of a section, we
  could skip over it if the section ends in a nop and the next section
  starts in a nop. Instead < will always work as expected.
2018-02-09 12:17:40 +00:00
baldurk effbed2222 Fixes for D3D12 structured export 2018-02-06 17:41:59 +00:00
baldurk bdb8c21c81 Give state objects their own resource records
* If we don't track their lifetimes specifically, then we can end up
  with the situation where an application makes more state objects over
  the course of its rendering than is legal (there can only be a max
  4096 unique state objects of each time). This could happen if an
  application creates state objects each frame with slight variances,
  but then releases them again.
2018-02-06 00:21:09 +00:00
baldurk 55ebe38044 Fix replay of ID3D11Device::CreateInputLayout with no input elements
* ID3D11Device::CreateInputLayout will fail if we pass a NULL descriptor
  array pointer, even though 0xdeadbeef will work so it doesn't actually
  use the pointer at all.
2018-02-06 00:21:09 +00:00
baldurk 3b94095201 Handle differences between EXT_debug_label and KHR_debug
* In particular they have different behaviour for what length value
  indicates that the length should be fetched from the NULL
  terminated string.
2018-02-02 18:39:46 +00:00