Commit Graph
10393 Commits
Author SHA1 Message Date
baldurk 3a89a56cc3 Revert accidentally committed vulkan validation layers 2019-05-17 16:47:22 +01:00
baldurk 7206a0cd25 Removing 'use std::vector' 2019-05-17 16:32:56 +01:00
baldurk 725c207ec8 Remove 'using std::list' 2019-05-17 16:32:56 +01:00
baldurk e48065c96b Replace use of std::pair with rdcpair wherever possible
* Only remaining uses in our code is when we're interacting with std::map where
  it uses std::pair internally
2019-05-17 16:32:56 +01:00
baldurk 462772af91 Remove 'using std::set' 2019-05-17 16:32:56 +01:00
baldurk a965a3a703 Remove 'using std::string'
* This will make it easier to replace std::string with rdcstr in future
2019-05-17 16:32:56 +01:00
baldurk 6d47b35cd9 Change GL_Entry_Points test to use more generally available functions 2019-05-17 16:32:55 +01:00
baldurk ff24c2251a Account for differing reflection of global uniforms on GL
* The reflection might only return the actual used values, but it might return
  more so ensure we have handling for that.
2019-05-17 16:32:55 +01:00
baldurk 63728a425f Add newly-created tests to CMakeLists.txt 2019-05-17 16:32:55 +01:00
baldurk 4aa8e1ebf3 Be more clear in naming which chunks are internal book-keeping 2019-05-17 16:32:55 +01:00
baldurk 8edc01c928 Show the object (whether a sampler or the texture) in GL's sampler state 2019-05-17 16:32:55 +01:00
baldurk 51c50e0da3 Localise addressing mode state display for GL
* On GL addressing modes are called wrap modes, and the wrap value is then known
  as repeat. If we don't 'localise' this then it can be confusing to show that
  it is "Wrap".
2019-05-17 16:32:55 +01:00
baldurk 96cc08b960 Rename 'show disabled' button to 'show unused' as it is clearer
* Bindings that are unused aren't disabled - they may in fact be explicitly
  enabled - but they are unused by the pipeline which is why they're hidden.
2019-05-17 16:32:55 +01:00
baldurk 06b91f3d57 Update quick start image of timeline bar & remove mention of pip colours 2019-05-17 16:32:55 +01:00
baldurk 8cae484132 Handle all cmake release build types properly 2019-05-17 16:32:55 +01:00
Amit PrakashandBaldur Karlsson f679592add Fix incorrect loop over counters
* This issue was causing additional entries to counter result data
leading to incorrect display in the perfcounter viewer.
2019-05-16 02:11:53 -07:00
baldurk 40268d344d Fix unit tests on linux 2019-05-15 16:35:03 +01:00
baldurk 102d2218b3 Use glXQueryDrawable instead of XGetGeometry to get size. Closes #1381
* XGetGeometry will only work on X IDs so we had a wrap/unwrap pass for
  GLXWindows, but that fails for pbuffers and there's no need when
  glXQueryDrawable can query sizes just as well.
2019-05-15 14:12:18 +01:00
baldurk 2ed1de4632 Fix VS filters for recently added files 2019-05-15 14:12:17 +01:00
baldurk bae420d83f Fix querying for texture view mip/array size 2019-05-15 14:12:17 +01:00
baldurk 00bf36fd27 Don't query uniform value for atomic counter uniforms
* These cannot be rebound so are fixed, and have no location.
2019-05-15 14:12:17 +01:00
baldurk 699f8753af Convert ToStr, Serialise, and TypeName to use literal strings 2019-05-15 14:12:17 +01:00
baldurk c8a518f05c Refactor rdcstr with small-string and literal-string optimisations
* rdcstr no longer inherits from rdcarray, it implements all functionality
  itself.
* There are now three representations:
  - Heap-allocated, same as how rdcarray behaves.
  - Local-allocated, for small strings we store them in a union array.
  - Compile-time literal, only created from user-defined literals.
* The main observation is that a lot of RenderDoc's strings are compile-time
  literals either from struct names, member names, or stringified enum values.
  Storing these directly and allowing them to be moved and copied quickly saves
  on allocations and time. When the string is modified, it's copied to one of the other formats.
2019-05-15 14:12:17 +01:00
baldurk fb333ebc9b Remove 'using std::map'
* This will make it easier to replace std::map in future
2019-05-15 14:12:17 +01:00
baldurk 95e63cb965 Remove pending-dirty operations, mark resources dirty immediately
* Now that the dirty list is only read once at the start of the frame we can
  mark resources dirty mid-frame freely and don't have to defer that. The
  internal resource manager locking prevents us from adding to the list while it
  is being modified.
2019-05-15 14:12:17 +01:00
baldurk ce92ba70d1 Revert accidental change to GL_Simple_Triangle test 2019-05-15 14:12:17 +01:00
amhaganandBaldur Karlsson 8a4f7c918b Fix VK_EXT_full_screen_exclusive functions
Hook up AcquireFullScreenExclusiveModeEXT, ReleaseFullScreenExclusiveModeEXT,
and GetDeviceGroupSurfacePresentModes2EXT functions.
2019-05-15 06:09:16 -07:00
baldurk 3791dee78d Fix 32-bit compilation 2019-05-14 20:45:04 +01:00
baldurk 1df6fd9c9d Don't crash if SSBO has no members 2019-05-14 18:16:38 +01:00
baldurk 2f574b57c2 Don't print debug messages while trying to link initial contents program 2019-05-14 18:16:10 +01:00
baldurk d3d5d63b2a Add tests of awkward lifetime edge cases for resources on all APIs
* This is primarily around initial states - either a resource which is from a
  previous frame and maybe wasn't dirtied and needs initial states created for
  it when it's modified mid-frame, or a resource that's created and destroyed
  all within one frame.
