Commit Graph

301 Commits

Author SHA1 Message Date
twinaphex 72428a23c5 (shader_vulkan.cpp) Move some functions to vulkan_common.c 2018-04-24 07:07:58 +02:00
twinaphex 163be3ccfd (vulkan_common.c) Prevent some more collissions in the future 2018-03-28 17:41:04 +02:00
twinaphex de1efd7878 This hack is no longer needed with latest nvidia windows
drivers (390.77)
2018-01-31 18:10:53 +01:00
twinaphex 2178b6d10f Vulkan temporary workaround for swapchain recycling (nvidia) -
Both swapchain recreation methods are proper andwithin the Vulkan specs.
The differnece is retroarch follows method (apparently proposed in
vulkan samples) that "hopes" the driver will reuse some of the old
swapchain resources, while the other method destroys everything and
recreates from scratch. At the moment on Nvidia drivers the second
method is stable while the first method is unreliable in all cases
today.
2018-01-21 04:40:01 +01:00
gblues 6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
Themaister f8447c4648 Set correct buffer size. 2017-12-09 17:28:20 +01:00
Themaister 75b84b4f94 Support pending swapchain creation. 2017-12-09 17:28:20 +01:00
Themaister ac42b87400 Recreate swapchain directly if vkAcquireNextImageKHR fails. 2017-12-09 17:28:20 +01:00
Themaister 714684a4d3 Don't wait for WSI fence unless it has been signalled. 2017-12-09 17:28:20 +01:00
twinaphex d5b3104cfb Cleanups/warning fixes 2017-12-06 19:51:07 +01:00
Hans-Kristian Arntzen 5c67fc3040 Vulkan: Enable VK_KHR_sampler_mirror_clamp_to_edge extension. 2017-10-01 20:20:45 +02:00
twinaphex 9c32d03c1e (Vulkan/Win32) C89_BUILD fixes 2017-08-12 17:56:30 +02:00
twinaphex 126a5bf121 Use string_is_equal_fast/string_is_not_equal_fast 2017-05-16 04:00:37 +02:00
aliaspider 36137d22e5 Vulkan: use the command buffer provided as parameter in
vulkan_copy_staging_to_dynamic.
2017-05-15 05:35:17 +01:00
twinaphex 05e4ec733e Move uint variables 2017-04-28 21:03:04 +02:00
twinaphex 765e636214 (Vulkan) Cleanups 2017-04-24 17:21:29 +02:00
Hans-Kristian Arntzen 2d88530c98 Vulkan: Simple snow pipeline works.
Some other fixes too.
2017-02-20 20:53:59 +01:00
Hans-Kristian Arntzen 6395907887 Vulkan: Find supported composite alpha in swapchain. 2017-02-13 16:30:02 +01:00
twinaphex 374fd57270 Remove the few performance counters that depend on runloop_ctl 2017-01-25 18:15:58 +01:00
twinaphex 6661c0fb94 Rewrite performance counter stop/start/init into macros 2017-01-25 16:53:06 +01:00
twinaphex 96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
Hans-Kristian Arntzen 4c99809cde Vulkan: Fix VSync toggling on Windows.
Retarded bug, but haven't actually had access to a Windows machine until
now.
2016-12-17 12:06:43 +01:00
twinaphex b43f786f89 Cleanups 2016-09-08 08:15:40 +02:00
twinaphex 467451fccc Cleanup more header includes 2016-09-01 18:18:55 +02:00
twinaphex ba7d638b99 Use string_is_equal 2016-08-29 18:46:41 +02:00
Hans-Kristian Arntzen 96818a297c Vulkan: Fix validation errors with OriginalHistory.
For some reason, OriginalHistory blit happened inside a render pass.
Also add more TRANSFER_SRC_BIT caps to images as they might have to be
copied to history.
2016-08-07 01:09:15 +02:00
Hans-Kristian Arntzen 4ac9ebd579 Vulkan: Allow configuring mip/wrap/filter for LUTs.
LUTs are feature complete with CGP now.
2016-07-31 16:16:47 +02:00
Hans-Kristian Arntzen 0eca956789 Vulkan: Create image views with right amount of mip levels. 2016-07-31 14:01:39 +02:00
Hans-Kristian Arntzen 4e8e79eabd Vulkan: Add mipmapping support. 2016-07-31 13:47:10 +02:00
Hans-Kristian Arntzen 7813d40c9e Log if Vulkan debug layers are enabled. 2016-07-31 12:54:10 +02:00
Hans-Kristian Arntzen f54b0c0ff0 Vulkan: Implement swap_interval > 1.
We have to fake it by duping since Vulkan has no native support for
this.
2016-07-24 00:34:48 +02:00
Hans-Kristian Arntzen 8c1b935969 Vulkan: Implement BFI. 2016-07-24 00:07:32 +02:00
twinaphex 4e68bc0b53 CXX_BUILD fix 2016-07-21 21:54:43 +02:00
Hans-Kristian Arntzen 8569028189 Vulkan: Use manual memory management for cached/incoherent devices. 2016-07-15 16:12:30 +00:00
Hans-Kristian Arntzen f5bddd45e8 Vulkan: Don't query layout if we have optimal tiling. 2016-07-14 23:15:39 +02:00
Hans-Kristian Arntzen d382e1069e Basic VK_KHR_display integration works! :) 2016-07-07 19:28:27 +02:00
Hans-Kristian Arntzen d2fafc5451 Sketch out vulkan_create_display_surface. 2016-07-06 20:27:39 +02:00
Hans-Kristian Arntzen e9046dd06f Begin implementing VK_KHR_display. 2016-07-06 19:37:47 +02:00
twinaphex 9fab75c4b5 Cleanups; 80-char width limit 2016-06-30 07:40:25 +02:00
Hans-Kristian Arntzen c80127d29d Vulkan: Hook up async compute test more properly.
Supports multiple queues and queues from different families.
2016-06-27 20:54:53 +02:00
Hans-Kristian Arntzen 4abb0ef331 Vulkan: Cache destroy device callback. 2016-06-27 20:54:53 +02:00
Hans-Kristian Arntzen 6841b5ad00 Vulkan: Keep dylib around if caching instance. 2016-06-27 20:54:53 +02:00
Hans-Kristian Arntzen 54c1759f45 Vulkan: Make a more general purpose symbol loader.
Avoids painful manual loading and wrapping function pointers everywhere
...

