Lines Matching refs:vkd
170 BufferWithMemory buffer (ctx.vkd, ctx.device, ctx.allocator, makeBufferCreateInfo(bufferSize, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT), MemoryRequirement::HostVisible);
175 flushAlloc(ctx.vkd, ctx.device, bufferAlloc);
206 ImageWithMemory colorAttachment (ctx.vkd, ctx.device, ctx.allocator, imageCreateInfo, MemoryRequirement::Any);
207 const auto colorAttachmentView = makeImageView(ctx.vkd, ctx.device, colorAttachment.get(), VK_IMAGE_VIEW_TYPE_2D, imageFormat, subresourceRange);
239 const auto renderPass = createRenderPass(ctx.vkd, ctx.device, &renderPassCreateInfo);
240 const auto framebuffer = makeFramebuffer(ctx.vkd, ctx.device, renderPass.get(), colorAttachmentView.get(), imageExtent.width, imageExtent.height);
308 const auto descriptorSetLayout = layoutBuilder.build(ctx.vkd, ctx.device);
309 const auto graphicsPipelineLayout = makePipelineLayout(ctx.vkd, ctx.device, descriptorSetLayout.get());
313 const auto descriptorPool = poolBuilder.build(ctx.vkd, ctx.device, VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, 1);
314 const auto descriptorSetBuffer = makeDescriptorSet(ctx.vkd, ctx.device, descriptorPool.get(), descriptorSetLayout.get());
321 updater.update(ctx.vkd, ctx.device);
323 const auto vtxshader = createShaderModule(ctx.vkd, ctx.device, m_context.getBinaryCollection().get("vert"));
324 const auto frgshader = createShaderModule(ctx.vkd, ctx.device, m_context.getBinaryCollection().get("frag"));
336 ctx.vkd, // const DeviceInterface& vk
355 const auto commandPool = createCommandPool(ctx.vkd, ctx.device, VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, ctx.qfIndex);
356 const auto primaryCmdBufferPtr = allocateCommandBuffer(ctx.vkd, ctx.device, commandPool.get(), VK_COMMAND_BUFFER_LEVEL_PRIMARY);
359 const auto secondaryCmdBufferPtr = allocateCommandBuffer(ctx.vkd, ctx.device, commandPool.get(), VK_COMMAND_BUFFER_LEVEL_SECONDARY);
363 beginCommandBuffer(ctx.vkd, primaryCmdBuffer);
373 cmdPipelineImageMemoryBarrier(ctx.vkd, primaryCmdBuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, &initialBarrier);
386 ctx.vkd.beginCommandBuffer(secondaryCmdBuffer, &commandBufBeginParams);
387 ctx.vkd.cmdBeginRendering(secondaryCmdBuffer, &renderInfo);
388 ctx.vkd.cmdBindDescriptorSets(secondaryCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, graphicsPipelineLayout.get(), 0u, 1, &descriptorSetBuffer.get(), 0u, nullptr);
389 ctx.vkd.cmdBindPipeline(secondaryCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline.get());
390 ctx.vkd.cmdDraw(secondaryCmdBuffer, 3u, 1u, 0u, 0u);
391 ctx.vkd.cmdEndRendering(secondaryCmdBuffer);
392 endCommandBuffer(ctx.vkd, secondaryCmdBuffer);
393 ctx.vkd.cmdExecuteCommands(primaryCmdBuffer, 1, &secondaryCmdBuffer);
406 ctx.vkd.cmdBeginRendering(primaryCmdBuffer, &renderInfo);
407 ctx.vkd.beginCommandBuffer(secondaryCmdBuffer, &commandBufBeginParams);
408 ctx.vkd.cmdBindDescriptorSets(secondaryCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, graphicsPipelineLayout.get(), 0u, 1, &descriptorSetBuffer.get(), 0u, nullptr);
409 ctx.vkd.cmdBindPipeline(secondaryCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline.get());
410 ctx.vkd.cmdDraw(secondaryCmdBuffer, 3, 1, 0, 0);
411 endCommandBuffer(ctx.vkd, secondaryCmdBuffer);
412 ctx.vkd.cmdExecuteCommands(primaryCmdBuffer, 1, &secondaryCmdBuffer);
413 ctx.vkd.cmdEndRendering(primaryCmdBuffer);
417 ctx.vkd.cmdBeginRendering(primaryCmdBuffer, &renderInfo);
418 ctx.vkd.cmdBindDescriptorSets(primaryCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, graphicsPipelineLayout.get(), 0u, 1, &descriptorSetBuffer.get(), 0u, nullptr);
419 ctx.vkd.cmdBindPipeline(primaryCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline.get());
420 ctx.vkd.cmdDraw(primaryCmdBuffer, 3, 1, 0, 0);
421 ctx.vkd.cmdEndRendering(primaryCmdBuffer);
439 ctx.vkd.cmdBeginRenderPass(primaryCmdBuffer, &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
440 ctx.vkd.cmdBindDescriptorSets(primaryCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, graphicsPipelineLayout.get(), 0u, 1, &descriptorSetBuffer.get(), 0u, nullptr);
441 ctx.vkd.cmdBindPipeline(primaryCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline.get());
442 ctx.vkd.cmdDraw(primaryCmdBuffer, 3, 1, 0, 0);
443 ctx.vkd.cmdEndRenderPass(primaryCmdBuffer);
447 cmdPipelineBufferMemoryBarrier(ctx.vkd, primaryCmdBuffer, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_HOST_BIT, &renderBufferBarrier);
448 endCommandBuffer(ctx.vkd, primaryCmdBuffer);
449 submitCommandsAndWait(ctx.vkd, ctx.device, m_context.getUniversalQueue(), primaryCmdBuffer);
451 invalidateAlloc(ctx.vkd, ctx.device, bufferAlloc);