2019-05-14 17:13:29 +01:00
baldurk af14d2f0ce If a program is linked mid-capture, inject new initial contents chunk
* This is only intended to handle the case where a new program is created mid
  frame and linked for the first time, and we need the initial contents chunk to
  get location translation among other things. We don't yet handle programs
  being re-linked multiple times mid-frame.
2019-05-14 17:13:23 +01:00
baldurk d3d85fff1f glUniformBlockBinding should be serialised mid-frame only, not in init
* glUniformBlockBinding can be changed at runtime and previously pushing all
  instances of it into the resource record means it would be overwritten by any
  bindings retrieved by the initial contents. That's fine (if redundant) if they
  aren't changed afterwards, but if they are changed then this will be wrong.
2019-05-14 17:13:23 +01:00
baldurk 73a909995a Fetch program used in pipeline when checking drawcall safety 2019-05-14 17:13:22 +01:00
baldurk 0f09aba456 Mark programs as frame referenced in glUseProgramStages 2019-05-14 17:13:22 +01:00
baldurk 8e2b608975 Snapshot descriptor set Resource IDs when preparing initial states
* If we only copy the slot contents without converting Vk* handles to IDs then
  we run the risk that the resource will be deleted and re-allocated mid frame
  before we do that at serialise time.
* Instead we fetch IDs immediately and serialise as IDs, then look up the
  handles on replay
2019-05-14 17:13:22 +01:00
baldurk 0ae245c4a8 Refactor initial state callbacks to always allow deleted resources
* Instead of passing the resource handle itself to GetSize_InitialState or
  Serialise_InitialState, we pass the Id, ResourceRecord, and prepared initial
  contents. All of these can survive past the destruction of the resource.
* Removes the need for AllowDeletedResource_InitialState() - it's always allowed
  now.
* Need_InitialStateChunk is also refactored but it's only used on D3D11
  currently and potentially will be removed in future.
2019-05-14 17:13:22 +01:00
baldurk 4d91a6b90c Optimise size of D3D11ResourceRecord by removing rarely used pointers
* If deferred contexts map a resource they'll incur a vector resize the first
  time.
2019-05-14 15:30:55 +01:00
baldurk 0fd6b0c546 Remove forced initial states for resources
* This was used for two things:
  - UAVs on D3D11, which we can just mark dirty at creation as we do
   with things on D3D12/Vulkan where we know we'll always want initial
   states.
  - Texture views/Texture buffers on GL, where we check if the texture
   was referenced and force initial states for the underlying data
   store. This requires a bit more work but can still be achieved by a
   GL-specific force-inclusion pass on the frame references.
2019-05-14 15:30:55 +01:00
baldurk ada97bf7bd Only reference dirty resource list at capture begin time. Closes #1309
* The problem with trying to keep the list of dirty resources identical at the
  start and the end of the capture is that resources being deleted or dirtied
  mid-frame causes problems. For the latter we have 'pending dirty' ugliness,
  for the former we weren't properly handling it in all cases. Instead just
  prepare initial contents from dirty resources, then use the list of resources
  that had initial contents prepared to determine which should be saved.
* This means resources freed mid frame are fine, as long as we hold onto their
  resource records and initial contents which we do. It also means the pending
  dirty handling can be removed and we can just dirty resources as soon as we
  want - it will be ignored mid-frame and apply to subsequent frames.
2019-05-14 15:30:55 +01:00
baldurk 9d4b9034c5 Don't try to look up current texture bind state for proxy textures 2019-05-14 15:30:55 +01:00
baldurk fe2aaa60dc Handle stencil-only backbuffers 2019-05-14 15:30:55 +01:00
baldurk 886c20f580 Allow creating initial states for any resource type when necessary 2019-05-14 15:30:55 +01:00
baldurk 077d95e05a Fix applying program pipeline initial states
* We need to update our internal tracking, and handle GL's non-ordered shader
  bitmask.
2019-05-14 15:30:55 +01:00
baldurk 13ed3dfe0e VAOs and FBOs shouldn't mask the reference type to read only 2019-05-14 15:30:54 +01:00
baldurk a8694e6a27 Mark resources as written when their state changes
* This forces initial state snapshotting creation even if initial states weren't
  saved for the resource initially.
2019-05-14 15:30:54 +01:00
baldurk a01cd2c37b Mark containers like VAO or XFB as written on implicit buffer binds 2019-05-14 15:30:54 +01:00
baldurk e73bb1ff94 If a glBufferData call on replay resizes a buffer down, don't allow it 2019-05-14 15:30:54 +01:00
baldurk 3690e8908a Sync to GPU when fence is signalled on a queue
* Dynamic descriptor writes that happen after a fence sync must be synchronised
  against the work on queues. Since we don't capture CPU-waits on fences we need
  to sync on the signal.
2019-05-14 15:30:54 +01:00
baldurk 5a18717b6e Add D3D12 helper to set descriptor table parameter offset 2019-05-13 19:07:23 +01:00