Magnus Norddahl
a0f618311a
- change SubmitCommands to handle all parts of the present
2019-04-11 04:52:57 +02:00
Magnus Norddahl
095ea3ce76
- apply vk_hdr immediately and delay initial swapchain creation until first image needs to be acquired
2019-04-11 04:26:43 +02:00
Christoph Oelckers
28c8bb47fb
- added generic font support for intermission text screen.
2019-04-11 00:14:53 +02:00
Christoph Oelckers
9e096c62fd
- allow the automap HUD to use the VGA font.
2019-04-10 20:39:15 +02:00
Magnus Norddahl
5f70ce2148
- fix SubmitCommands bug if it no swapchain image was acquired
2019-04-10 16:39:33 +02:00
Magnus Norddahl
85b754b9ca
- fix model rendering glitch
2019-04-09 18:19:14 +02:00
Magnus Norddahl
d413581ee2
- fix model shutdown crash
2019-04-09 17:06:54 +02:00
Magnus Norddahl
eb9f6ec313
- remove the 6 layer texture descriptor set limitation
2019-04-09 16:30:49 +02:00
Magnus Norddahl
c9dbb589e2
- once the Vulkan backend booted all the remaining vulkan calls are unrecoverable (unless the code calling it gets actively involved, which means that particular action is not exceptional in nature and shouldn't be done as an exception)
2019-04-09 14:25:18 +02:00
Magnus Norddahl
d47891d20a
- allocate new texture descriptor pool if it is full
2019-04-09 14:06:24 +02:00
Magnus Norddahl
2cbd1c4736
- Fix inverted check in last commit
2019-04-09 12:41:05 +02:00
Magnus Norddahl
d3dacfc2cb
- improve error handling during vulkan initialization
2019-04-09 12:28:25 +02:00
Christoph Oelckers
ab256945aa
- use I_Error for throwing errors in the Vulkan backend and print the message if one gets thrown during init.
2019-04-08 23:48:46 +02:00
Magnus Norddahl
2694b0a167
- workaround for drivers that bug by never acquiring an image
2019-04-08 21:01:40 +02:00
Magnus Norddahl
c98dfd1790
- improve swap chain resize and handle the edge cases for the swap chain
2019-04-08 19:23:37 +02:00
Magnus Norddahl
20fde9f8be
- clean up swapchain class
2019-04-08 18:14:07 +02:00
Magnus Norddahl
b9900450c7
- remove unused function declaration
2019-04-08 05:31:20 +02:00
Magnus Norddahl
afbd45e1b1
- fix uniform aligment bug for vec3
2019-04-08 05:27:35 +02:00
Magnus Norddahl
a488034065
- fix null pointer crash
2019-04-08 04:57:46 +02:00
Magnus Norddahl
b30ed99672
- remove the old OpenGL postprocess custom shader implementation
2019-04-08 01:31:22 +02:00
Magnus Norddahl
d114575bd1
- implement custom post process shaders for vulkan backend
2019-04-08 00:47:55 +02:00
Magnus Norddahl
d1378364b5
- fix bloom pass regression
2019-04-07 20:52:04 +02:00
Magnus Norddahl
f7069c4ddc
- there is no need to track a transfer family - yet another pointless detour thanks to vulkan-tutorial..
2019-04-04 15:58:48 +02:00
Rachael Alexanderson
ead3695844
Merge branch 'master' of https://github.com/coelckers/gzdoom into vulkan2
...
# Conflicts:
# src/posix/sdl/gl_sysfb.h
2019-03-31 03:49:08 -04:00
Christoph Oelckers
2dc12aef71
- removed the NetUpdate calls from the software renderer.
...
These can cause highly dangerous recursions and execute play code deep inside the renderer and since the hardware renderer does not have these, there is very little point for the software renderer to retain them.
2019-03-31 09:02:11 +02:00
alexey.lysiuk
df8fa90a34
- fixed compilation warnings reported by Clang
...
src/rendering/vulkan/renderer/vk_renderpass.cpp:44:22: warning: comparison of integers of different signs: 'std::__1::vector<FVertexBufferAttribute, std::__1::allocator<FVertexBufferAttribute> >::size_type' (aka 'unsigned long') and 'int' [-Wsign-compare]
src/rendering/vulkan/system/vk_framebuffer.cpp:860:55: warning: format specifies type 'int' but the argument has type 'VkDeviceSize' (aka 'unsigned long long') [-Wformat]
src/rendering/vulkan/system/vk_objects.h:471:23: warning: suggest braces around initialization of subobject [-Wmissing-braces]
2019-03-30 11:15:49 +02:00
Christoph Oelckers
4619fc5622
- removed unused (now always active) gl_trimsprites option from the menu.
2019-03-29 19:10:10 +01:00
Magnus Norddahl
4cc9880f50
Merge remote-tracking branch 'origin/master' into vulkan2
2019-03-26 13:08:59 +01:00
Magnus Norddahl
9f0f659db0
- remove old vid_maxfps implementations as they were garbage anyway and the new one works on all the platforms
2019-03-26 11:10:17 +01:00
Magnus Norddahl
6078428b84
- fix typo in sleep
2019-03-26 10:46:31 +01:00
Magnus Norddahl
9f758b0032
- implement vid_maxfps
2019-03-26 10:40:43 +01:00
Christoph Oelckers
b40983be61
- fixed bad Printf formatter.
2019-03-26 08:48:10 +01:00
usernameak
95bcc46acc
Fixed postprocess shaders with 2 or more textures
2019-03-25 22:12:00 +01:00
Magnus Norddahl
1c9bf262e6
- hook up VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT
2019-03-25 21:30:03 +01:00
Magnus Norddahl
7256af0b32
- fix sort bug
2019-03-25 20:41:53 +01:00
Magnus Norddahl
2d8516b2ca
- make shaderClipDistance optional
2019-03-25 19:44:46 +01:00
Magnus Norddahl
be74675e5e
- change vk_hdr default to false
2019-03-25 01:41:16 +01:00
Magnus Norddahl
c010c5e818
- fully enable vk_hdr as a feature since it works now after the queue family selection was improved
2019-03-25 01:39:27 +01:00
Magnus Norddahl
954b72915c
- improve the queue family selection process to pick first entry in the list over later ones
2019-03-24 18:33:59 +01:00
Magnus Norddahl
0be5cc7d1d
- initialize array
2019-03-24 18:32:36 +01:00
Magnus Norddahl
88355393df
- implement queue family transfers
2019-03-24 18:03:10 +01:00
alexey.lysiuk
90c4e62e67
- removed duplicated expressions
2019-03-24 16:09:01 +02:00
Magnus Norddahl
0c6d0de3ab
- do not use persistent buffers for models as it is a limited resource where each consumes a vkDeviceMemory object
2019-03-23 14:58:37 +01:00
Christoph Oelckers
d500cedf49
- call SetData in VKBuffer::Lock so that the buffer is valid.
...
This allows models to render, but a proper fix should handle mapping of static buffers for real. This workaround just allocates a non-static persistent buffer in CPU memory which is not the most efficient solution here.
2019-03-22 21:14:32 +01:00
Christoph Oelckers
10e62e7b5d
- fixed: VkBuffer::mPersistent was not initialized.
2019-03-22 20:32:59 +01:00
Christoph Oelckers
24a52d65a5
- renamed several data types in the hardware renderer that still had a GL prefix, although they are now generic.
2019-03-22 19:54:19 +01:00
Magnus Norddahl
d03839dfef
- do not signal mRenderFinishedSemaphore if the submitted commands aren't about to be presented
2019-03-22 13:54:13 +01:00
Christoph Oelckers
4d768e5a49
- use a vector instead of a map to store a texture's descriptor sets.
...
In this case a map is total overkill and its poor memory locality will always incur some performance hit. A vector here can only collect a very small amount of entries so the time to search is nearly irrelevant.
2019-03-21 23:41:24 +01:00
Christoph Oelckers
3ad9783d8f
- fixed the hardware rendering precacher not to evict secondary layers of multi-layer textures.
...
It will now check all layers of a material.
Additionally it will also delete all descriptor sets of Vulkan hardware textures before precaching to make sure that nothing here can accidentally still reference a deleted texture.
2019-03-21 21:57:39 +01:00
Rachael Alexanderson
dd4ef010ab
Merge remote-tracking branch 'origin/master' into vulkan2
2019-03-18 04:05:19 -04:00
Magnus Norddahl
7b3350ae1e
- the material descriptor set must be bound again if the pipeline changes and the new shader uses more textures than the old one
2019-03-18 00:38:09 +01:00
Magnus Norddahl
b62d5784af
- bind a texture in all descriptor slots
2019-03-17 23:24:50 +01:00
Magnus Norddahl
ec7a874a61
- implement PrecacheMaterial
2019-03-17 22:41:02 +01:00
Magnus Norddahl
bf85ad4b6a
- remove tracking translation in VkHardwareTexture
...
- only reset the descriptors when recreating the samplers
2019-03-17 22:27:48 +01:00
Magnus Norddahl
2429eba8f6
- remove the old incomplete VkHardwareTexture implementation
2019-03-17 22:10:49 +01:00
Magnus Norddahl
40ee32a0ce
- minor adjustments
2019-03-17 21:14:51 +01:00
Magnus Norddahl
29a30037cb
- delay destruction of VkHardwareTexture resources until current frame has finished rendering
2019-03-17 20:36:08 +01:00
Magnus Norddahl
c00a46043d
- implement ssao
2019-03-16 23:37:38 +01:00
Magnus Norddahl
990d61f41a
- fix compile error
2019-03-16 04:18:35 +01:00
Magnus Norddahl
05f0730c9d
- convert PPStep to PPRenderState
2019-03-15 23:24:31 +01:00
Magnus Norddahl
cce96ca87a
- implement shadow maps
2019-03-15 07:54:34 +01:00
Magnus Norddahl
836938440c
- move swapchain and the presentation related synchronization objects out of VulkanDevice
2019-03-14 23:33:19 +01:00
Magnus Norddahl
9b207b8fe6
- implement save pic
2019-03-14 23:07:52 +01:00
alexey.lysiuk
087353f00b
- fixed dynamic lights flickering with GL3 render path
...
https://forum.zdoom.org/viewtopic.php?t=63755
2019-03-14 14:53:24 +02:00
Magnus Norddahl
2d885d4e4c
- add some support for using the HDR10 ST2084 color space on monitors that support it (unfortunately it doesn't work, and with virtually no documentation either from nvidia or khronos it is hard to say why)
2019-03-14 00:21:53 +01:00
Magnus Norddahl
625cc11ea2
- capture screenshot support
2019-03-13 14:10:13 +01:00
Magnus Norddahl
5d2917bb4f
- implement RenderTextureView
2019-03-13 11:14:42 +01:00
Magnus Norddahl
d78cb959a7
- implement wipe screen copy
2019-03-13 02:23:33 +01:00
Magnus Norddahl
a585a90d81
- VkHardwareTexture needs to BFF with FTexture
2019-03-13 01:15:50 +01:00
Magnus Norddahl
83ee884ffc
- remove dead code
2019-03-13 00:59:39 +01:00
Magnus Norddahl
e5e9924c5e
- remove IShaderProgram and make the old classes an implementation detail of the OpenGL backend. In the long run they should be removed completely as their weird design is mostly an artifact of once having supported OpenGL 2
2019-03-13 00:52:25 +01:00
Magnus Norddahl
903f8b6696
- move the active render target from VkRenderPass to VkRenderState
2019-03-13 00:18:27 +01:00
Magnus Norddahl
dca0b75038
- change the images to be upside down until presentation to increase compatibility with shaders designed for OpenGL
...
- clamp scissors fully to avoid NVidia's awful drivers locking up the entire system if they end up out of bounds
- perform buffer clears as part of the render pass. this puts some restrictions on how FRenderState.Clear can be used
- add an offset uniform to the present shaders so the vulkan target can flip the image during presentation
2019-03-12 23:53:20 +01:00
Magnus Norddahl
0620041228
- remove screenquadscale.vp
2019-03-12 16:24:55 +01:00
Magnus Norddahl
db6a4781c8
- clip scissors (tired of my computer blue screening - thanks NVidia!)
...
- wrap viewport
2019-03-12 16:17:26 +01:00
Magnus Norddahl
aa84f7b3e6
- fix shaders only being loaded from the engine pk3
2019-03-12 15:02:21 +01:00
Rachael Alexanderson
879aae1bd3
Merge branch 'master' of https://github.com/coelckers/gzdoom into vulkan2
2019-03-11 22:07:46 -04:00
Rachael Alexanderson
916f21942c
- Reverse the status bar offset when shearing the viewport in Vulkan - fixes the issue with a black bar at the top of the screen
2019-03-11 22:06:51 -04:00
Christoph Oelckers
22cf35c1c7
- reworked the load/save menu to use the new console font.
...
Parts of this menu suffered badly from lack of screen space to convey the intended information due to the oversized fonts. With the new font this is a lot less problematic (unless using 320x200, of course)
2019-03-11 20:59:43 +01:00
Christoph Oelckers
eb4eb1ac00
- use a wide string for the console input buffer.
...
Since this needs to do cursor positioning calculations it's the one spot in the entire engine where UTF-8 would simply be to messy, especially when having to deal with double wide characters.
2019-03-10 17:54:03 +01:00
Christoph Oelckers
0884057ae1
- use a higher resolution console font with better Unicode support.
2019-03-10 17:54:03 +01:00
Magnus Norddahl
2ca112bef7
- create a helper for doing the PP image transitions
2019-03-10 01:47:55 +01:00
Magnus Norddahl
eb41e5fcd7
- fix transition error when no PP effects are active
2019-03-10 00:47:28 +01:00
Magnus Norddahl
fed0f0dfab
- fix the multisample and image transition validation errors
2019-03-09 23:17:48 +01:00
Magnus Norddahl
5581fbfd93
- fix wrong layout and image format for the swap chain
2019-03-09 22:07:46 +01:00
Magnus Norddahl
ff68d2e651
- hooked up the debug names for objects, which was a bit of a waste of time since the validation layer is brain dead and doesn't use the information in its messages..
2019-03-09 21:34:29 +01:00
alexey.lysiuk
02ed758447
Merge branch 'master' into vulkan2
...
# Conflicts:
# src/posix/cocoa/i_video.mm
2019-03-09 16:45:49 +02:00
Christoph Oelckers
b7d09c95dd
- cleanup of savegame picture code.
...
* re-added screen blends for images from the hardware renderer.
* moved all postprocessing of the image out of the renderers.
* cleaned out a large piece of cruft for handling the palette in the frame buffer class. This was all a remnant of the old paletted backend that no longer exists. Nowadays the screen blend is just a postprocessing effect drawn over the 3D screen, there is no need to maintain any of it as global state anymore.
* since the engine doesn't produce paletted screenshots anymore there is no need to have handling for it in the generation code. This depended on otherwise obsolete information so it got removed along with that information.
2019-03-09 14:48:14 +01:00
Christoph Oelckers
29012a89c6
- for got to save this.
2019-03-09 13:34:22 +01:00
Christoph Oelckers
f9d4ea8424
- missed the part that the blend function was still drawing multiplicative blends.
...
This should be cleanly separated.
2019-03-09 13:12:24 +01:00
Christoph Oelckers
0e4a860c5e
- fixed uninitialized screen flash color for savegame images in the software renderer.
2019-03-09 12:52:07 +01:00
Christoph Oelckers
2fa5a88701
- do not render player sprites to canvases in the hardware renderer.
2019-03-09 12:34:10 +01:00
Christoph Oelckers
0ca7723c0e
- disable player sprite drawing on canvases for the softpoly renderer.
2019-03-09 12:17:57 +01:00
Christoph Oelckers
1a29d39355
- do not render player sprites to canvases in the software renderer.
...
This applies to both savegame images and camera textures.
2019-03-09 12:12:33 +01:00
Christoph Oelckers
99c8ba1288
- use uAddColor instead of uObjectColor2 for the ending color of a special colormap range.
...
Unlike uObjectColor2, this is more global state. uObjectColor2 is part of gradient calculation which may later be offloaded to a secondary buffer which already resulted in only conditionally setting it, resulting in broken special colormap application for the software renderer.
2019-03-09 12:12:33 +01:00
alexey.lysiuk
4ac82c18be
- eliminated last triangle fans usage in Vulkan renderer on macOS
...
Thanks dpJudas
2019-03-09 12:37:45 +02:00
Magnus Norddahl
21c83950a5
- add vk_device and vk_listdevices that will allow selecting a different device on systems where this is desirable
...
- clean up the VulkanDevice class
2019-03-09 10:20:14 +01:00
Magnus Norddahl
389469c604
- pick the first device that supports our required features
2019-03-08 22:53:32 +01:00
Magnus Norddahl
aa1ff58353
- convert triangle fan to triangle list on macOS
2019-03-08 21:34:21 +01:00
Christoph Oelckers
4668d0b1de
- render simple quad-based render hacks as triangle strips.
2019-03-08 17:53:24 +01:00
Christoph Oelckers
f7112786d7
- use triangle strips to render decals.
2019-03-08 17:53:23 +01:00
Magnus Norddahl
ca570f1e78
- move shadowmap uniforms out of FShadowMapShader
2019-03-08 17:45:07 +01:00
alexey.lysiuk
965acde9c0
- added initial support of Vulkan renderer to Cocoa backend
2019-03-08 16:47:02 +02:00
Magnus Norddahl
ca1d8191aa
- enable the binding code for the ssao gbuffers
2019-03-08 03:17:59 +01:00
Magnus Norddahl
c0c2743e89
- add multisample support
...
- fix BlurScene
- create the gbuffers needed by ssao
2019-03-08 02:24:54 +01:00
Magnus Norddahl
e823d5da52
- remove compute and sparse requirements as we use neither
2019-03-07 18:23:04 +01:00
Magnus Norddahl
6db231596f
- hook up postprocessing
2019-03-07 18:05:12 +01:00
Christoph Oelckers
a5c820e1e6
- update volk to the latest version.
...
The main feature that got added is macOS support which should be useful.
2019-03-07 13:40:27 +01:00
alexey.lysiuk
16008e4aa8
- set viewport dimensions each frame in Vulkan framebuffer
...
This fixes visual artifacts when resolution is changed without a level running, i.e. from menu or fullscreen console
2019-03-07 13:24:56 +02:00
Magnus Norddahl
0679b493ec
- hook up the present shader
2019-03-06 22:59:21 +01:00
Magnus Norddahl
30756ec112
- wrong image transition direction
2019-03-06 19:44:48 +01:00
Magnus Norddahl
a857bec846
- implemented VkPostprocess::GetInput
2019-03-06 19:42:02 +01:00
Magnus Norddahl
9d061cbef6
- implement VkPostprocess::GetOutput
2019-03-06 18:33:31 +01:00
Magnus Norddahl
40c14bcd67
- create pipeline images
...
- fix some minor typos
2019-03-06 17:59:11 +01:00
alexey.lysiuk
108ea066f3
- added initial support of Vulkan to SDL backend
...
Removed all platform-specific code from vulkan device
2019-03-06 13:38:45 +02:00
alexey.lysiuk
08d8ea5d31
- fixed compilation with GCC and Clang
...
src/rendering/vulkan/renderer/vk_postprocess.cpp:219:54: error: cannot pass non-trivial object of type 'const FString' to variadic function; expected type from format string was 'char *' [-Wnon-pod-varargs]
2019-03-06 11:39:39 +02:00
Magnus Norddahl
c280153ac2
- implement VkPostprocess::RenderScreenQuad
2019-03-05 23:31:38 +01:00
Magnus Norddahl
fb983186b1
- upload the pp textures
2019-03-05 20:39:27 +01:00
Magnus Norddahl
a07e4601e7
- compile the effect shaders
2019-03-05 19:49:06 +01:00
Magnus Norddahl
b313f91ab0
- add layout location decl to all postprocess shaders
2019-03-05 18:55:31 +01:00
alexey.lysiuk
87441dd0a1
- fixed infinite loop and out-of-bound read in shader patcher
2019-03-05 13:06:39 +02:00
alexey.lysiuk
741d44d263
- fixed compilation with GCC 7+
...
src/rendering/vulkan/renderer/vk_postprocess.h:16:48: error: ‘function’ in namespace ‘std’ does not name a template type
2019-03-05 10:21:39 +02:00
Magnus Norddahl
d65de299e8
- add some classes for managing postprocess and render buffers
2019-03-05 04:59:17 +01:00
Magnus Norddahl
319099fee9
Merge remote-tracking branch 'origin/master' into vulkan2
2019-03-05 03:07:30 +01:00
Magnus Norddahl
e06f8f172d
- use the uniform buffer alignment as returned by the vulkan device
2019-03-05 02:50:30 +01:00
Magnus Norddahl
95116e8580
- fix dynamic buffer offset not getting updated
...
- fix lightbuffer blocksize being hardcoded
2019-03-05 02:06:20 +01:00
Magnus Norddahl
c137e868de
- patch in/out layout declarations for OpenGL
2019-03-05 01:17:23 +01:00
Magnus Norddahl
c70aff99e7
- enable RenderFirstSkyPortal
2019-03-04 15:55:43 +01:00
Magnus Norddahl
32ad6dc887
- draw the weapon
2019-03-04 15:27:54 +01:00
Magnus Norddahl
d23fbb07cd
Merge branch 'vulkan2' of https://github.com/coelckers/gzdoom into vulkan2
2019-03-04 15:24:30 +01:00
Magnus Norddahl
a8a444f010
- missed two places where VK_FORMAT_D24_UNORM_S8_UINT was used
2019-03-04 15:23:49 +01:00
alexey.lysiuk
84a4c9c3a7
- reorderer member initialization in Vulkan objects
...
This is needed to prevent compilation warnings spam with GCC and Clang
While the warning itself is useful, in this case it's rather pointless and annoying
2019-03-04 16:18:37 +02:00
Magnus Norddahl
2532e4bba6
- fall back to VK_FORMAT_D32_SFLOAT_S8_UINT if VK_FORMAT_D24_UNORM_S8_UINT is not supported
2019-03-04 14:47:49 +01:00
Magnus Norddahl
0a6d77a861
- fall back to linear if tiling is not supported by the device
2019-03-04 13:51:58 +01:00
Magnus Norddahl
9861642fcc
- add missing vulkan used features
2019-03-04 13:28:29 +01:00
Christopher Bruns
0fb940632a
Reduce number of blits required in stereo 3D by tracking current eye.
2019-03-04 13:14:41 +01:00
alexey.lysiuk
802d37f377
- fixed compilation of Linux target
...
Base and OpenGL framebuffer classes still require proper splitting
2019-03-04 12:47:00 +02:00
alexey.lysiuk
7efa231e4e
- fixed compilation of macOS target
...
Base and OpenGL framebuffer classes still require proper splitting
2019-03-04 12:46:37 +02:00
alexey.lysiuk
6144f02f67
- initialized all members of VkWin32SurfaceCreateInfoKHR
...
Without such initialization vkCreateWin32SurfaceKHR() crashed inside AMD Vulkan driver
2019-03-04 11:36:38 +02:00
alexey.lysiuk
30c6ae5078
- fixed compilation of 32-bit Windows targets and MSVC 2015
2019-03-04 11:35:12 +02:00
Magnus Norddahl
0e43979c28
- fix colormask alpha typo
2019-03-04 01:54:57 +01:00
Magnus Norddahl
f04522c397
- fix depthstencil attachment not being attached when only stencil tests were enabled
2019-03-04 01:49:27 +01:00
Magnus Norddahl
99c3d72aa0
- fix typos
2019-03-04 01:23:13 +01:00
Magnus Norddahl
ddf21ffd72
- create a descriptor for each texture+sampler configuration in use
2019-03-04 00:28:37 +01:00
Magnus Norddahl
eaf367e876
- add depth bias
2019-03-04 00:14:28 +01:00
Magnus Norddahl
cf49e1ec21
- add depth clamp support
2019-03-03 23:54:13 +01:00
Magnus Norddahl
56afcd210b
- fix: gl_PointSize is required in Vulkan when drawing points
...
- fix: add depthstencil attachment when stencil is active while depth is not
2019-03-03 23:30:36 +01:00
Magnus Norddahl
923fb5c127
- implement the depth and stencil states
2019-03-03 22:25:38 +01:00
Christopher Bruns
52ab4b968f
Remove Quad-buffered from list of VR-modes if we know it won't work.
2019-03-03 16:15:38 +01:00
Magnus Norddahl
d516b2ff7b
- fix typo and add color
2019-03-03 14:40:56 +01:00