Commit Graph

1956 Commits

Author SHA1 Message Date
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
baldurk 19de6b1d16 Rename rdtrace.cpp -> vk_tracelayer.cpp, remove vk_hooks_*.cpp 2016-02-07 18:40:38 +01:00
baldurk 99071776e6 Move layer dispatch table stuff to vk_common.h 2016-02-07 18:40:38 +01:00
baldurk 81b7cf3b85 Fix shutdown/release process 2016-02-07 18:40:37 +01:00
baldurk 23ffd5df1b Command buffers should go through ReleaseWrappedResource 2016-02-07 18:40:36 +01:00
baldurk 89c4676f9c Get wrapper from info structure unwrapped resource 2016-02-07 18:40:35 +01:00
baldurk 7486dcf4fe Use correct object for dispatching 2016-02-07 18:40:34 +01:00
baldurk b951c37fcf Wrap the fake backbuffer image view 2016-02-07 18:40:33 +01:00
baldurk 879dd422b5 Change descriptor set order back 2016-02-07 18:40:33 +01:00
baldurk 9bef542fc6 Fix typo - force initial states for real device memory 2016-02-07 18:40:32 +01:00
baldurk b4c00d9a7c Destroy instance through correct dispatch table 2016-02-07 18:40:31 +01:00
baldurk 98bfdd82db Fix in-application text rendering 2016-02-07 18:40:30 +01:00
baldurk 6a904ba032 Add a rather gross hack to get replay queues in advance and wrap later 2016-02-07 18:40:29 +01:00
baldurk 4db95cfe0c Add some missing wrap/unwraps 2016-02-07 18:40:28 +01:00
baldurk 949489b6b1 Don't dereference null pointer, use local device object 2016-02-07 18:40:28 +01:00
baldurk 802a5e4b0a Remove our own handling of dbg msg callbacks - come back to this later 2016-02-07 18:40:27 +01:00
baldurk 720a88f2f8 Serialise_vkCreateDevice needs to bootstrap with dummyDeviceTable 2016-02-07 18:40:26 +01:00
baldurk 58e0dfcdef Use VkInstance not ResourceId (problem with templated functions :() 2016-02-07 18:40:25 +01:00
baldurk d081efe65c GetLiveHandle / GetCurrentHandle should return wrapped object 2016-02-07 18:40:24 +01:00
baldurk 2559907c17 Resource tidy up isn't practical while writing as device is already dead 2016-02-07 18:40:23 +01:00
baldurk 2f8530b10b Tidy up destruction so all resources and records are deleted by shutdown
* This is assuming the app tidies up after itself - not sure if that's
  guaranteed or not.
2016-02-07 18:40:22 +01:00
baldurk 1abe5c2c0d Handle releasing a NULL resource 2016-02-07 18:40:22 +01:00
baldurk 9260bfd0be Don't double-delete now that ReleaseWrappedResource does it all 2016-02-07 18:40:21 +01:00
baldurk fe9f89cb47 Only mark resources as frame referenced when actually frame capturing 2016-02-07 18:40:20 +01:00
baldurk 9aacd2ed5b Release baked commands when destroying command buffer 2016-02-07 18:40:19 +01:00
baldurk c1eecb28f0 Don't serialise initial states for debug-only objects 2016-02-07 18:40:18 +01:00
baldurk 4af3d1c00c Unwrap swapchain present info structure 2016-02-07 18:40:17 +01:00
baldurk ae0aef85c2 Fix small bugs 2016-02-07 18:40:16 +01:00
baldurk 7ba885fddd Use parent object when wrapping to fetch dispatch table
* The created object's dispatch table pointer is only valid after it
  gets back to the loader - after our layer has run. So at create time
  it's invalid, we just look to the parent which has the same value.
2016-02-07 18:40:15 +01:00
baldurk f3da5478fc Copy and unwrap any structures that contain object handles 2016-02-07 18:40:15 +01:00
baldurk 4254f54d92 Fix some more wrapping/unwrapping issues 2016-02-07 18:40:14 +01:00
GregF 4816bcfa7b use layer specific dispatch table maps 2016-02-07 18:40:13 +01:00
baldurk bc2dca08ba Fix linux compile issues with some temporaries 2016-02-07 18:40:12 +01:00
baldurk a00688a86a Add a little utility function so that code can get IDs from real objects 2016-02-07 18:40:11 +01:00
baldurk a6626ab31b Debug and replay properly wrapping and unwrapping everything 2016-02-07 18:40:10 +01:00
baldurk 3522ce25d5 Put 'real' handle into tiny struct similar to one in vulkan.h
* This lets us have a more type-safe 'generic vulkan handle' struct, and
  we can give that to the resource manager when specifying what type
  we're wrapping.
2016-02-07 18:40:09 +01:00
baldurk 9dfcf7826b Fix 32-bit build 2016-02-07 18:40:08 +01:00
baldurk 725847e636 Move WrapResource in-place util function to manager
* This way code that wants to wrap resources (ie. replay/debug code)
  doesn't have to depend on the driver.
2016-02-07 18:40:08 +01:00