mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 08:41:11 +00:00
[vulkan] Break render pass parsing away from swapchain
This allows a single render pass description to be used for both on-screen and off-screen targets. While Vulkan does allow a VkRenderPass to be used with any compatible frame buffer, and vkparse caches a VkRenderPass created from the same description, this allows the same description to be used for a compatible off-screen target without any dependence on the swapchain. However, there is a problem in the caching when it comes to targeting outputs with different formats.
This commit is contained in:
parent
9b11992de4
commit
bbbdc41af3
5 changed files with 66 additions and 111 deletions
|
@ -9,6 +9,13 @@
|
|||
#include "QF/darray.h"
|
||||
#include "QF/simd/types.h"
|
||||
|
||||
//FIXME name
|
||||
typedef struct qfv_output_s {
|
||||
VkExtent2D extent;
|
||||
VkImageView view;
|
||||
VkFormat format;
|
||||
} qfv_output_t;
|
||||
|
||||
typedef struct vulkan_frame_s {
|
||||
VkFramebuffer framebuffer;
|
||||
VkFence fence;
|
||||
|
@ -89,6 +96,9 @@ typedef struct vulkan_ctx_s {
|
|||
int window_width;
|
||||
int window_height;
|
||||
|
||||
//FIXME not sure I like it being here (also, type name)
|
||||
qfv_output_t output;
|
||||
|
||||
#define EXPORTED_VULKAN_FUNCTION(fname) PFN_##fname fname;
|
||||
#define GLOBAL_LEVEL_VULKAN_FUNCTION(fname) PFN_##fname fname;
|
||||
#include "QF/Vulkan/funclist.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue