Commit Graph

1993 Commits

Author SHA1 Message Date
baldurk f76d89cdbd Windows compile fix (super hack) 2016-02-07 18:41:21 +01:00
baldurk db74a097dd Remove hardcoded display of backbuffer, instead display specified tex
* Currently will only work for 2D textures though
2016-02-07 18:41:20 +01:00
baldurk 26d99bf7bb Handle stale & unreferenced resource handles in descriptor sets
* It's possible to replay with descriptor set slots (and updates)
  referring to resources that don't exist at replay time, if those sets
  are never actually used in a queue that's submitted and the resource
  isn't referenced otherwise. For this reason we need to be able to
  skip initial contents or descriptor updates that refer to these
  unused resources.
2016-02-07 18:41:19 +01:00
baldurk 12fc8e9935 Implement some query pool functions 2016-02-07 18:41:18 +01:00
baldurk 9ebb7cec1f Implement CmdResolveImage 2016-02-07 18:41:17 +01:00
baldurk 84415a3f76 Disable hooking libGL for now on linux 2016-02-07 18:41:16 +01:00
baldurk d763b9ef43 Pipeline layout should take a parent reference on the layouts used 2016-02-07 18:41:16 +01:00
baldurk ca3c283528 Fix event counting edge-case for empty command buffers 2016-02-07 18:41:15 +01:00
baldurk 118bc91ec0 Disable assertion of valid transitions
* This is going to be difficult to debug and verify without the layer
  to debug and verify that all transitions are correct (both on the app
  side and renderdoc's replay side). For now, disable the assert and
  just hope that the app got it right and we replay it right.
2016-02-07 18:41:14 +01:00
baldurk 840bfe7096 Add hackish but better handling of device memory initial states
* Device memory is always treated as dirty from creation. This means
  we will always prepare_initialstate for all memory.
* We no longer force initial states for all memory.
* Instead we iterate over all frame ref'd objects, and then ref their
  memory records - for framebuffers and view objects, we frame ref their
  parents so that they can in turn frame ref their memory record.
* In future this should be built up at creation time and just iterated
  whenever we want to ref any of these objects (all the way down to mem)
2016-02-07 18:41:13 +01:00
baldurk 6a3b0946eb Image initial states need special handling, but for now don't error
* Any non-linear images need to be copied into a linear image for
  readback. Otherwise the device memory will not necessarily be in the
  right format for replay.
2016-02-07 18:41:12 +01:00
baldurk eb18687fb2 Don't dirty buffers, and don't create any init state for them
* Buffers have no state, they're immutable, and contents are handled by
  device memory initial state
2016-02-07 18:41:11 +01:00
baldurk c6fd6e80f2 Remove 'capture X frame' hack, as keyboard input is working 2016-02-07 18:41:11 +01:00
baldurk af09dbb648 Switch keyboard handling to xcb (WIP, needs to be cleaned before merge) 2016-02-07 18:41:10 +01:00
baldurk 38a34db5ca Don't assert pNext == NULL, some apps seem to pass (invalid?) structs 2016-02-07 18:41:09 +01:00
baldurk 6188720537 print chunk sizes 2016-02-07 18:41:08 +01:00
baldurk ddaf962dde Serialise multiple flushes, not just the first
* typo - copied from unmap condition where we don't serialise anything
  on unmap if there was a flush
2016-02-07 18:41:07 +01:00
baldurk 857f20d164 Mark memory records as dirty (for now - buffers shouldn't dirty at all) 2016-02-07 18:41:06 +01:00
baldurk ac764b4170 Don't try and use wrapped image from transition on replay 2016-02-07 18:41:06 +01:00
baldurk 402819b5c7 Use original ID when returning pipeline state to replay 2016-02-07 18:41:05 +01:00
baldurk 3a8e6a9557 Don't refuse to bail out if a command buffer is in progress anymore 2016-02-07 18:41:04 +01:00
baldurk fe414dfc9c Only reset debug text on indent level 0 2016-02-07 18:41:03 +01:00
baldurk 34da5158cf Rename "Command Buffer Start" to "Render Pass Start" 2016-02-07 18:41:02 +01:00
baldurk 2ccc98a73c AddDrawcall for a few draw type functions 2016-02-07 18:41:01 +01:00
baldurk aec46fad49 Give virtual command buffer submit event a good name 2016-02-07 18:41:00 +01:00
baldurk 4b5a55aaa9 fix using eventCount to fetch current EID 2016-02-07 18:41:00 +01:00
baldurk 37afa05847 Mark fence used for queue submission as read 2016-02-07 18:40:59 +01:00
baldurk a71c929538 Fix fetching IDs for recording transitions 2016-02-07 18:40:58 +01:00
baldurk 5525a767a6 Don't forcibly disjoint all cmd buffers and sort to the start
* I misunderstood how descriptor sets were used - they are allowed to be
  dereferenced anywhere between cmd buffer record time and when
  execution finishes. I thought they were only ever dereferenced during
  exec. So it means we must preserve cmd buffer ordering vs. queue
  submit and descriptor update. We still want to force cmd buffers into
  the start of the frame that were recorded pre-frame though.
2016-02-07 18:40:57 +01:00
baldurk c76466626c Do something about initial state for un-written descriptor sets 2016-02-07 18:40:56 +01:00
baldurk ac3ec846a8 Ignore any serialised images states for images that aren't in replay 2016-02-07 18:40:55 +01:00
baldurk 60c206d4e1 Remove some overzealous unwrapping 2016-02-07 18:40:55 +01:00
baldurk 4c070023dc Framebuffers should depend on the renderpass 2016-02-07 18:40:54 +01:00
baldurk b6c7a406c1 Add first-pass implementation of vkFlushMappedMemoryRanges
* Assuming that if we hit a flush, then on unmap we don't need to
  serialise everything. This assumption might not hold in general
2016-02-07 18:40:53 +01:00
baldurk 2cfa89ee18 Don't delete cmd buffer records until we've flushed to disk 2016-02-07 18:40:52 +01:00
baldurk 611905894e Add fence functions and a FlushMappedMemory that just prints for now 2016-02-07 18:40:51 +01:00
baldurk 45fc32614a Remove pipeline cache as it is optional and causes duplicate wrappers
* The same ICD in the SDK just returns '1' as the handle for all caches.
* This could be valid behaviour (not for caches but for other objects)
  so need to check where this could happen and handle it. We already do
  for queues, physical devices, and a couple of others.
2016-02-07 18:40:50 +01:00
baldurk 38b2158c7b Simplify linux include paths to just depend on $VULKAN_SDK 2016-02-07 18:40:49 +01:00
baldurk cb9d65b7c8 Add LoaderAndTools patch to work with wrapped objects 2016-02-07 18:40:49 +01:00
baldurk 0b4a34a442 Swap 'real' object for a <type,obj> pair, to avoid duplicate handles
* If an implementation returns 1 as a handle for both an image and
  buffer we must be able to differentiate and not clash the wrappers.
2016-02-07 18:40:48 +01:00
baldurk 1f4a368de7 Rename trace layer exported functions to avoid ambiguity
* I ran into a problem where &vkGetInstanceProcAddr etc were returning
  the loader functions and inducing an infinite loop. I'm not sure it's
  defined which is returned, since librenderdoc.so also links against
  the loader for replay, so instead we take advantage of being able to
  define RenderDocGetInstanceProcAddr and have that loaded up by the
  loader.
2016-02-07 18:40:47 +01:00
baldurk 1f16739ee4 Change VK_LAYER_DIRS environment varibale to VK_LAYER_PATH 2016-02-07 18:40:46 +01:00
baldurk d2e4db052c Remove requirements for dma and maybe compute on device queues
* Compute will be needed later, DMA not at all (as a hard requirement).
2016-02-07 18:40:45 +01:00
baldurk 66934cd875 Add clean step for vulkan driver 2016-02-07 18:40:44 +01:00
baldurk 20f4b4b7fb Include version.h from tracelayer to get version numbers 2016-02-07 18:40:44 +01:00
baldurk e211e25b9a Don't define VK_PROTOTYPES, we fetch all functions via dispatch or GPA 2016-02-07 18:40:43 +01:00
baldurk 26b8ff197b Split out vk_core.cpp into a few files for (mildly) better organisation
* No changes to any of the functions in this - purely re-organisation
  and moving of code.
2016-02-07 18:40:42 +01:00
baldurk 0154a8bd21 Copy renderdoc.json to output folder, unify layer name/description 2016-02-07 18:40:41 +01:00
baldurk 940b89cd73 Move capture layer into librenderdoc.so on linux 2016-02-07 18:40:40 +01:00
baldurk 08ff1b40cb Move dispatch table handling internal, remove LoaderAndTools code 2016-02-07 18:40:39 +01:00