Henrik Rydgård
1bf44b7ca3
Shutdown fix.
2017-12-03 11:02:49 +01:00
Henrik Rydgård
6abdbde47e
Fix bugs in VulkanImage allocator support
2017-12-03 10:50:25 +01:00
Henrik Rydgård
5d53f5e24c
Add another assert, which gets hit.. Hm. Something is wrong..
2017-12-03 10:42:19 +01:00
Henrik Rydgård
ff264efe7e
Change some Crash() to asserts in VulkanDeviceAllocator
2017-12-03 10:35:34 +01:00
Henrik Rydgård
d0c248368d
Use a VulkanDeviceAllocator for thin3d textures. Many devices have a hard limit on the total number of allocs and it's unnecessary to have the UI put pressure on that.
2017-12-03 10:29:41 +01:00
Henrik Rydgård
04913be779
Move pushbuffer map/unmap to the .cpp file to avoid inlining (for stack traces)
2017-11-29 20:13:38 +01:00
Henrik Rydgård
b9bad7431a
Add ability to simulate a few kinds of Vulkan initialization failures, to test the GL fallback.
2017-11-26 16:13:04 +01:00
Unknown W. Brackets
bd1ed897cf
Global: Fix some warnings.
2017-11-25 14:08:49 -08:00
Henrik Rydgård
b6911d2764
Add a hidden debug option [Graphics]GfxDebugSplitSubmit to try to narrow down some Vulkan issues, see #10163 . Also improve some asserts.
2017-11-22 10:47:04 +01:00
Henrik Rydgård
27a60f5e58
Fix message asserts on Android. Add more of them to check things in Vulkan code.
2017-11-20 12:11:47 +01:00
Henrik Rydgård
96d6f1cae5
Make sure the device supports transfers from swapchain images when taking screenshots.
2017-11-15 13:57:22 +01:00
Henrik Rydgård
10792cc8e7
Windows/Vulkan: implement screenshots. Something is iffy with the red/blue swap though...
2017-11-15 13:18:29 +01:00
Henrik Rydgård
3594623a8d
Vulkan: Show the preferred depth-stencil format in the feature list.
2017-11-15 09:08:30 +01:00
Unknown W. Brackets
b1554ef061
Vulkan: Cut down on asserts during init.
...
In case something is horribly wrong, or our desired settings aren't
compatible, let's try to stumble our way out.
More things can fail, but the goal is to detect failure or at least be
able to render UI settings to swap out of Vulkan.
2017-11-12 21:56:55 -08:00
Henrik Rydgård
4346a54eb7
Vulkan: Speed up and simplify hardware tesselation by using storage buffers.
2017-11-12 13:55:42 +01:00
Henrik Rydgård
ebac0143e0
Vulkan: Use a device allocator for tesselation data textures. Add comment about better solutions.
2017-11-12 10:28:55 +01:00
Henrik Rydgård
8d7bcd9d61
Vulkan hw tess: Assorted minor fixes. Works on Mali now.
2017-11-11 21:51:05 +01:00
Henrik Rydgård
ee768ca949
Logging improvements, avoid resetting the Android text drawer unnecessarily
2017-11-10 13:02:24 +01:00
Henrik Rydgård
0a2b20bf59
More logging and tweaking
2017-11-10 12:09:42 +01:00
Henrik Rydgård
8b42d83123
Vulkan: Remove duplicate depalShaderCache, fix a number of instances where we didn't use the deleter properly.
...
Plus more logging, of course.
2017-11-09 17:25:37 +01:00
Henrik Rydgård
ec504756e0
Vulkan: Improve init/shutdown logging on Android. Fix a bug where we'd not run InitDeviceObjects on GPU_Vulkan sometimes.
2017-11-09 16:02:05 +01:00
Henrik Rydgård
845b02a6c5
Ooops
2017-11-09 13:35:42 +01:00
Henrik Rydgård
25f32b1d78
Vulkan: Disable dual source blending on Intel GPUs, fixes #10074 .
2017-11-09 13:16:06 +01:00
Henrik Rydgård
ba846fdbc5
Show textual names of Vulkan GPU vendors
2017-11-09 12:30:07 +01:00
Henrik Rydgård
c6c90d4cbc
Improve Vulkan device selection mechanism to prefer discrete GPUs
2017-11-09 12:21:20 +01:00
Henrik Rydgård
ca3be1877e
Vulkan: Apply simple workaround for Mali driver bug (see #10070 ), and minor cleanup.
2017-11-08 17:03:27 +01:00
Henrik Rydgård
70c70b1e76
Vulkan: Some error handling improvement. Might get us a clue for #10065
2017-11-07 00:08:39 +01:00
Unknown W. Brackets
fc32a7b24e
Vulkan: Show textures in GE debugger.
2017-11-06 00:29:01 -08:00
Unknown W. Brackets
8edc6eaf5e
Vulkan: Fix segfault on swapchain fail.
...
This at least allows us to detect that the backend failed to init.
Happens when switching backends with debugger attached (probably driver
bug?)
2017-11-04 20:45:08 -07:00
Henrik Rydgård
96cd368878
Make VulkanTexture "immutable".
2017-11-01 08:49:48 +01:00
Henrik Rydgård
330bdb8be8
Add and update some comments.
2017-11-01 08:42:49 +01:00
Henrik Rydgård
74861d2d73
Vulkan: Make backbuffer transitions part of backbuffer render pass. Optimize depth buffer memory operations.
2017-11-01 08:42:49 +01:00
Henrik Rydgård
3f503ca297
Implement the rest of Vulkan framebuffer depal. Not yet working though.
2017-10-31 12:34:59 +01:00
Henrik Rydgård
c788dc896a
Synchronization is HARD. need a rethink, methinks.
2017-10-26 10:56:59 +02:00
Henrik Rydgård
1c5bd0f8dc
Move the VulkanRenderManager stuff to thin3d, fits in better there.
2017-10-26 10:56:59 +02:00
Henrik Rydgård
02f76ae4a8
Rendering basics now works.
2017-10-26 10:56:59 +02:00
Henrik Rydgård
833916a906
A multitude of fixes. The UI now works correctly, though of course ingame still broken.
2017-10-26 10:56:59 +02:00
Henrik Rydgård
0a0494ef8e
It builds! With some shortcuts, of course.
2017-10-26 10:56:59 +02:00
Henrik Rydgård
417b96a1b0
Use RenderManager for thin3d stuff
2017-10-26 10:56:59 +02:00
Henrik Rydgård
84ed793adf
Initial work on render queue manager
2017-10-26 10:56:59 +02:00
Henrik Rydgård
eabaf6ddcd
Bit more Vulkan barrier cleanup.
2017-10-21 13:05:52 +02:00
Henrik Rydgård
804aa79376
Various Vulkan image transition fixes and related
2017-10-20 18:09:05 +02:00
Henrik Rydgård
5da165fad6
More work towards passing 1.61 Vulkan validation layers
2017-10-20 17:19:07 +02:00
Henrik Rydgård
d0b9e5ed8f
Initial work on passing the latest Vulkan validation checks.
2017-10-20 14:47:36 +02:00
Henrik Rydgård
3757070fe2
Extra safety when switching GPU backends, fix possible Vulkan shutdown issue. Should help #10005
2017-10-09 12:17:54 +02:00
Henrik Rydgård
356b25e3ce
Vulkan: If there are no GPUs available, fail properly instead of asserting.
...
Seen on an obscure x86-64 android device when running 32-bit binaries
2017-10-02 14:09:30 +02:00
Henrik Rydgård
871fa713ed
Fix bug in vulkan init. Add some sanity checks to GL shader cache loading.
2017-08-28 15:22:18 +02:00
Henrik Rydgård
6a0f65764d
Minor cleanups
2017-08-28 15:04:28 +02:00
Henrik Rydgård
21d85617c1
Buildfix
2017-08-28 14:37:15 +02:00
Henrik Rydgård
55e9807a53
Separate VulkanContext::CreateDevice into ChooseDevice and CreateDevice to give an opportunity to enable extensions.
2017-08-28 14:12:56 +02:00
Henrik Rydgård
8c1bfb876f
Assorted cleanup of Vulkan init code. Show Vulkan extensions in system info.
2017-08-28 13:47:31 +02:00
Henrik Rydgård
750c124c33
Vulkan: Fix some inefficient command pool usage, might also fix a race condition
2017-08-18 17:09:48 +02:00
Henrik Rydgård
560eaa5390
Vulkan: Add code (disabled) to be able to run with more in-flight frames. Only improves performance marginally and needs more testing.
2017-08-17 17:57:37 +02:00
Henrik Rydgård
d60bb27cd9
Merge pull request #9906 from hrydgard/fastrunloop-optimize
...
GPU FastRunLoop optimizations
2017-08-17 16:25:15 +02:00
Henrik Rydgård
2c4e5e2303
Fastpath in fastrunloop when diff=0. Remove need for Execute for UV scale/offset.
2017-08-17 15:20:16 +02:00
Henrik Rydgård
5e788ffadf
Implement vertex caching for Vulkan.
2017-08-17 11:22:45 +02:00
Henrik Rydgård
bc76c8d541
Cleaner Vulkan shutdown
2017-08-15 17:30:37 +02:00
Henrik Rydgård
033676ca4d
Vulkan debug mode: In case of missing validation layers, warn, don't error out.
2017-07-13 23:36:53 +02:00
Unknown W. Brackets
531c6682b7
Vulkan: Increment engine version.
...
Since we are kinda majorly different now.
2017-05-31 20:04:11 -07:00
Henrik Rydgård
33d4f8c7ad
Vulkan: Fix minor bug when clearing the back buffer (loaded stencil for no reason)
2017-05-31 13:37:47 +02:00
Henrik Rydgård
996d0e9508
Oops.
2017-05-30 14:54:12 +02:00
Henrik Rydgård
fede9a05fb
Only show the Vulkan setting if Vulkan might be available.
2017-05-30 10:38:17 +02:00
Henrik Rydgård
38b50501c2
Clearing fix, drawpixels fix/hack
2017-05-30 09:36:17 +02:00
Henrik Rydgård
c173da49d3
Fix a number of bugs and stuff affecting Vulkan on Mali
2017-05-30 09:36:17 +02:00
Henrik Rydgard
0c70735bc4
Buffered rendering is starting to work, though still kinda broken.
2017-05-30 09:36:17 +02:00
Henrik Rydgård
a7dd6d6085
Further steps towards Vulkan framebuffer support
2017-05-30 09:36:17 +02:00
Henrik Rydgard
4407445d50
Separate BeginFrame from BeginSurfaceRenderPass
2017-05-30 09:22:40 +02:00
Henrik Rydgard
d4e1fc8d93
More vulkan shutdown fixes
2017-05-07 11:08:09 +02:00
Henrik Rydgard
5974e0ee6d
Work towards a clean vulkan shutdown.
2017-05-07 10:40:11 +02:00
Unknown W. Brackets
bf02f7d98b
Vulkan: Detect swapchain init failure.
...
This seems to be a driver bug, and occurs on NVIDIA when OpenGL has
previously been inited. Or we're not cleaning something up properly...
but there's a driver error logged to debug output.
2017-04-15 16:26:26 -07:00
Unknown W. Brackets
a1f59deafe
Fix some type narrowing warnings and typos.
2017-03-19 07:44:31 -07:00
Henrik Rydgard
03dab0fdbd
More UWP prep
2017-02-25 09:57:22 +01:00
Henrik Rydgard
a2b49fd0e0
Update Vulkan headers. Hack around another validation check (which I beleive to be bugged).
2016-12-15 18:12:53 +01:00
latot
cb1e01f380
clean double end statements
2016-12-03 12:25:05 -03:00
Henrik Rydgård
405ac4f2cc
Merge pull request #9041 from unknownbrackets/vulkan
...
WIP: Progress toward device restore on Vulkan
2016-12-01 15:58:32 +01:00
Florent Castelli
70593d1004
android: Change preprocessor define to standard __ANDROID__
...
ANDROID is only standard to the old Makefile buildsystem, not the platform.
2016-10-12 11:14:09 +02:00
Unknown W. Brackets
1d9222b3e4
Vulkan: Add comment for Android validation layers.
...
Note: these also require minor tweaks to Local.mk to include, currently,
but we're probably moving to gradle.
2016-10-10 22:08:44 -07:00
Unknown W. Brackets
e263bb945e
Vulkan: Correct initial swapchain compositeAlpha.
...
We'll just need to deal with the fact that we have to output 1.0 so that
blending doesn't matter, I think.
2016-10-10 22:07:50 -07:00
Unknown W. Brackets
39d6ea2985
Vulkan: Auto-set queued deletes to null.
2016-10-09 12:16:42 -07:00
Unknown W. Brackets
0bf65150d6
Vulkan: Prefer 32-bit color formats if possible.
2016-07-01 14:05:15 -07:00
Unknown W. Brackets
419b960403
x86jit: Fix params in Replace_fabsf.
2016-05-31 10:40:14 -07:00
Henrik Rydgard
fd0af5b271
Vulkan: Mostly pass the validation layers in SDK 1.0.13
2016-05-24 21:41:35 +02:00
Henrik Rydgard
0a58424e75
Vulkan: Remove validation layer that is now included in standard_validation
2016-05-18 23:53:17 +02:00
Henrik Rydgard
617bcebcd6
Update to latest vulkan header (1.0.8)
2016-04-07 22:53:37 +02:00
Henrik Rydgard
5cd3956575
Reformat VulkanContext.cpp (fix tab indentation)
2016-04-03 00:01:56 +02:00
Henrik Rydgard
e1f660ebc1
Update vulkan structure init to the new style
2016-04-02 23:57:23 +02:00
Henrik Rydgard
32f5930e15
Move clear handling to FramebufferVulkan, center the clear properly in non-buffered. more cleanup.
2016-03-31 00:50:50 +02:00
Henrik Rydgard
731af0d0b4
Add some infrastructure for 2D drawing, to be used by the Vulkan framebuffer manager
2016-03-31 00:49:10 +02:00
Henrik Rydgard
40d05e292c
Cleanup in FramebufferVulkan to reduce the size of future diffs
2016-03-28 20:23:29 +02:00
Henrik Rydgard
a8c386b94c
Make VulkanImage a little more flexible (make it possible to create depth images)
...
Just preparation.
2016-03-28 18:25:05 +02:00
Unknown W. Brackets
8dd93576ec
Vulkan: Ignore queued frees after destroy.
...
We flush slabs so this gives false assertions in some cases.
2016-03-27 12:38:15 -07:00
Unknown W. Brackets
048a12f589
Buildfix.
...
Some compilers didn't like that, oops.
2016-03-27 09:25:25 -07:00
Unknown W. Brackets
3352608027
Vulkan: Free texture slabs on exit.
2016-03-27 08:30:43 -07:00
Unknown W. Brackets
16570f10bd
Vulkan: Handle texture allocation failure.
...
Users hit out of memory even using desktop GL devices, and it will
definitely be possible on mobile and desktop Vulkan.
2016-03-27 08:30:42 -07:00
Unknown W. Brackets
27a5697a96
Vulkan: Use the slab allocator for textures.
2016-03-27 08:30:42 -07:00
Unknown W. Brackets
62b6432121
Vulkan: Allocate forwards in device slabs.
2016-03-27 08:30:41 -07:00
Unknown W. Brackets
87d65e696c
Vulkan: Correct alloc near slab end.
2016-03-27 08:30:40 -07:00
Unknown W. Brackets
9921fd2ea7
Vulkan: Don't bother with extra userdata, comments.
...
Was a failed attempt to avoid new/delete.
2016-03-27 08:30:40 -07:00
Unknown W. Brackets
bd7c431532
Vulkan: Increase new size for new slabs.
2016-03-27 08:30:39 -07:00
Unknown W. Brackets
973a9f6124
Vulkan: Delay frees for device memory slabs.
2016-03-27 08:30:38 -07:00
Unknown W. Brackets
7d5a8aa470
Vulkan: Protect better against memory alloc errors.
2016-03-27 08:30:38 -07:00
Unknown W. Brackets
f0dc921ed5
Vulkan: Setup a pool memory manager for textures.
2016-03-27 08:30:37 -07:00
Unknown W. Brackets
e7ea1da99f
Vulkan: Swizzle instead of converting colors.
2016-03-26 15:02:06 -07:00
Unknown W. Brackets
adc9946641
Vulkan: Ask for COHERENT staged texture memory.
2016-03-26 12:18:49 -07:00
Henrik Rydgård
b0329e8106
Merge pull request #8657 from unknownbrackets/vulkan-resize
...
Support resizing the screen on Vulkan
2016-03-22 09:22:58 +01:00
Unknown W. Brackets
963b18e6c2
Vulkan: Prep for resize, destroy surface on exit.
...
I suppose this is a validation layer bug, it didn't report the leak.
2016-03-21 19:41:20 -07:00
Henrik Rydgard
b97e02febe
Typo fixes. Delete irrelevant comments
2016-03-21 20:23:53 +01:00
Henrik Rydgard
dff585e440
VulkanContext: Detect the appropriate depth buffer format to use, expose it.
...
This should help AMD compatibility.
2016-03-21 20:11:49 +01:00
Henrik Rydgård
6831f6fc46
Merge pull request #8650 from unknownbrackets/vulkan-buf
...
Vulkan: Cache only device in push buffers
2016-03-21 08:27:50 +01:00
Henrik Rydgård
2a35d4b4c5
Merge pull request #8653 from unknownbrackets/warnings
...
Warning fixes from clang
2016-03-21 08:27:25 +01:00
Unknown W. Brackets
2d34c0a8bc
Vulkan: Free anything pending before the device.
...
This includes, for example, device memory and etc.
2016-03-21 00:02:59 -07:00
Unknown W. Brackets
9c3e12ead0
Remove some unused things reported by clang.
2016-03-20 23:14:08 -07:00
Unknown W. Brackets
6d947a057e
Vulkan: Handle oversized push buf allocations.
2016-03-20 22:49:38 -07:00
Unknown W. Brackets
9fd040eed0
Vulkan: Cache only device in push buffers.
2016-03-20 22:49:38 -07:00
Unknown W. Brackets
e3d9630b9a
Vulkan: Handle oom slightly better.
2016-03-20 15:25:59 -07:00
Unknown W. Brackets
9e4389cbf5
Vulkan: Defrag buffers when growing.
2016-03-20 15:20:42 -07:00
Unknown W. Brackets
f2513ffcd6
Vulkan: Allocate more buffers on overflow.
2016-03-20 15:15:13 -07:00
Henrik Rydgard
0b1cfaf751
Be more economical with UBO pushbuffer space by reusing the last data when possible.
2016-03-20 19:35:31 +01:00
Henrik Rydgard
5d19f3dfb8
Decode vertex data directly into the vertex pushbuffer, saving a memcpy.
2016-03-20 19:35:03 +01:00
Henrik Rydgard
5d45413dab
Fix a resource leak. Request COHERENT memory for pushbuffers.
2016-03-20 19:35:03 +01:00
Henrik Rydgard
2c61b1e763
Change the VulkanPushBuffer API to allow for adding support for dynamic growth
2016-03-20 19:35:03 +01:00
Henrik Rydgard
5d56537a16
Move VulkanPushBuffer into VulkanMemory.h
2016-03-20 19:31:02 +01:00
Henrik Rydgard
966cb89d41
Vulkan: Fix our use of dual source blending, re-enable if available.
2016-03-20 19:31:02 +01:00
Unknown W. Brackets
82f3df1e06
Vulkan: Initial support for aniso filtering.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
da50370328
Split out VulkanTexture from VulkanContext.cpp/h into VulkanImage.cpp/h
2016-03-20 19:31:02 +01:00
Henrik Rydgard
e45c24b75f
Show how much pushbuffer space is used each frame.
...
Optimizing this number (by avoiding redundant UBO uploads etc) will probably help performance.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
84e649f74b
Vulkan: Enable mipmapping
2016-03-20 19:31:02 +01:00
Henrik Rydgard
8a62724316
Upload PSP textures through a push buffer instead of image copy. More flexible.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
5ea01ffff6
Add a secondary way to upload textures - through buffers.
2016-03-20 19:31:02 +01:00
Unknown W. Brackets
82205a4660
Handle Vulkan init errors more gracefully.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
fe270c592a
Typo fix
2016-03-20 19:31:02 +01:00
Henrik Rydgard
b0098f7961
Replace ugly workaround with VK_LAYER_LUNARG_unique_objects which prevents handle reuse.
...
See https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/121
2016-03-20 19:31:02 +01:00
Henrik Rydgard
575cc890b7
Turn off annoying "debug flicker" I used to see if we were swapping buffers properly early on
...
Also minor logging changes, refine the false-positive debug layer check
2016-03-20 19:31:02 +01:00
Henrik Rydgard
5ca012e83d
Fix a bunch of new vulkan validation layer failures.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
6e2e0bfa33
Should not specify the Vulkan patch version when requesting Vulkan 1.0.
2016-03-20 19:31:02 +01:00
Unknown W. Brackets
c92790c5a8
Specify a useful app version when loading Vulkan.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
432fbe30d1
Vulkan: We're doing dual src blending wrong (GLSL part, not sure how to do it right) so disable it.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
b06cf4e688
Re-fix depth buffer initialization
2016-03-20 19:30:39 +01:00
Henrik Rydgård
9c457da4c9
Gets the Vulkan backend running, but not drawing correctly, on Android.
...
Not sure what's wrong, I get a yellow flashing screen.
2016-03-20 19:30:39 +01:00
Scott Mansell
77420f799e
VulkanLoader: Detect loader failure on windows.
2016-03-20 19:30:39 +01:00
Scott Mansell
e97a6c6f77
VulkanLoader: Load vkDestroySurfaceKHR
2016-03-20 19:30:39 +01:00
Henrik Rydgard
d325aa2b30
Hook up Vulkan on Android, no idea if it works. Move VulkanContext to Common.
2016-03-20 19:30:11 +01:00
Henrik Rydgard
2481714a8e
Load Vulkan dynamically. Fix Android build (though - Vulkan is not working on Android yet)
2016-03-20 19:30:11 +01:00
Henrik Rydgard
2a71e164f5
Enable vulkan validation
2016-03-20 19:25:30 +01:00
Henrik Rydgard
eedd81988c
Implement a trivial SPIR-V disassembler, just for fun
2016-03-20 19:18:35 +01:00