trying to make it work without -rdynamic

This commit is contained in:
2025-12-25 16:54:27 +02:00
parent fb5e607f88
commit 352b3b1fc8
22 changed files with 452 additions and 266 deletions

View File

@@ -120,8 +120,10 @@ BEGIN_BUILD_PIPELINE_LIBRARY(VertexTransform)
VkPipelineLayoutCreateInfo stPipelineLayout = {};
stPipelineLayout.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
/*
stPipelineLayout.setLayoutCount = SHADER_STAGE_COUNT;
stPipelineLayout.pSetLayouts = m_setLayouts;
*/
stPipelineLayout.flags = VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT ;
vkCreatePipelineLayout(g_vkDevice, &stPipelineLayout, NULL, &m_layout);
@@ -156,6 +158,7 @@ BEGIN_BUILD_PIPELINE_LIBRARY(PixelShader)
printf("--- PixelShader ---\n");
VkPipelineDepthStencilStateCreateInfo depthStencil = {};
VkPipelineRenderingCreateInfo render = {};
int i = 0;
CUtlVector<VulkanDescriptor_t> vertexDescriptors = ShaderParser()->GetDescriptors(m_pShader, SHADER_STAGE_PIXEL);
VulkanDescriptorInit_t inits[SHADER_STAGE_COUNT] = {};
@@ -178,8 +181,10 @@ BEGIN_BUILD_PIPELINE_LIBRARY(PixelShader)
VkPipelineLayoutCreateInfo stPipelineLayout = {};
stPipelineLayout.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
/*
stPipelineLayout.setLayoutCount = SHADER_STAGE_COUNT;
stPipelineLayout.pSetLayouts = m_setLayouts;
*/
stPipelineLayout.flags = VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT ;
vkCreatePipelineLayout(g_vkDevice, &stPipelineLayout, NULL, &m_layout);
@@ -220,10 +225,14 @@ BEGIN_BUILD_PIPELINE_LIBRARY(PixelShader)
pipeline.stageCount = 1;
pipeline.pStages = &shader;
skipshader:
depthStencil.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;
pipeline.pDepthStencilState = &depthStencil;
skipshader:
render.sType = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO;
render.pNext = pipeline.pNext;
pipeline.pNext = &render;
library.flags = VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT;
pipeline.layout = m_layout;
@@ -248,7 +257,6 @@ BEGIN_BUILD_PIPELINE_LIBRARY(PixelOutput)
render.sType = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO;
render.colorAttachmentCount = m_eFormats.GetSize();
render.pColorAttachmentFormats = m_eFormats.GetData();
render.depthAttachmentFormat = VK_FORMAT_D32_SFLOAT;;
depthStencil.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;
@@ -256,7 +264,13 @@ BEGIN_BUILD_PIPELINE_LIBRARY(PixelOutput)
{
VkPipelineColorBlendAttachmentState a = {};
a.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
a.blendEnable = VK_FALSE;
a.blendEnable = VK_TRUE;
a.srcColorBlendFactor = VK_BLEND_FACTOR_SRC_ALPHA;
a.dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA;
a.colorBlendOp = VK_BLEND_OP_ADD;
a.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE;
a.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO;
a.alphaBlendOp = VK_BLEND_OP_ADD;
attachments.AppendTail(a);
}
blend.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;