#include "shared/shared.h"
#include "vkpt.h"
#include "vk_util.h"
#include "shader/vertex_buffer.h"
#include "../../client/client.h"
#include <assert.h>
Go to the source code of this file.
Classes | |
struct | accel_bottom_match_info_s |
struct | accel_top_match_info_s |
struct | QvkGeometryInstance_s |
Macros | |
#define | RAY_GEN_ACCEL_STRUCTURE_BINDING_IDX 0 |
#define | RAY_GEN_PARTICLE_COLOR_BUFFER_BINDING_IDX 1 |
#define | RAY_GEN_BEAM_COLOR_BUFFER_BINDING_IDX 2 |
#define | RAY_GEN_SPRITE_INFO_BUFFER_BINDING_IDX 3 |
#define | SIZE_SCRATCH_BUFFER (1 << 24) |
#define | INSTANCE_MAX_NUM 12 |
#define | MEM_BARRIER_BUILD_ACCEL(cmd_buf, ...) |
#define | DYNAMIC_GEOMETRY_BLOAT_FACTOR 2 |
#define | BARRIER_COMPUTE(cmd_buf, img) |
Typedefs | |
typedef struct accel_bottom_match_info_s | accel_bottom_match_info_t |
typedef struct accel_top_match_info_s | accel_top_match_info_t |
typedef struct QvkGeometryInstance_s | QvkGeometryInstance_t |
Functions | |
VkResult | vkpt_pt_init () |
VkResult | vkpt_pt_update_descripter_set_bindings (int idx) |
static size_t | get_scratch_buffer_size (VkAccelerationStructureNV ac) |
static VkGeometryNV | get_geometry (VkBuffer buffer, size_t offset, uint32_t num_vertices) |
VkResult | vkpt_pt_destroy_static () |
VkResult | vkpt_pt_destroy_dynamic (int idx) |
VkResult | vkpt_pt_destroy_transparent_models (int idx) |
VkResult | vkpt_pt_destroy_viewer_models (int idx) |
VkResult | vkpt_pt_destroy_viewer_weapon (int idx) |
VkResult | vkpt_pt_destroy_explosions (int idx) |
static int | accel_matches (accel_bottom_match_info_t *match, VkGeometryNV *geometry) |
static VkResult | vkpt_pt_create_accel_bottom (VkBuffer vertex_buffer, size_t buffer_offset, int num_vertices, VkAccelerationStructureNV *accel, accel_bottom_match_info_t *match, VkDeviceMemory *mem_accel, VkCommandBuffer cmd_buf, int fast_build) |
VkResult | vkpt_pt_create_static (VkBuffer vertex_buffer, size_t buffer_offset, int num_vertices, int num_vertices_transparent, int num_vertices_sky, int num_vertices_custom_sky) |
static VkResult | vkpt_pt_create_dynamic (VkCommandBuffer cmd_buf, int idx, VkBuffer vertex_buffer, size_t buffer_offset, int num_vertices) |
static VkResult | vkpt_pt_create_transparent_models (VkCommandBuffer cmd_buf, int idx, VkBuffer vertex_buffer, size_t buffer_offset, int num_vertices, int vertex_offset) |
static VkResult | vkpt_pt_create_viewer_models (VkCommandBuffer cmd_buf, int idx, VkBuffer vertex_buffer, size_t buffer_offset, int num_vertices, int vertex_offset) |
static VkResult | vkpt_pt_create_viewer_weapon (VkCommandBuffer cmd_buf, int idx, VkBuffer vertex_buffer, size_t buffer_offset, int num_vertices, int vertex_offset) |
static VkResult | vkpt_pt_create_explosions (VkCommandBuffer cmd_buf, int idx, VkBuffer vertex_buffer, size_t buffer_offset, int num_vertices, int vertex_offset) |
VkResult | vkpt_pt_create_all_dynamic (VkCommandBuffer cmd_buf, int idx, VkBuffer vertex_buffer, const EntityUploadInfo *upload_info) |
void | vkpt_pt_destroy_toplevel (int idx) |
static void | append_blas (QvkGeometryInstance_t *instances, int *num_instances, VkAccelerationStructureNV blas, int instance_id, int mask, int flags, int sbt_offset) |
VkResult | vkpt_pt_create_toplevel (VkCommandBuffer cmd_buf, int idx, qboolean include_world, qboolean weapon_left_handed) |
static void | setup_rt_pipeline (VkCommandBuffer cmd_buf) |
VkResult | vkpt_pt_trace_primary_rays (VkCommandBuffer cmd_buf) |
VkResult | vkpt_pt_trace_reflections (VkCommandBuffer cmd_buf, int bounce) |
VkResult | vkpt_pt_trace_lighting (VkCommandBuffer cmd_buf, float num_bounce_rays) |
VkResult | vkpt_pt_destroy () |
VkResult | vkpt_pt_create_pipelines () |
VkResult | vkpt_pt_destroy_pipelines () |
#define BARRIER_COMPUTE | ( | cmd_buf, | |
img | |||
) |
Definition at line 971 of file path_tracer.c.
#define DYNAMIC_GEOMETRY_BLOAT_FACTOR 2 |
Definition at line 461 of file path_tracer.c.
#define INSTANCE_MAX_NUM 12 |
Definition at line 35 of file path_tracer.c.
#define MEM_BARRIER_BUILD_ACCEL | ( | cmd_buf, | |
... | |||
) |
Definition at line 118 of file path_tracer.c.
#define RAY_GEN_ACCEL_STRUCTURE_BINDING_IDX 0 |
Definition at line 28 of file path_tracer.c.
#define RAY_GEN_BEAM_COLOR_BUFFER_BINDING_IDX 2 |
Definition at line 30 of file path_tracer.c.
#define RAY_GEN_PARTICLE_COLOR_BUFFER_BINDING_IDX 1 |
Definition at line 29 of file path_tracer.c.
#define RAY_GEN_SPRITE_INFO_BUFFER_BINDING_IDX 3 |
Definition at line 31 of file path_tracer.c.
#define SIZE_SCRATCH_BUFFER (1 << 24) |
Definition at line 33 of file path_tracer.c.
typedef struct accel_bottom_match_info_s accel_bottom_match_info_t |
typedef struct accel_top_match_info_s accel_top_match_info_t |
typedef struct QvkGeometryInstance_s QvkGeometryInstance_t |
|
static |
|
static |
Definition at line 829 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel().
|
inlinestatic |
|
static |
Definition at line 306 of file path_tracer.c.
Referenced by vkpt_pt_create_accel_bottom(), and vkpt_pt_create_toplevel().
|
static |
Definition at line 990 of file path_tracer.c.
Referenced by vkpt_pt_trace_lighting(), vkpt_pt_trace_primary_rays(), and vkpt_pt_trace_reflections().
|
static |
Definition at line 464 of file path_tracer.c.
Referenced by vkpt_pt_create_dynamic(), vkpt_pt_create_explosions(), vkpt_pt_create_static(), vkpt_pt_create_transparent_models(), vkpt_pt_create_viewer_models(), and vkpt_pt_create_viewer_weapon().
VkResult vkpt_pt_create_all_dynamic | ( | VkCommandBuffer | cmd_buf, |
int | idx, | ||
VkBuffer | vertex_buffer, | ||
const EntityUploadInfo * | upload_info | ||
) |
|
static |
|
static |
VkResult vkpt_pt_create_pipelines | ( | ) |
Definition at line 1216 of file path_tracer.c.
VkResult vkpt_pt_create_static | ( | VkBuffer | vertex_buffer, |
size_t | buffer_offset, | ||
int | num_vertices, | ||
int | num_vertices_transparent, | ||
int | num_vertices_sky, | ||
int | num_vertices_custom_sky | ||
) |
Definition at line 574 of file path_tracer.c.
Referenced by R_BeginRegistration_RTX().
VkResult vkpt_pt_create_toplevel | ( | VkCommandBuffer | cmd_buf, |
int | idx, | ||
qboolean | include_world, | ||
qboolean | weapon_left_handed | ||
) |
Definition at line 852 of file path_tracer.c.
Referenced by R_RenderFrame_RTX().
|
static |
|
static |
|
static |
VkResult vkpt_pt_destroy | ( | ) |
Definition at line 1196 of file path_tracer.c.
VkResult vkpt_pt_destroy_dynamic | ( | int | idx | ) |
VkResult vkpt_pt_destroy_explosions | ( | int | idx | ) |
VkResult vkpt_pt_destroy_pipelines | ( | ) |
Definition at line 1410 of file path_tracer.c.
VkResult vkpt_pt_destroy_static | ( | ) |
Definition at line 345 of file path_tracer.c.
Referenced by R_BeginRegistration_RTX(), and vkpt_pt_destroy().
Definition at line 815 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), and vkpt_pt_destroy().
VkResult vkpt_pt_destroy_transparent_models | ( | int | idx | ) |
VkResult vkpt_pt_destroy_viewer_models | ( | int | idx | ) |
VkResult vkpt_pt_destroy_viewer_weapon | ( | int | idx | ) |
VkResult vkpt_pt_init | ( | ) |
Definition at line 134 of file path_tracer.c.
VkResult vkpt_pt_trace_lighting | ( | VkCommandBuffer | cmd_buf, |
float | num_bounce_rays | ||
) |
Definition at line 1105 of file path_tracer.c.
Referenced by R_RenderFrame_RTX().
VkResult vkpt_pt_trace_primary_rays | ( | VkCommandBuffer | cmd_buf | ) |
Definition at line 1009 of file path_tracer.c.
Referenced by R_RenderFrame_RTX().
VkResult vkpt_pt_trace_reflections | ( | VkCommandBuffer | cmd_buf, |
int | bounce | ||
) |
Definition at line 1063 of file path_tracer.c.
Referenced by R_RenderFrame_RTX().
VkResult vkpt_pt_update_descripter_set_bindings | ( | int | idx | ) |
|
static |
Definition at line 60 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), vkpt_pt_create_toplevel(), and vkpt_pt_destroy_static().
|
static |
Definition at line 70 of file path_tracer.c.
Referenced by vkpt_pt_create_dynamic(), vkpt_pt_create_toplevel(), and vkpt_pt_destroy_dynamic().
|
static |
Definition at line 71 of file path_tracer.c.
Referenced by vkpt_pt_create_dynamic().
|
static |
Definition at line 78 of file path_tracer.c.
Referenced by vkpt_pt_create_explosions(), vkpt_pt_create_toplevel(), and vkpt_pt_destroy_explosions().
|
static |
Definition at line 79 of file path_tracer.c.
Referenced by vkpt_pt_create_explosions().
|
static |
Definition at line 59 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), vkpt_pt_create_toplevel(), and vkpt_pt_destroy_static().
|
static |
Definition at line 57 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), vkpt_pt_create_toplevel(), and vkpt_pt_destroy_static().
|
static |
Definition at line 80 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), vkpt_pt_destroy_toplevel(), and vkpt_pt_update_descripter_set_bindings().
|
static |
Definition at line 81 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), and vkpt_pt_destroy_toplevel().
|
static |
Definition at line 58 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), vkpt_pt_create_toplevel(), and vkpt_pt_destroy_static().
|
static |
Definition at line 72 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), vkpt_pt_create_transparent_models(), and vkpt_pt_destroy_transparent_models().
|
static |
Definition at line 73 of file path_tracer.c.
Referenced by vkpt_pt_create_transparent_models().
|
static |
Definition at line 74 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), vkpt_pt_create_viewer_models(), and vkpt_pt_destroy_viewer_models().
|
static |
Definition at line 75 of file path_tracer.c.
Referenced by vkpt_pt_create_viewer_models().
|
static |
Definition at line 76 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), vkpt_pt_create_viewer_weapon(), and vkpt_pt_destroy_viewer_weapon().
|
static |
Definition at line 77 of file path_tracer.c.
Referenced by vkpt_pt_create_viewer_weapon().
|
static |
Definition at line 54 of file path_tracer.c.
Referenced by vkpt_pt_create_accel_bottom(), vkpt_pt_create_toplevel(), vkpt_pt_destroy(), and vkpt_pt_init().
|
static |
Definition at line 56 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), vkpt_pt_destroy(), and vkpt_pt_init().
|
static |
Definition at line 93 of file path_tracer.c.
Referenced by vkpt_pt_create_pipelines(), vkpt_pt_destroy_pipelines(), vkpt_pt_trace_lighting(), vkpt_pt_trace_primary_rays(), and vkpt_pt_trace_reflections().
|
static |
Definition at line 63 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), and vkpt_pt_create_toplevel().
cvar_t* cvar_pt_caustics |
Definition at line 52 of file main.c.
Referenced by R_Init_RTX(), and vkpt_pt_trace_lighting().
cvar_t* cvar_pt_enable_beams = NULL |
Definition at line 102 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), and vkpt_pt_init().
cvar_t* cvar_pt_enable_particles = NULL |
Definition at line 101 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), and vkpt_pt_init().
cvar_t* cvar_pt_enable_sprites = NULL |
Definition at line 103 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), and vkpt_pt_init().
cvar_t* cvar_pt_reflect_refract |
Referenced by evaluate_reference_mode().
|
static |
Definition at line 69 of file path_tracer.c.
Referenced by vkpt_pt_create_explosions(), and vkpt_pt_create_toplevel().
|
static |
Definition at line 68 of file path_tracer.c.
Referenced by vkpt_pt_create_explosions(), and vkpt_pt_create_toplevel().
|
static |
Definition at line 85 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), and vkpt_pt_destroy_static().
|
static |
Definition at line 87 of file path_tracer.c.
Referenced by vkpt_pt_create_dynamic(), and vkpt_pt_destroy_dynamic().
|
static |
Definition at line 91 of file path_tracer.c.
Referenced by vkpt_pt_create_explosions(), and vkpt_pt_destroy_explosions().
|
static |
Definition at line 84 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), and vkpt_pt_destroy_static().
|
static |
Definition at line 82 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), and vkpt_pt_destroy_static().
|
static |
Definition at line 86 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), and vkpt_pt_destroy_toplevel().
|
static |
Definition at line 83 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), and vkpt_pt_destroy_static().
|
static |
Definition at line 88 of file path_tracer.c.
Referenced by vkpt_pt_create_transparent_models(), and vkpt_pt_destroy_transparent_models().
|
static |
Definition at line 89 of file path_tracer.c.
Referenced by vkpt_pt_create_viewer_models(), and vkpt_pt_destroy_viewer_models().
|
static |
Definition at line 90 of file path_tracer.c.
Referenced by vkpt_pt_create_viewer_weapon(), and vkpt_pt_destroy_viewer_weapon().
|
static |
Definition at line 95 of file path_tracer.c.
Referenced by vkpt_pt_destroy(), and vkpt_pt_init().
|
static |
Definition at line 96 of file path_tracer.c.
Referenced by setup_rt_pipeline(), vkpt_pt_init(), and vkpt_pt_update_descripter_set_bindings().
|
static |
Definition at line 97 of file path_tracer.c.
Referenced by vkpt_pt_destroy(), and vkpt_pt_init().
|
static |
Definition at line 99 of file path_tracer.c.
Referenced by setup_rt_pipeline(), vkpt_pt_create_pipelines(), and vkpt_pt_destroy_pipelines().
|
static |
Definition at line 98 of file path_tracer.c.
Referenced by setup_rt_pipeline(), vkpt_pt_create_pipelines(), vkpt_pt_destroy(), vkpt_pt_init(), vkpt_pt_trace_lighting(), vkpt_pt_trace_primary_rays(), and vkpt_pt_trace_reflections().
|
static |
Definition at line 37 of file path_tracer.c.
Referenced by vkpt_pt_create_pipelines(), vkpt_pt_init(), vkpt_pt_trace_lighting(), vkpt_pt_trace_primary_rays(), and vkpt_pt_trace_reflections().
|
static |
Definition at line 55 of file path_tracer.c.
Referenced by vkpt_pt_create_accel_bottom(), vkpt_pt_create_all_dynamic(), and vkpt_pt_create_static().
|
static |
Definition at line 62 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), and vkpt_pt_create_toplevel().
|
static |
Definition at line 64 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), and vkpt_pt_create_transparent_models().
|
static |
Definition at line 65 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), and vkpt_pt_create_transparent_models().
|
static |
Definition at line 61 of file path_tracer.c.
Referenced by vkpt_pt_create_static(), and vkpt_pt_create_toplevel().
|
static |
Definition at line 66 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), and vkpt_pt_create_viewer_models().
|
static |
Definition at line 67 of file path_tracer.c.
Referenced by vkpt_pt_create_toplevel(), and vkpt_pt_create_viewer_weapon().