Quake II RTX doxygen  1.0 dev
global_textures.h File Reference
#include "constants.h"

Go to the source code of this file.

Macros

#define IMG_WIDTH   (qvk.extent_screen_images.width)
 
#define IMG_HEIGHT   (qvk.extent_screen_images.height)
 
#define IMG_WIDTH_MGPU   (qvk.extent_screen_images.width / qvk.device_count)
 
#define IMG_WIDTH_GRAD   ((qvk.extent_screen_images.width + GRAD_DWN - 1) / GRAD_DWN)
 
#define IMG_HEIGHT_GRAD   ((qvk.extent_screen_images.height + GRAD_DWN - 1) / GRAD_DWN)
 
#define IMG_WIDTH_GRAD_MGPU   ((qvk.extent_screen_images.width + GRAD_DWN - 1) / GRAD_DWN / qvk.device_count)
 
#define LIST_IMAGES
 
#define LIST_IMAGES_A_B
 
#define LIST_IMAGES_B_A
 
#define NUM_IMAGES
 
#define GLOBAL_TEXTURES_TEX_ARR_BINDING_IDX   0
 
#define BINDING_OFFSET_IMAGES   (1 + GLOBAL_TEXTURES_TEX_ARR_BINDING_IDX)
 
#define BINDING_OFFSET_TEXTURES   (BINDING_OFFSET_IMAGES + NUM_IMAGES)
 
#define BINDING_OFFSET_BLUE_NOISE   (BINDING_OFFSET_TEXTURES + NUM_IMAGES)
 
#define BINDING_OFFSET_ENVMAP   (BINDING_OFFSET_BLUE_NOISE + 1)
 
#define BINDING_OFFSET_PHYSICAL_SKY   (BINDING_OFFSET_ENVMAP + 1)
 
#define BINDING_OFFSET_PHYSICAL_SKY_IMG   (BINDING_OFFSET_PHYSICAL_SKY + 1)
 
#define BINDING_OFFSET_SKY_TRANSMITTANCE   (BINDING_OFFSET_PHYSICAL_SKY_IMG + 1)
 
#define BINDING_OFFSET_SKY_SCATTERING   (BINDING_OFFSET_SKY_TRANSMITTANCE + 1)
 
#define BINDING_OFFSET_SKY_IRRADIANCE   (BINDING_OFFSET_SKY_SCATTERING + 1)
 
#define BINDING_OFFSET_SKY_CLOUDS   (BINDING_OFFSET_SKY_IRRADIANCE + 1)
 
#define BINDING_OFFSET_TERRAIN_ALBEDO   (BINDING_OFFSET_SKY_CLOUDS + 1)
 
#define BINDING_OFFSET_TERRAIN_NORMALS   (BINDING_OFFSET_TERRAIN_ALBEDO + 1)
 
#define BINDING_OFFSET_TERRAIN_DEPTH   (BINDING_OFFSET_TERRAIN_NORMALS + 1)
 
#define BINDING_OFFSET_TERRAIN_SHADOWMAP   (BINDING_OFFSET_TERRAIN_DEPTH + 1)
 
#define IMG_DO(_name, ...)   VKPT_IMG_##_name,
 

Typedefs

typedef char compile_time_check_num_images[(NUM_IMAGES==NUM_VKPT_IMAGES) *2-1]
 

Enumerations

enum  QVK_IMAGES { NUM_VKPT_IMAGES }
 

Macro Definition Documentation

◆ BINDING_OFFSET_BLUE_NOISE

#define BINDING_OFFSET_BLUE_NOISE   (BINDING_OFFSET_TEXTURES + NUM_IMAGES)

Definition at line 127 of file global_textures.h.

◆ BINDING_OFFSET_ENVMAP

#define BINDING_OFFSET_ENVMAP   (BINDING_OFFSET_BLUE_NOISE + 1)

Definition at line 128 of file global_textures.h.

◆ BINDING_OFFSET_IMAGES

#define BINDING_OFFSET_IMAGES   (1 + GLOBAL_TEXTURES_TEX_ARR_BINDING_IDX)

Definition at line 125 of file global_textures.h.

◆ BINDING_OFFSET_PHYSICAL_SKY

#define BINDING_OFFSET_PHYSICAL_SKY   (BINDING_OFFSET_ENVMAP + 1)

Definition at line 129 of file global_textures.h.

◆ BINDING_OFFSET_PHYSICAL_SKY_IMG

#define BINDING_OFFSET_PHYSICAL_SKY_IMG   (BINDING_OFFSET_PHYSICAL_SKY + 1)

