add flag for debug printf & front face gfx pipeline opt

This commit is contained in:
Matthew 2025-08-24 14:11:38 +10:00
parent f3b7536c8e
commit bb870b87d9

View File

@ -33,7 +33,14 @@ struct DescSet
} }
bool g_VLAYER_SUPPORT = false; bool g_VLAYER_SUPPORT = false;
version(VK_DEBUG_PRINTF)
{
bool g_DEBUG_PRINTF = true;
}
else
{
bool g_DEBUG_PRINTF = false; bool g_DEBUG_PRINTF = false;
}
const FRAME_OVERLAP = 2; const FRAME_OVERLAP = 2;
const MAX_SETS = 1000; const MAX_SETS = 1000;
@ -142,6 +149,14 @@ enum ImageUsage : VkImageUsageFlagBits
alias IU = ImageUsage; alias IU = ImageUsage;
enum FrontFace: VkFrontFace
{
CCW = VK_FRONT_FACE_COUNTER_CLOCKWISE,
CW = VK_FRONT_FACE_CLOCKWISE,
}
alias FF = FrontFace;
enum Format : VkFormat enum Format : VkFormat
{ {
UINT = VK_FORMAT_R32_UINT, UINT = VK_FORMAT_R32_UINT,
@ -246,6 +261,7 @@ struct GfxPipelineInfo
Specialization frag_spec; Specialization frag_spec;
bool self_dependency; bool self_dependency;
PipelineLayout layout; PipelineLayout layout;
FrontFace front_face;
} }
struct CompPipelineInfo struct CompPipelineInfo
@ -1718,7 +1734,7 @@ CreateGraphicsPipeline(Vulkan* vk, Pipeline* pipeline_handle, GfxPipelineInfo* b
cullMode: VK_CULL_MODE_BACK_BIT, cullMode: VK_CULL_MODE_BACK_BIT,
polygonMode: VK_POLYGON_MODE_FILL, polygonMode: VK_POLYGON_MODE_FILL,
lineWidth: 1.0, lineWidth: 1.0,
frontFace: VK_FRONT_FACE_COUNTER_CLOCKWISE, frontFace: cast(VkFrontFace)build_info.front_face,
}; };
VkPipelineMultisampleStateCreateInfo multisample_info = { VkPipelineMultisampleStateCreateInfo multisample_info = {