Commit Graph

7895 Commits

Author SHA1 Message Date
baldurk 3b8a7ebf59 Completely remove layer registration code from android 2018-09-05 19:01:04 +01:00
baldurk a4cf3e437d Fix duplicate function definitions on android 2018-09-05 18:28:22 +01:00
baldurk 40938542ef Fix incorrect windowing system enum value for Android 2018-09-05 17:38:00 +01:00
baldurk c05f821235 Only copy previous push descriptor bindings that were valid 2018-09-05 16:41:08 +01:00
baldurk b6e5fe7b35 Detect MoltenVK and disable use of MSAA arrays until it's supported 2018-09-05 15:35:59 +01:00
baldurk b8c06436eb Fix misleading error - GLX is not on all platforms 2018-09-05 15:09:55 +01:00
baldurk 8a9a07d8a5 Read stencil in red component on vulkan, don't use swizzles 2018-09-05 14:52:53 +01:00
baldurk 00c4294258 Specify depth component type for special depth-stencil packed formats 2018-09-05 14:52:29 +01:00
baldurk 291f4d7387 Ignore MoltenVK's huge value for maxBoundDescriptorSets 2018-09-05 13:10:31 +01:00
baldurk 345208e0d9 Avoid atomic ops on vector members
* This doesn't translate well to metalsl and is in general not very useful - we
  were only doing it to avoid packing issues which in some cases are moot
  anyway. E.g. the histogram buffer doesn't have to be std140 and packed like an
  array of vectors, it can be std430 and packed like an array of uints.
2018-09-05 12:51:00 +01:00
baldurk bea1b87f59 Bump xcode build on travis to 9.4 2018-09-05 12:51:00 +01:00
baldurk d20624b32f Add fallback logic for locating MoltenVK & loader on macOS 2018-09-05 12:50:59 +01:00
baldurk bec9c56300 Add basic non-complete GL hooking on apple
* We implement this with dyld interposing. This means we must decide at compile
  time which functions to be hooked - in particular we require a manually
  curated list of functions that are actually exposed in the latest macOS GL
  version. Fortunately this is not a moving target anymore so this list should
  now be complete.
* The hooking is not complete:
  - It doesn't do full context tracking, just context create and make current
  - There's no drawable/window querying or tracking, so windows aren't properly processed and their size is wrong
* Also note that this does not support the replay side yet (CGLPlatform is still
  mostly stubs) and capturing actually still crashes.
2018-09-05 12:50:59 +01:00
baldurk 00d2bf62ff Enable Vulkan build on mac 2018-09-05 12:50:59 +01:00
baldurk 2b8062bc43 Add support for MoltenVK in vulkan back-end 2018-09-05 12:50:59 +01:00
baldurk 65b567a944 Add macOS windowing system to public API
* For now it expects a CALayer since this works around a MoltenVK bug
2018-09-05 12:50:58 +01:00
baldurk ca462ab03f If format doesn't support bits we want, return unsupported. Closes #1098
* The only formats the spec requires are for optimalTiledFeatures and already
  requires all the usage bits we are going to enable ourselves. The only cases
  where we can get in trouble is for formats that support a subset of those
  features e.g. on linear tiled images.
* So we can safely remove the reported support for those formats and still be
  compliant. The application must then work with that lack of support the same
  way as it would do if the ICD itself didn't have that support.
2018-09-05 10:59:00 +01:00
baldurk 40c3a735a4 Store enabled extensions on replay so we can check for them 2018-09-05 10:58:59 +01:00
baldurk 76e2a0f42e On macOS, force a repaint of CustomPaintWidget upon UpdateRequest
* For some reason the actual paint event never makes it through after converting
  to metal-compatible widgets, but painting in response to UpdateRequest (which
  should become a paint really) works about as well.
2018-09-05 10:01:35 +01:00
baldurk 7da13165e9 Set up relative-to-executable RPATH on macOS, copy lib into bundle 2018-09-05 10:01:35 +01:00
baldurk c2a8365eaa Make GL text rendering macOS compatible
* We switch to core context compatible shaders rather than assuming older GLSL
  versions are supported
2018-09-05 10:01:35 +01:00
baldurk 57c118c1e6 Use DYLD variants of LD_PRELOAD etc on macOS 2018-09-05 10:01:35 +01:00
baldurk a35c8513cc Implement hooking support on apple
* This assumes it will be used in concert with dyld interposing so it doesn't
  actually do any hooking apart from intercepting dlopen/dlsym to substitute any
  dynamic access to hooked functions. Otherwise it just fulfills the contract by
  calling callbacks and populating original function pointers
