From d857bdea7786c018404bed312a0f60233e324600 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 13 Dec 2021 10:39:01 +0900 Subject: [PATCH] [vulkan] Fix a typo and gcc purity warning --- include/QF/Vulkan/qf_matrices.h | 3 ++- libs/video/renderer/vulkan/vulkan_alias.c | 2 +- libs/video/renderer/vulkan/vulkan_bsp.c | 2 +- libs/video/renderer/vulkan/vulkan_draw.c | 2 +- libs/video/renderer/vulkan/vulkan_matrices.c | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/QF/Vulkan/qf_matrices.h b/include/QF/Vulkan/qf_matrices.h index 6abbdde61..5b6537e28 100644 --- a/include/QF/Vulkan/qf_matrices.h +++ b/include/QF/Vulkan/qf_matrices.h @@ -82,6 +82,7 @@ void Vulkan_Matrix_Init (struct vulkan_ctx_s *ctx); void Vulkan_Matrix_Shutdown (struct vulkan_ctx_s *ctx); // "Draw" :) void Vulkan_Matrix_Draw (struct qfv_renderframe_s *rFrame); -VkDescriptorSet Vulkan_Matrix_Descrptors (struct vulkan_ctx_s *ctx, int frame); +VkDescriptorSet Vulkan_Matrix_Descriptors (struct vulkan_ctx_s *ctx, int frame) + __attribute__((pure)); #endif//__QF_Vulkan_qf_matrices_h diff --git a/libs/video/renderer/vulkan/vulkan_alias.c b/libs/video/renderer/vulkan/vulkan_alias.c index 8d97ee13c..848748a23 100644 --- a/libs/video/renderer/vulkan/vulkan_alias.c +++ b/libs/video/renderer/vulkan/vulkan_alias.c @@ -204,7 +204,7 @@ alias_begin_subpass (QFV_AliasSubpass subpass, VkPipeline pipeline, dfunc->vkCmdBindPipeline (cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); VkDescriptorSet sets[] = { - Vulkan_Matrix_Descrptors (ctx, ctx->curFrame), + Vulkan_Matrix_Descriptors (ctx, ctx->curFrame), actx->descriptors, }; dfunc->vkCmdBindDescriptorSets (cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, diff --git a/libs/video/renderer/vulkan/vulkan_bsp.c b/libs/video/renderer/vulkan/vulkan_bsp.c index b52b6db4c..3c63c1fb8 100644 --- a/libs/video/renderer/vulkan/vulkan_bsp.c +++ b/libs/video/renderer/vulkan/vulkan_bsp.c @@ -891,7 +891,7 @@ bsp_begin_subpass (QFV_BspSubpass subpass, VkPipeline pipeline, VK_INDEX_TYPE_UINT32); VkDescriptorSet sets[] = { - Vulkan_Matrix_Descrptors (ctx, ctx->curFrame), + Vulkan_Matrix_Descriptors (ctx, ctx->curFrame), bctx->descriptors, }; dfunc->vkCmdBindDescriptorSets (cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, diff --git a/libs/video/renderer/vulkan/vulkan_draw.c b/libs/video/renderer/vulkan/vulkan_draw.c index ed068032d..6c5824d26 100644 --- a/libs/video/renderer/vulkan/vulkan_draw.c +++ b/libs/video/renderer/vulkan/vulkan_draw.c @@ -794,7 +794,7 @@ Vulkan_FlushText (qfv_renderframe_t *rFrame) dfunc->vkCmdBindIndexBuffer (cmd, dctx->ind_buffer, 0, VK_INDEX_TYPE_UINT32); VkDescriptorSet set[2] = { - Vulkan_Matrix_Descrptors (ctx, ctx->curFrame), + Vulkan_Matrix_Descriptors (ctx, ctx->curFrame), dframe->descriptors, }; VkPipelineLayout layout = dctx->layout; diff --git a/libs/video/renderer/vulkan/vulkan_matrices.c b/libs/video/renderer/vulkan/vulkan_matrices.c index 9a892fdb0..0f5536596 100644 --- a/libs/video/renderer/vulkan/vulkan_matrices.c +++ b/libs/video/renderer/vulkan/vulkan_matrices.c @@ -274,7 +274,7 @@ Vulkan_Matrix_Shutdown (vulkan_ctx_t *ctx) } VkDescriptorSet -Vulkan_Matrix_Descrptors (vulkan_ctx_t *ctx, int frame) +Vulkan_Matrix_Descriptors (vulkan_ctx_t *ctx, int frame) { __auto_type mctx = ctx->matrix_context; return mctx->frames.a[frame].descriptors;