mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-05 00:11:05 +01:00
4bd62ccbc0
Consolidate VkCommandBuffer management into a single entity. (somewhat done for framectl, not done for staging) Make sure that we pass enough metadata to be able to timestamp scopes in cmdbuf. It does compile, but it won't work: not all init code paths are used. Also, there are many changes, so other failure modes are totally possible.
37 lines
1022 B
C
37 lines
1022 B
C
#pragma once
|
|
#include "vk_core.h"
|
|
|
|
#include "xash3d_types.h"
|
|
|
|
#define MAX_CONCURRENT_FRAMES 2
|
|
|
|
// TODO most of the things below should not be global. Instead, they should be passed as an argument/context to all the drawing functions that want this info
|
|
typedef struct vk_framectl_s {
|
|
// TODO only used from 2d and r_speeds, remove
|
|
uint32_t width, height;
|
|
|
|
// TODO move these into renderer and 2d
|
|
struct {
|
|
// Used when the entire rendering is traditional triangle rasterization
|
|
// Discards and clears color buffer
|
|
VkRenderPass raster;
|
|
|
|
// Used for 2D overlay rendering after ray tracing pass
|
|
// Preserves color buffer contents
|
|
VkRenderPass after_ray_tracing;
|
|
} render_pass;
|
|
|
|
qboolean rtx_enabled;
|
|
} vk_framectl_t;
|
|
|
|
extern vk_framectl_t vk_frame;
|
|
|
|
qboolean VK_FrameCtlInit( void );
|
|
void VK_FrameCtlShutdown( void );
|
|
|
|
void R_BeginFrame( qboolean clearScene );
|
|
void VK_RenderFrame( const struct ref_viewpass_s *rvp );
|
|
void R_EndFrame( void );
|
|
|
|
qboolean VID_ScreenShot( const char *filename, int shot_type );
|