Reusable for cores, so move to libretro-common.
Also update built-in Vulkan headers.
2016-06-26 13:10:58 +02:00
Hans-Kristian Arntzen 1da2e2dbab Vulkan: Hook up negotiation interface device creation. 2016-06-26 10:40:07 +02:00
Hans-Kristian Arntzen 10a6d7a458 Vulkan: Begin hooking up negotiation interface. 2016-06-25 21:01:36 +02:00
Hans-Kristian Arntzen 972a5db7ae Vulkan: Fix shader module leak. 2016-06-25 14:06:14 +02:00
Hans-Kristian Arntzen de36f572d1 Vulkan: Fix more validation issues. 2016-06-25 14:01:10 +02:00
Hans-Kristian Arntzen 07880e3f45 Vulkan: Begin hooking up validation layers.
Found lots of regressions due to bad reformatting.
2016-06-25 13:52:33 +02:00
Hans-Kristian Arntzen d043123f71 Vulkan: Add support for queue transfers in HW rendering. 2016-06-25 11:39:52 +02:00
Hans-Kristian Arntzen 82c7aa0e6f Use max swapchain image setting when creating swapchain. 2016-06-25 09:52:46 +02:00
Hans-Kristian Arntzen 21be54501b Log which present modes are supported. 2016-06-13 22:00:32 +02:00
Hans-Kristian Arntzen e7b4f4fd4d Fix various Android Vulkan issues.
Was getting bogus swapchain width/height causing weird issues.
Also, create swapchain after swap interval is correctly set.
2016-06-13 19:51:44 +02:00
Hans-Kristian Arntzen c374c9853d Some potential fixes for Android Vulkan. 2016-06-07 01:43:14 +02:00
twinaphex 6bd7fd482c Performance counters got function name changes 2016-05-21 13:14:25 +02:00
Twinaphex 72e1a33715 Merge pull request #3016 from Themaister/master
Add perf counter to fence waits.
2016-05-21 12:36:25 +02:00
Hans-Kristian Arntzen 218ecc07c1 Add perf counter to fence waits.
Makes it easy to check if we're GPU bound or not.
2016-05-21 12:13:46 +02:00
twinaphex 0d833c903a Merge remote-tracking branch 'origin/vulkan-windows' 2016-05-16 07:51:01 +02:00
twinaphex fc56f6ebdb Add some HAVE_THREADS ifdefs 2016-05-11 10:10:30 +02:00
Hans-Kristian Arntzen d723411436 De ioctl video_driver. 2016-05-08 14:00:51 +02:00
Hans-Kristian Arntzen 464a4add66 XMB ribbon works in Vulkan. 2016-05-08 11:11:28 +02:00
Hans-Kristian Arntzen e04bbfbae2 Vulkan: Add more logging ... 2016-03-29 17:57:13 +02:00
Hans-Kristian Arntzen c7b96b75b8 Vulkan: Add more error logging. 2016-03-29 17:36:13 +02:00
Hans-Kristian Arntzen 8ade7fb274 Vulkan: Attempt Windows backend support.
Completely bind since I cannot test myself, but compiles.
2016-03-29 15:50:12 +02:00
Hans-Kristian Arntzen ca62f342b0 Vulkan: Fix original history.
Verified to work now.
2016-03-25 18:50:49 +01:00
Hans-Kristian Arntzen 83ab0d799f Vulkan: Begin implementing history and feedback. 2016-03-25 14:51:37 +01:00
Hans-Kristian Arntzen f1a5725f66 Vulkan: Host writes are implicitly flushed on submit.
Use TOP_OF_PIPE/0 access instead to work
around spammy asserts on Anvil.