Definition at line 130 of file global_textures.h.

◆ BINDING_OFFSET_SKY_CLOUDS

#define BINDING_OFFSET_SKY_CLOUDS   (BINDING_OFFSET_SKY_IRRADIANCE + 1)

Definition at line 134 of file global_textures.h.

◆ BINDING_OFFSET_SKY_IRRADIANCE

#define BINDING_OFFSET_SKY_IRRADIANCE   (BINDING_OFFSET_SKY_SCATTERING + 1)

Definition at line 133 of file global_textures.h.

◆ BINDING_OFFSET_SKY_SCATTERING

#define BINDING_OFFSET_SKY_SCATTERING   (BINDING_OFFSET_SKY_TRANSMITTANCE + 1)

Definition at line 132 of file global_textures.h.

◆ BINDING_OFFSET_SKY_TRANSMITTANCE

#define BINDING_OFFSET_SKY_TRANSMITTANCE   (BINDING_OFFSET_PHYSICAL_SKY_IMG + 1)

Definition at line 131 of file global_textures.h.

◆ BINDING_OFFSET_TERRAIN_ALBEDO

#define BINDING_OFFSET_TERRAIN_ALBEDO   (BINDING_OFFSET_SKY_CLOUDS + 1)

Definition at line 135 of file global_textures.h.

◆ BINDING_OFFSET_TERRAIN_DEPTH

#define BINDING_OFFSET_TERRAIN_DEPTH   (BINDING_OFFSET_TERRAIN_NORMALS + 1)

Definition at line 137 of file global_textures.h.

◆ BINDING_OFFSET_TERRAIN_NORMALS

#define BINDING_OFFSET_TERRAIN_NORMALS   (BINDING_OFFSET_TERRAIN_ALBEDO + 1)

Definition at line 136 of file global_textures.h.

◆ BINDING_OFFSET_TERRAIN_SHADOWMAP

#define BINDING_OFFSET_TERRAIN_SHADOWMAP   (BINDING_OFFSET_TERRAIN_DEPTH + 1)

Definition at line 138 of file global_textures.h.

◆ BINDING_OFFSET_TEXTURES

#define BINDING_OFFSET_TEXTURES   (BINDING_OFFSET_IMAGES + NUM_IMAGES)

Definition at line 126 of file global_textures.h.

◆ GLOBAL_TEXTURES_TEX_ARR_BINDING_IDX

#define GLOBAL_TEXTURES_TEX_ARR_BINDING_IDX   0

Definition at line 124 of file global_textures.h.

◆ IMG_DO

#define IMG_DO (   _name,
  ... 
)    VKPT_IMG_##_name,

Definition at line 152 of file global_textures.h.

◆ IMG_HEIGHT

#define IMG_HEIGHT   (qvk.extent_screen_images.height)

Definition at line 26 of file global_textures.h.

◆ IMG_HEIGHT_GRAD

#define IMG_HEIGHT_GRAD   ((qvk.extent_screen_images.height + GRAD_DWN - 1) / GRAD_DWN)

Definition at line 30 of file global_textures.h.

◆ IMG_WIDTH

#define IMG_WIDTH   (qvk.extent_screen_images.width)

Definition at line 25 of file global_textures.h.

◆ IMG_WIDTH_GRAD

#define IMG_WIDTH_GRAD   ((qvk.extent_screen_images.width + GRAD_DWN - 1) / GRAD_DWN)

Definition at line 29 of file global_textures.h.

◆ IMG_WIDTH_GRAD_MGPU

#define IMG_WIDTH_GRAD_MGPU   ((qvk.extent_screen_images.width + GRAD_DWN - 1) / GRAD_DWN / qvk.device_count)

Definition at line 31 of file global_textures.h.

◆ IMG_WIDTH_MGPU

#define IMG_WIDTH_MGPU   (qvk.extent_screen_images.width / qvk.device_count)

Definition at line 27 of file global_textures.h.

◆ LIST_IMAGES

#define LIST_IMAGES

Definition at line 34 of file global_textures.h.

◆ LIST_IMAGES_A_B