2018-09-05 10:01:34 +01:00
baldurk 336d1a65ea Fix linking of renderdoc_libentry on mac
* We use -force_load to ensure the library is used and referenced.
2018-09-05 09:58:17 +01:00
baldurk 296ebc065b Don't use unnecessary swizzle on vulkan text atlas 2018-09-05 09:58:17 +01:00
baldurk 9a1b8ef87d Add a workaround for macOS to avoid serialising size_t
* We never should have serialised size_t in the first place so this shouldn't
  have happened, but since we want to keep some semblence of best-effort
  backwards compatibility, we'll keep the code and just disable it on macOS.
2018-09-05 09:58:17 +01:00
Jake Turner 21de779509 Improved Apple code to get network port from spawned process
Improved the parsing code for lsof Added a retry to lsof function to account for delay between spawning process
2018-09-05 09:58:16 +01:00
baldurk 9a5d34f725 Add GL_EXT_memory_object* to whitelisted GLES extension list 2018-09-05 09:58:16 +01:00
baldurk 29d8d756ca Emulate ARB_program_interface_query on desktop if it's not available 2018-09-05 09:58:16 +01:00
baldurk a4e125f961 Fix thumbnails being drawn over whole resource preview 2018-09-05 09:58:16 +01:00
baldurk 19e72b9cad Promote CopyStructureCount to 'drawcall' type, the same as other copies
* Also add resource usage for the source and destination resources.
2018-09-04 13:49:31 +01:00
baldurk e113af8fe9 Fix serialisation of glFramebuffer*OVR where there are no DSA variants 2018-09-03 14:12:21 +01:00
baldurk bcee891ad2 Handle app bundles on macOS by finding the actual executable to fork to
* Ideally this would be in a separate file but we don't want to duplicate a lot
  of this code just for some extra handling
2018-09-03 14:12:21 +01:00
baldurk 514bf8096f Fix apple GetTickFrequency not calculating ratio for seconds 2018-09-03 14:12:21 +01:00
baldurk 878c0c9ff1 Use immutable samplers when checking for validity
* Fortunately the sampler element in the write is ignored when doing the actual
  update so it's safe to write these in before the validity check.
2018-09-03 14:12:20 +01:00
baldurk 6df1edaa10 Remove unused lambda capture variable 2018-09-03 14:12:20 +01:00
baldurk 7f8a0d35d9 Handle not being able to load vulkan library at runtime
* We try to call vkEnumerateInstanceExtensionProperties to figure out instance
  extensions we might want to add, and we can only do this at the moment by
  loading the vulkan dynamic library and calling into it.
2018-09-03 14:12:20 +01:00
baldurk e81ba58456 Don't call QFile::exists() with empty filename 2018-09-03 14:12:20 +01:00
baldurk 35aa60218a Add DoStringise overloads for strings, needed for asserts 2018-09-03 14:12:19 +01:00
baldurk 5152ad0307 Fix GLX fetching backbuffer samplecount wrongly 2018-09-03 14:12:19 +01:00
baldurk c40c6d35f4 Don't add in zombie collection handler on android - it explodes badly 2018-09-03 14:12:19 +01:00
baldurk cb23249b26 Fix mac compilation 2018-09-01 01:11:26 +01:00
baldurk b0fb23ef89 Don't try to read uninitialised memory serialising strings during replay 2018-08-31 22:14:12 +01:00
baldurk 5406227152 Call CreateWindowingData on the main UI thread
* This allows mac to patch-up the widget to be renderable, and has to happen on
  the UI thread.
2018-08-31 22:14:12 +01:00
baldurk 01fb937e28 Only run manual dialog event loop on win32, it can break other platforms 2018-08-31 22:14:12 +01:00
Benson Joeris 2c0b612c6f Fix order that InitialContents are applied for Vulkan.
This fixes a bug where the memory backing an image could be initialized
after the image itself, causing corruptions. ApplyInitialContents was
processing the resources in order of resource id. It is possible that a
VkImage and the VkDeviceMemory it is bound to both have InitialContent
(e.g. because the VkDeviceMemory also backs a buffer), and it is also
possible that the VkImage has a lower resource id than the
VkDeviceMemory. In this case, the VkImage's InitialContent is loaded,
and then the VkDeviceMemory's InitialContent is loaded. This direct
write of the backing memory causes the VkImage content to become
undefined and, at least on my AMD card, causes image corruption.

This is fixed by sorting the resource ids by type, which works because
eResDeviceMemory < eResImage. This sorting is applied only for
VulkanResourceManager.
2018-08-31 10:38:37 +02:00
baldurk 4cf423bfaa Revert pull request #1087. Closes #1096 2018-08-29 20:53:13 +01:00
baldurk 909b465eb1 Disable MSAA when creating PSO for mesh output fetch on D3D12
* This doesn't change anything as we're not rasterizing, but it keeps the D3D
  runtime happy.
2018-08-29 20:50:14 +01:00
baldurk f12a1a66f6 Don't record layout barriers for resources that have been omitted 2018-08-29 20:50:14 +01:00
baldurk 94b4bd5f56 Initialise program variables to 0 in case they're not created 2018-08-29 20:50:14 +01:00