mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[vulkan] Clean up alias light buffer
Still wedging, but it seems to be something to do with the matrix buffer.
This commit is contained in:
parent
9f64416846
commit
caa7623a35
1 changed files with 9 additions and 3 deletions
|
@ -105,8 +105,8 @@ Vulkan_DrawAlias (struct entity_s *ent, struct vulkan_ctx_s *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
VkDeviceSize offsets[] = {
|
VkDeviceSize offsets[] = {
|
||||||
ent->pose1 * hdr->poseverts,
|
ent->pose1 * hdr->poseverts * sizeof (aliasvrt_t),
|
||||||
ent->pose2 * hdr->poseverts,
|
ent->pose2 * hdr->poseverts * sizeof (aliasvrt_t),
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
VkBuffer buffers[] = {
|
VkBuffer buffers[] = {
|
||||||
|
@ -289,7 +289,7 @@ Vulkan_Alias_Init (vulkan_ctx_t *ctx)
|
||||||
for (int j = 0; j < ALIAS_BUFFER_INFOS; j++) {
|
for (int j = 0; j < ALIAS_BUFFER_INFOS; j++) {
|
||||||
aframe->bufferInfo[j] = base_buffer_info;
|
aframe->bufferInfo[j] = base_buffer_info;
|
||||||
aframe->descriptors[j] = base_buffer_write;
|
aframe->descriptors[j] = base_buffer_write;
|
||||||
aframe->descriptors[j].dstSet = sets->a[2 * i + j];
|
aframe->descriptors[j].dstSet = sets->a[ALIAS_BUFFER_INFOS*i + j];
|
||||||
aframe->descriptors[j].dstBinding = 0;
|
aframe->descriptors[j].dstBinding = 0;
|
||||||
aframe->descriptors[j].pBufferInfo = &aframe->bufferInfo[j];
|
aframe->descriptors[j].pBufferInfo = &aframe->bufferInfo[j];
|
||||||
}
|
}
|
||||||
|
@ -312,6 +312,12 @@ Vulkan_Alias_Shutdown (struct vulkan_ctx_s *ctx)
|
||||||
qfv_devfuncs_t *dfunc = device->funcs;
|
qfv_devfuncs_t *dfunc = device->funcs;
|
||||||
aliasctx_t *actx = ctx->alias_context;
|
aliasctx_t *actx = ctx->alias_context;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < actx->frames.size; i++) {
|
||||||
|
__auto_type aframe = &actx->frames.a[i];
|
||||||
|
dfunc->vkDestroyBuffer (device->dev, aframe->light_buffer, 0);
|
||||||
|
}
|
||||||
|
dfunc->vkFreeMemory (device->dev, actx->light_memory, 0);
|
||||||
|
|
||||||
dfunc->vkDestroyPipeline (device->dev, actx->pipeline, 0);
|
dfunc->vkDestroyPipeline (device->dev, actx->pipeline, 0);
|
||||||
DARRAY_CLEAR (&actx->frames);
|
DARRAY_CLEAR (&actx->frames);
|
||||||
free (actx);
|
free (actx);
|
||||||
|
|
Loading…
Reference in a new issue