#define LIST_IMAGES_A_B
Value:
IMG_DO(PT_VIEW_DEPTH_A, 45, R32_SFLOAT, r32f, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(PT_VIEW_DEPTH_B, 46, R32_SFLOAT, r32f, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(PT_NORMAL_A, 47, R32_UINT, r32ui, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(PT_NORMAL_B, 48, R32_UINT, r32ui, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_FILTERED_SPEC_A, 49, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_FILTERED_SPEC_B, 50, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_MOMENTS_HF_A, 51, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_MOMENTS_HF_B, 52, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_TAA_A, 53, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(ASVGF_TAA_B, 54, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(ASVGF_RNG_SEED_A, 55, R32_UINT, r32ui, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(ASVGF_RNG_SEED_B, 56, R32_UINT, r32ui, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_COLOR_LF_SH_A, 57, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_COLOR_LF_SH_B, 58, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_COLOR_LF_COCG_A,59, R16G16_SFLOAT, rg16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_COLOR_LF_COCG_B,60, R16G16_SFLOAT, rg16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_GRAD_SMPL_POS_A, 61, R32_UINT, r32ui, IMG_WIDTH_GRAD_MGPU, IMG_HEIGHT_GRAD) \
IMG_DO(ASVGF_GRAD_SMPL_POS_B, 62, R32_UINT, r32ui, IMG_WIDTH_GRAD_MGPU, IMG_HEIGHT_GRAD) \

Definition at line 81 of file global_textures.h.

◆ LIST_IMAGES_B_A

#define LIST_IMAGES_B_A
Value:
IMG_DO(PT_VIEW_DEPTH_B, 45, R32_SFLOAT, r32f, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(PT_VIEW_DEPTH_A, 46, R32_SFLOAT, r32f, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(PT_NORMAL_B, 47, R32_UINT, r32ui, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(PT_NORMAL_A, 48, R32_UINT, r32ui, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_FILTERED_SPEC_B, 49, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_FILTERED_SPEC_A, 50, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_MOMENTS_HF_B, 51, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_MOMENTS_HF_A, 52, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_TAA_B, 53, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(ASVGF_TAA_A, 54, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(ASVGF_RNG_SEED_B, 55, R32_UINT, r32ui, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(ASVGF_RNG_SEED_A, 56, R32_UINT, r32ui, IMG_WIDTH, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_COLOR_LF_SH_B, 57, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_COLOR_LF_SH_A, 58, R16G16B16A16_SFLOAT, rgba16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_COLOR_LF_COCG_B,59, R16G16_SFLOAT, rg16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_HIST_COLOR_LF_COCG_A,60, R16G16_SFLOAT, rg16f, IMG_WIDTH_MGPU, IMG_HEIGHT ) \
IMG_DO(ASVGF_GRAD_SMPL_POS_B, 61, R32_UINT, r32ui, IMG_WIDTH_GRAD_MGPU, IMG_HEIGHT_GRAD) \
IMG_DO(ASVGF_GRAD_SMPL_POS_A, 62, R32_UINT, r32ui, IMG_WIDTH_GRAD_MGPU, IMG_HEIGHT_GRAD) \

Definition at line 101 of file global_textures.h.

◆ NUM_IMAGES

#define NUM_IMAGES
Value:
63 /* this really sucks but I don't know how to fix it
counting with enum does not work in GLSL */

Definition at line 121 of file global_textures.h.

Typedef Documentation

◆ compile_time_check_num_images

typedef char compile_time_check_num_images[(NUM_IMAGES==NUM_VKPT_IMAGES) *2-1]

Definition at line 160 of file global_textures.h.

Enumeration Type Documentation

◆ QVK_IMAGES

enum QVK_IMAGES
Enumerator
NUM_VKPT_IMAGES 

Definition at line 151 of file global_textures.h.

152  {
153 #define IMG_DO(_name, ...) \
154  VKPT_IMG_##_name,
157 #undef IMG_DO
IMG_WIDTH_GRAD_MGPU
#define IMG_WIDTH_GRAD_MGPU
Definition: global_textures.h:31
LIST_IMAGES
#define LIST_IMAGES
Definition: global_textures.h:34
IMG_DO
#define IMG_DO(_name,...)
Definition: global_textures.h:152
IMG_HEIGHT_GRAD
#define IMG_HEIGHT_GRAD
Definition: global_textures.h:30
IMG_WIDTH
#define IMG_WIDTH
Definition: global_textures.h:25
IMG_WIDTH_MGPU
#define IMG_WIDTH_MGPU
Definition: global_textures.h:27
IMG_HEIGHT
#define IMG_HEIGHT
Definition: global_textures.h:26
NUM_VKPT_IMAGES
@ NUM_VKPT_IMAGES
Definition: global_textures.h:157
LIST_IMAGES_A_B
#define LIST_IMAGES_A_B
Definition: global_textures.h:81