[vulkan] Make some little cleanups

This commit is contained in:
Bill Currie 2021-01-20 01:23:24 +09:00
parent 2de1c02f61
commit df82cb88ee
4 changed files with 13 additions and 10 deletions

View file

@ -6,10 +6,11 @@
struct cvar_s;
struct vulkan_ctx_s;;
void Vulkan_R_ClearParticles (struct vulkan_ctx_s *ctx);
void Vulkan_R_InitParticles (struct vulkan_ctx_s *ctx);
void Vulkan_ClearParticles (struct vulkan_ctx_s *ctx);
void Vulkan_InitParticles (struct vulkan_ctx_s *ctx);
void Vulkan_r_easter_eggs_f (struct cvar_s *var, struct vulkan_ctx_s *ctx);
void Vulkan_r_particles_style_f (struct cvar_s *var, struct vulkan_ctx_s *ctx);
void Vulkan_Particles_Init (struct vulkan_ctx_s *ctx);
void Vulkan_DrawParticles (struct vulkan_ctx_s *ctx);
#endif//__QF_Vulkan_qf_particles_h

View file

@ -58,7 +58,6 @@
#define BLOCK_SIZE (BLOCK_WIDTH * BLOCK_HEIGHT)
static scrap_t *light_scrap;
static byte *light_data;
static unsigned *blocklights;
static int bl_extents[2];
@ -201,10 +200,8 @@ glsl_R_BuildLightmaps (model_t **models, int num_models)
//FIXME RGB support
if (!light_scrap) {
light_scrap = GLSL_CreateScrap (2048, GL_LUMINANCE, 1);
light_data = malloc (BLOCK_SIZE * MAX_LIGHTMAPS);
} else {
GLSL_ScrapClear (light_scrap);
memset (light_data, 0, BLOCK_SIZE * MAX_LIGHTMAPS);
}
glsl_R_BuildLightMap = R_BuildLightMap_1;

View file

@ -369,7 +369,7 @@ Vulkan_Draw_Init (vulkan_ctx_t *ctx)
create_quad_buffers (ctx);
dctx->scrap = QFV_CreateScrap (device, 2048, tex_rgba);
dctx->stage = QFV_CreateStagingBuffer (device, 4 * 1024 * 1024, 4,
ctx->cmdpool);
ctx->cmdpool);
dctx->sampler = QFV_GetSampler (ctx, "quakepic");
qpic_t *charspic = Draw_Font8x8Pic ();
@ -385,7 +385,7 @@ Vulkan_Draw_Init (vulkan_ctx_t *ctx)
dctx->layout = QFV_GetPipelineLayout (ctx, "twod");
__auto_type layouts = QFV_AllocDescriptorSetLayoutSet (ctx->framebuffers.size, alloca);
__auto_type layouts = QFV_AllocDescriptorSetLayoutSet (frames, alloca);
for (size_t i = 0; i < layouts->size; i++) {
layouts->a[i] = QFV_GetDescriptorSetLayout (ctx, "twod");
}

View file

@ -48,12 +48,12 @@
#include "vid_vulkan.h"
void
Vulkan_R_ClearParticles (struct vulkan_ctx_s *ctx)
Vulkan_ClearParticles (struct vulkan_ctx_s *ctx)
{
}
void
Vulkan_R_InitParticles (struct vulkan_ctx_s *ctx)
Vulkan_InitParticles (struct vulkan_ctx_s *ctx)
{
}
@ -241,7 +241,12 @@ Vulkan_r_easter_eggs_f (cvar_t *var, struct vulkan_ctx_s *ctx)
void
Vulkan_r_particles_style_f (cvar_t *var, struct vulkan_ctx_s *ctx)
{
Vulkan_r_particles_style_f (var, ctx);
Vulkan_r_easter_eggs_f (var, ctx);
}
void
Vulkan_DrawParticles (struct vulkan_ctx_s *ctx)
{
}
void