We still have to invalidate the caches however.
2016-03-21 16:57:04 +01:00
Hans-Kristian Arntzen fa7eeb57b8 Vulkan: Use 1.0.6.
1.0.2 is pre public release version I think ...
2016-03-21 10:03:15 +01:00
Hans-Kristian Arntzen 84923a0465 Vulkan: Tighten up pipeline barrier usage.
Lots of memory barriers used with TOP_OF_PIPE which is not valid.
2016-03-21 10:02:00 +01:00
twinaphex 34958ec39a (Vulkan) Don't use VK_API_VERSION any more 2016-03-20 03:04:52 +01:00
twinaphex f79418459f Ability to compile now with --enable-wayland and --disable-x11
defined
2016-03-09 09:21:07 +01:00
Hans-Kristian Arntzen f02faeea27 Vulkan: Fix segfault on nVidia. 2016-03-06 12:33:46 +01:00
Hans-Kristian Arntzen ebdb7168ed Vulkan: Clean up symbol loading.
Should use GetDeviceProcAddr when appropriate.
2016-03-06 11:27:36 +01:00
twinaphex 7d0205deac (vulkan_common.c) Add log error when vkCreateInstance fails 2016-03-02 03:13:31 +01:00
twinaphex 86a8899b0f (Android) Start preparing Android JNI Makefiles for Android 2016-03-01 18:46:40 +01:00
twinaphex b79edb6095 Reimplement function pointers 2016-03-01 02:21:53 +01:00
twinaphex 9a10ef5591 (Vulkan) Add more Vulkan function pointers 2016-02-29 23:28:12 +01:00
twinaphex 860b7fde62 (Vulkan) Add DeviceWaitIdle function pointer 2016-02-29 23:25:25 +01:00
twinaphex 1d9220d9d1 (Vulkan) Add vkCmdBindVertexBuffers function pointer 2016-02-29 23:22:56 +01:00
twinaphex c8b9bb609f (Vulkan) More image function pointers 2016-02-29 23:19:23 +01:00
twinaphex 30eac5b778 (Vulkan) Add vkDestroyDescriptorPool fp 2016-02-29 23:13:13 +01:00
twinaphex 6023a5f06e Add vkAllocateDescriptorSets fp 2016-02-29 23:11:00 +01:00
twinaphex 4a1a623099 (Vulkan) Add more funcptrs 2016-02-29 23:09:05 +01:00
twinaphex 0e60d20705 Add Command Function pointers 2016-02-29 23:04:17 +01:00
twinaphex 67ea4e1d6b (Vulkan) Pipeline function pointers 2016-02-29 22:55:31 +01:00
twinaphex 1fbac78e35 (Vulkan) Go through function pointer for vkDestroyPipelineCache 2016-02-29 22:38:58 +01:00
twinaphex a7df7be64b Add vkAllocateMemory/vkFreeMemory 2016-02-29 22:36:53 +01:00
twinaphex a53e7a5437 (Vulkan) Add pipeline barrier function pointer 2016-02-29 22:30:23 +01:00
twinaphex bd96ab3585 (vulkan_common.c) Cleanups 2016-02-29 22:26:20 +01:00
twinaphex 1b85ee442f Go through funcptr for vkAllocateCommandBuffers 2016-02-29 22:23:35 +01:00
twinaphex 83dc7db6c7 (Vulkan) Add descriptor set layout function callbacks 2016-02-29 22:04:23 +01:00
twinaphex caed6c61cb (Vulkan) Function pointer for vkFreeCommandBuffers 2016-02-29 21:58:10 +01:00
twinaphex 1e407079e4 Add function pointers for image view functions 2016-02-29 21:55:54 +01:00
twinaphex a6eb40b3d2 Add funcptr for vkAllocateCommandBuffers 2016-02-29 21:51:42 +01:00
twinaphex 4771c45ed3 Add render pass command function pointers 2016-02-29 21:43:04 +01:00
twinaphex 7f5d0f2763 (Vulkan) More function pointers for command buffer functions 2016-02-29 21:37:35 +01:00
twinaphex 860ffff3c9 (Vulkan) Go through funcptr for vkEndCommandBuffer 2016-02-29 21:31:51 +01:00
twinaphex a1c8a47665 (Vulkan) Go through funcptr for vkDestroyInstance 2016-02-29 21:27:18 +01:00
twinaphex c62971042d (Vulkan) Cleanups 2016-02-29 21:20:36 +01:00
twinaphex eae652d6a5 Go through funcptr for vkDestroyCommandPool 2016-02-29 21:17:21 +01:00
twinaphex f0458495f4 Go through funcptr for vkDestroyPipeline 2016-02-29 19:41:25 +01:00
twinaphex d45f0e0946 Some cleanups 2016-02-29 19:39:49 +01:00
twinaphex 670eede306 Go through function pointer for vkCmdClearAttachments 2016-02-29 19:34:40 +01:00
twinaphex fc7a972466 Go through function pointers for vkMapMemory/vkUnmapMemory 2016-02-29 19:20:42 +01:00
twinaphex b660fb8878 Create sampler function pointers 2016-02-29 19:11:09 +01:00
twinaphex 0e91bb6852 Go through more function pointers 2016-02-29 19:03:18 +01:00
twinaphex dfde6f833a (Vulkan) Nits 2016-02-29 18:46:17 +01:00
twinaphex 1d96e80b05 (Vulkan) More funcptrs 2016-02-29 18:40:30 +01:00
twinaphex fbf527eac2 (vulkan_common.c) Style nits 2016-02-29 18:24:12 +01:00
twinaphex a8ccf2531d Cleanups 2016-02-29 17:21:40 +01:00
twinaphex e6da374bb5 Cleanups 2016-02-29 17:18:28 +01:00
twinaphex a4c9d02953 Add DestroyImage funcptr 2016-02-29 17:16:01 +01:00
twinaphex 874b5b7e17 Go through more funcptrs 2016-02-29 17:13:13 +01:00
twinaphex 8f69470c25 Go through VKFUNC macro 2016-02-29 17:00:08 +01:00
twinaphex d6005c224c Go through VKFUNC 2016-02-29 16:55:50 +01:00
twinaphex 6836b5f868 vkCreateImage - go through funcptr 2016-02-29 16:48:55 +01:00
twinaphex 3677144d18 Start going through VKFUNC 2016-02-29 16:47:21 +01:00
twinaphex 6c9e8041c6 Add function pointer for vkCreateCommandPool 2016-02-29 16:41:49 +01:00
twinaphex 6dce80ea07 Add function pointers for vkCreatePipelineCache and vkCreatePipelineLayout 2016-02-29 16:37:15 +01:00
twinaphex 778b50fc28 Add funcptr for vkCreateFramebuffer 2016-02-29 16:32:34 +01:00
twinaphex 361cce328d vkCreateRenderPass - add funcptr 2016-02-29 16:30:45 +01:00
twinaphex 277e2977ff (Vulkan) Add function pointer to vkDestroyDevice 2016-02-29 16:28:12 +01:00
twinaphex 4248e244a8 Go through funcptr for vkCmdCopyImage 2016-02-29 06:52:08 +01:00
twinaphex 89ee08214d We need to grab a function pointer to vkCmdDraw later after
vkCreateDevice
2016-02-29 06:21:42 +01:00
twinaphex be5333371b (Vulkan) More funcptrs 2016-02-29 06:16:31 +01:00
twinaphex bfd38e171b (Vulkan) More Vulkan funcptrs 2016-02-29 05:57:38 +01:00
twinaphex 3abea50cbf Move function pointers to vulkan_context 2016-02-29 05:49:05 +01:00
twinaphex 2a621a8424 Go through vkEnumeratePhysicalDevices funcptr 2016-02-29 05:37:37 +01:00
twinaphex cf03851cc8 Add vkGetDeviceQueue funcptr 2016-02-29 05:37:37 +01:00
twinaphex 5e970637d4 (Vulkan) Add more function pointers 2016-02-29 05:32:10 +01:00
twinaphex 25d741e26a Start setting up more function pointers 2016-02-29 04:21:08 +01:00
Alcaro 04ac09f579 One thing less to worry about when copypasting this, less risk of repeating 2d5e10e840. 2016-02-23 16:08:57 +01:00
Alcaro f8452e23c8 Don't use uninitialized variables. 2016-02-23 16:06:37 +01:00
Hans-Kristian Arntzen 6e7f1371dd Vulkan: Fix scenario where we limit the number of frames too much. 2016-02-21 13:03:26 +01:00
Hans-Kristian Arntzen 9e060bf088 Fix STATIC texture upload. 2016-02-21 13:01:53 +01:00
Hans-Kristian Arntzen 0dddd671f8 Vulkan: Use more approriate barrier 2016-02-21 12:59:11 +01:00
Hans-Kristian Arntzen 4259ea3d06 Merge branch 'master' of git://github.com/libretro/RetroArch 2016-02-21 12:45:26 +01:00
Hans-Kristian Arntzen 36eb07e067 Vulkan: Use copy paths if needed. 2016-02-21 12:33:16 +01:00
twinaphex f462954609 Style nits pt. 2 2016-02-21 10:09:41 +01:00
twinaphex 8ce2665383 Style nits 2016-02-21 10:08:36 +01:00
Hans-Kristian Arntzen 8550c16f86 Always try to use cached memory if we can for linear textures.
Should improve cores which use SOFTWARE_FRAMEBUFFER.
2016-02-20 15:17:25 +01:00
Hans-Kristian Arntzen b61c05e10f Log the number of swapchain images we get. 2016-02-20 14:24:36 +01:00
Hans-Kristian Arntzen 111c37832a Make sure we get a queue which also supports compute.
Graphics + Compute queue must be supported.
2016-02-20 14:20:17 +01:00
Hans-Kristian Arntzen 5542427246 Try to use cached memory for readbacks.
Speeds up nVidia readbacks by order of magnitude.
2016-02-20 12:04:53 +01:00
Hans-Kristian Arntzen 4540369fcb Use correct cast for WSI_XLIB. 2016-02-19 22:25:51 +01:00
Hans-Kristian Arntzen 0bcdf6ebe0 More properly enumerate GPUs.
Just pick the first one for now.
2016-02-19 21:55:11 +01:00
Hans-Kristian Arntzen 88ec0f522b Vulkan: Add Vulkan backend to GLX context.
Also fixes some snags with libretro-test-vulkan.
2016-02-19 21:37:24 +01:00
Hans-Kristian Arntzen 1b5cc1ca9c Fix some types for WSI. 2016-02-19 19:50:04 +01:00
twinaphex d6906ee7df (xcb) Buildfix 2016-02-19 15:43:12 +01:00
twinaphex 11831a8b47 move shareable vulkan initialization code to vulkan_common.c 2016-02-19 14:38:15 +01:00
Hans-Kristian Arntzen c74c7ae053 Vulkan: Work around broken push constants on Ivy Bridge.
Use UBOs instead, should be more compatible with early drivers.
2016-02-18 18:36:49 +01:00
Hans-Kristian Arntzen adbf9fed16 Vulkan implementation. 2016-02-16 20:42:02 +01:00