WE GOT TEXTURES BABY

This commit is contained in:
2026-01-08 02:43:34 +01:00
parent e306c5e23f
commit 10b00b0525
24 changed files with 828 additions and 272 deletions

View File

@@ -28,14 +28,14 @@ void MeshPipeline::init(GfxDevice& gfxDevice, VkFormat drawImageFormat, VkFormat
};
const auto pushConstantRanges = std::array{bufferRange};
// const auto layouts = std::array{gfxDevice.getBindlessDescSetLayout()};
const auto layouts = std::array{gfxDevice.getBindlessDescSetLayout()};
// m_pipelineLayout = vkutil::createPipelineLayout(device, layouts, pushConstantRanges);
// vkutil::addDebugLabel(device, pipelineLayout, "mesh pipeline layout");
VkPipelineLayoutCreateInfo pipelineLayoutInfo{};
pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
// pipelineLayoutInfo.setLayoutCount = static_cast<uint32_t>(descriptorSetLayouts.size());
// pipelineLayoutInfo.pSetLayouts = descriptorSetLayouts.data();
pipelineLayoutInfo.setLayoutCount = static_cast<uint32_t>(layouts.size());
pipelineLayoutInfo.pSetLayouts = layouts.data();
pipelineLayoutInfo.pushConstantRangeCount = 1;
pipelineLayoutInfo.pPushConstantRanges = pushConstantRanges.data();
@@ -72,9 +72,8 @@ void MeshPipeline::draw(VkCommandBuffer cmd,
const GPUBuffer& sceneDataBuffer,
const std::vector<MeshDrawCommand>& drawCommands,
const std::vector<std::size_t>& sortedDrawCommands) {
// vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
m_pipeline->bind(cmd);
// gfxDevice.bindBindlessDescSet(cmd, pipelineLayout);
gfxDevice.bindBindlessDescSet(cmd, m_pipelineLayout);
const auto viewport = VkViewport{
.x = 0,