995 .subresourceRange = { .aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT, .levelCount = 1, .layerCount = 1 },
996 .srcAccessMask = VK_ACCESS_SHADER_READ_BIT,
997 .dstAccessMask = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT,
998 .oldLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
999 .newLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
1002 VkClearValue clearValues;
1003 clearValues.depthStencil.depth = 1.0f;
1004 clearValues.depthStencil.stencil = 0;
1006 VkRenderPassBeginInfo renderPassBeginInfo =
1008 .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
1013 .clearValueCount = 1,
1014 .pClearValues = &clearValues,
1017 vkCmdBeginRenderPass(cmd_buf, &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
1019 vkCmdBindPipeline(cmd_buf, VK_PIPELINE_BIND_POINT_GRAPHICS,
pipeline_smap);
1021 VkViewport viewport =
1029 vkCmdSetViewport(cmd_buf, 0, 1, &viewport);
1039 vkCmdSetScissor(cmd_buf, 0, 1, &rect2D);
1040 float depthBiasConstant = 0.f;
1041 float depthBiasSlope = 0.f;
1045 VkDeviceSize offsets[1] = { 0 };
1049 vkCmdEndRenderPass(cmd_buf);
1053 .subresourceRange = { .aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT,.levelCount = 1,.layerCount = 1 },
1054 .srcAccessMask = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT,
1055 .dstAccessMask = VK_ACCESS_SHADER_READ_BIT,
1056 .oldLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
1057 .newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,