Commit Graph

81 Commits

Author SHA1 Message Date
Artem Kharytoniuk f4ea762141 Fix VUID-vkAcquireNextImageKHR-semaphore-01779
If semaphore is not VK_NULL_HANDLE it must not have any uncompleted
signal or wait operations pending
2024-04-20 14:26:47 +02:00
Artem Kharytoniuk b950deb2dd Use official khronos validation layer 2019-08-30 23:51:57 +02:00
Artem Kharytoniuk c3ea7fed26 Do not specify anisotropy flag when creating a sampler (since anisotropic filtering is not used by the engine).
This fixes validation layer warning.
2018-03-25 00:35:13 +01:00
Artem Kharytoniuk a01a151b2b Updated debug callback signature to match requirements for vulkan function declarations. 2018-01-14 21:17:35 +01:00
Artem Kharytoniuk d213baea81 Enable validation layers through code instead of configuration file. 2018-01-14 17:06:00 +01:00
Artem Kharytoniuk 9b106ec102 Fixed crash in r_debugSurface (tr_main.c). Minor tweaks. 2018-01-13 13:10:59 +01:00
Artem Kharytoniuk abe1efe3aa Updated swapchain image count selection algorithm.
The previous version was correct from Vulkan spec standpoint but due to bug in AMD drivers we can not
safely use surface_caps.minImageCount for the number of images in the swapchain for fullscreen window.
Now we request at least 2 images for immediate and fifo mode.
2017-12-31 13:13:44 +01:00
Artem Kharytoniuk c30a4b867f Vulkan: use VK_EXT_debug_report in debug configuration and break on warnings and errors. 2017-12-30 22:16:17 +01:00
Artem Kharytoniuk c70309c539 DX12: First texture. 2017-11-18 00:46:16 +01:00
Artem Kharytoniuk a32a863d83 DX12: first triangle. 2017-10-22 20:08:54 +02:00
Artem Kharytoniuk 9b01830559 DX12: initial rendering code, just clear the render target. 2017-10-21 22:50:40 +02:00
Artem Kharytoniuk 5434627172 More DX12 initialization code, 2017-10-21 21:08:25 +02:00
Artem Kharytoniuk 22d5bdd053 Added initial D3D12 code. 2017-10-11 11:24:55 +03:00
Artem Kharytoniuk 4f8ad96127 Fixed image layout transition: use pipeline stage mask that is valid for all possible access types. 2017-09-20 22:58:05 +03:00
Artem Kharytoniuk 67bc847715 Removed extern declarations from vk.h that are used only by vk.cpp. 2017-06-07 11:13:09 +03:00
Artem Kharytoniuk b6192ae7ba Minor changes. 2017-05-29 14:55:59 +03:00
Artem Kharytoniuk 7b3917119f Renames: Vk_Resources -> Vk_World, glActive- > gl_active.
Added comments to clarify purpose of Vk_Instance, Vk_World structures.
2017-05-29 14:22:51 +03:00
Artem Kharytoniuk bee5d0a5ea More cleanup. 2017-05-29 12:47:38 +03:00
Artem Kharytoniuk 7bf5958eb7 Code cleanup. 2017-05-28 23:31:36 +03:00
Artem Kharytoniuk cd8a3bb9fa Added vulkan validation layers config. 2017-05-28 13:18:54 +03:00
Artem Kharytoniuk 6079758830 Replaced spaces with tabs (Q3 code style). 2017-05-27 23:36:45 +03:00
Artem Kharytoniuk 83d8d96e76 Support for r_texturebits=16. Reworked image upload code. 2017-05-27 22:56:02 +03:00
Artem Kharytoniuk 3af17877e9 Fixed r_showtris in mirror. 2017-05-25 21:50:55 +03:00
Artem Kharytoniuk 0f3febc632 Introduced vk_bind_geometry/vk_shade_geometry functions. 2017-05-25 21:45:31 +03:00
Artem Kharytoniuk c9ef31f358 Removed vk_log_file related logging. 2017-05-24 20:33:45 +03:00
Artem Kharytoniuk 2d261bb346 Reverted change with clamp_to_border texture addressing mode and use clamp_to_edge.
clamp_to_border produces artifacts in some cases (for example, when we rotate texture coordinates).
2017-05-24 19:45:26 +03:00
Artem Kharytoniuk a9431c5314 Fixed stencil shadows incorrect rendering in some scenarious. It's due to bug in render pass creation code (changeable variable cannot be used in renderpass description). 2017-05-24 19:32:33 +03:00
Artem Kharytoniuk 68723c7076 r_showImages functionality.
Additionally replaced VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE with VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER.
This matches more closely GL_CLAMP mode used by the OpenGL backend.
2017-05-24 14:12:01 +03:00
Artem Kharytoniuk f68cc05242 R_DebugGraphics vulkan implementation (r_debugSurfaces = 1).
Improvements in code related to depth range selection and modelview transformations.
2017-05-23 14:16:32 +03:00
Artem Kharytoniuk 724dd15526 Hyperspace. 2017-05-21 23:22:40 +03:00
Artem Kharytoniuk 12368a634f Vulkan pipelines creation time statistics. 2017-05-21 13:19:41 +03:00
Artem Kharytoniuk e72ab2dbff Enabled fillModeNonSolid feature. 2017-05-18 17:03:53 +03:00
Artem Kharytoniuk aa518c8da8 Debug normals rendering (r_shownormals = 1). 2017-05-18 16:53:06 +03:00
Artem Kharytoniuk 30ad54bfbe Debug triangles rendering (r_showtris = 1). 2017-05-18 13:57:47 +03:00
Artem Kharytoniuk 0f1849da24 Stencil shadows (cg_shadows = 2). 2017-05-17 22:23:43 +03:00
Artem Kharytoniuk 9df7be0314 - In case mailbox present mode is not available try to use immediate mode (we do not want to restrict fps by the monitor update frequency). If both modes are not available then fallback to fifo mode.
- Fixed bug with incorrect vkDestroyInstance function pointer initialization.
- Fixed bug that program called SwapBuffers in vulkan mode.
2017-05-13 22:10:28 +03:00
Artem Kharytoniuk 24fa5f20ab Removed r_measureOverdraw development cvar.
Corresponding functionality does not map well to Vulkan API since depth/stencil formats are considered opaque.
2017-05-12 13:57:14 +03:00
Artem Kharytoniuk deed74d08c Ensure that writes to geometry buffers are visible to device after render pass begins. 2017-05-11 13:05:52 +03:00
Artem Kharytoniuk 626cc415d9 Fixed crash with NULL current_descriptor_sets.
After we create image we consider it becomes bound to current tmu, so we should update current_descriptor_sets in vk_create_image.
2017-05-09 23:35:43 +03:00
Artem Kharytoniuk 4b18f5b2ad Screenshots. 2017-05-09 21:40:20 +03:00
Artem Kharytoniuk 91fb54bc81 Dynamic loading of vulkan dll. 2017-05-08 16:44:13 +03:00
Artem Kharytoniuk 5a5b0b4d2b Vulkan platform specific code reorganization. 2017-05-05 13:55:55 +03:00
Artem Kharytoniuk 8ad279e5b9 Functionality to make proper behavior of r_renderAPI: disables current API, enables selected API. 2017-05-03 19:08:54 +03:00
Artem Kharytoniuk 1d78b91051 Fixed incorrect model positioning in model selection menu.
In general scissor and viewport  rectangles are different: scissor should be inside renderable area, viewport has no such restriction.
2017-05-01 23:35:04 +03:00
Artem Kharytoniuk 9dd144766e Dynamic lights. 2017-04-29 15:44:26 +03:00
Artem Kharytoniuk c50a0f4484 Fog. 2017-04-29 14:44:20 +03:00
Artem Kharytoniuk 73e2be0447 Mirrors and portals. 2017-04-28 19:13:24 +03:00
Artem Kharytoniuk ae98b8b9ed Texture filtering. 2017-04-27 14:53:37 +03:00
Artem Kharytoniuk 4d33fcf925 Texture addressing mode selection (repeat or clamp). 2017-04-27 12:20:06 +03:00
Artem Kharytoniuk d66d7c4363 Image view creation code cleanup. 2017-04-26 19:32:58 +03:00