Lines Matching refs:ctx
774 const auto& ctx = m_context.getContextCommonData();
784 ImageWithBuffer referenceBuffer (ctx.vkd, ctx.device, ctx.allocator, vkExtent, colorFormat, colorUsage, imageType, colorSRR);
785 ImageWithBuffer resultBuffer (ctx.vkd, ctx.device, ctx.allocator, vkExtent, colorFormat, colorUsage, imageType, colorSRR);
800 BufferWithMemory vertexBuffer (ctx.vkd, ctx.device, ctx.allocator, vertexBufferInfo, MemoryRequirement::HostVisible);
806 flushAlloc(ctx.vkd, ctx.device, vertexBufferAlloc);
812 const auto pipelineLayout = makePipelineLayout(ctx.vkd, ctx.device, VK_NULL_HANDLE, &pcRange);
814 const auto renderPass = makeRenderPass(ctx.vkd, ctx.device, colorFormat);
817 const auto framebuffer0 = makeFramebuffer(ctx.vkd, ctx.device, *renderPass, referenceBuffer.getImageView(), vkExtent.width, vkExtent.height);
818 const auto framebuffer1 = makeFramebuffer(ctx.vkd, ctx.device, *renderPass, resultBuffer.getImageView(), vkExtent.width, vkExtent.height);
826 const auto vertModule = createShaderModule(ctx.vkd, ctx.device, binaries.get("vert"));
827 const auto tescModule = createShaderModule(ctx.vkd, ctx.device, binaries.get("tesc"));
828 const auto teseModule0 = createShaderModule(ctx.vkd, ctx.device, binaries.get("tese0"));
829 const auto teseModule1 = createShaderModule(ctx.vkd, ctx.device, binaries.get("tese1"));
830 const auto geomModule = (m_params.geometryShader ? createShaderModule(ctx.vkd, ctx.device, binaries.get("geom")) : Move<VkShaderModule>());
831 const auto fragModule = createShaderModule(ctx.vkd, ctx.device, binaries.get("frag"));
897 const auto pipeline0 = makeGraphicsPipeline(ctx.vkd, ctx.device, *pipelineLayout,
904 const auto pipeline1 = makeGraphicsPipeline(ctx.vkd, ctx.device, *pipelineLayout,
909 const auto cmdPool = makeCommandPool(ctx.vkd, ctx.device, ctx.qfIndex);
910 const auto cmdBufferRef = allocateCommandBuffer(ctx.vkd, ctx.device, *cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY);
911 const auto cmdBufferRes = allocateCommandBuffer(ctx.vkd, ctx.device, *cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY);
918 beginCommandBuffer(ctx.vkd, *cmdBufferRef);
919 beginRenderPass(ctx.vkd, *cmdBufferRef, *renderPass, *framebuffer0, scissors.at(0u), clearColor);
920 ctx.vkd.cmdBindVertexBuffers(*cmdBufferRef, 0u, 1u, &vertexBuffer.get(), &vertexBufferOffset);
921 ctx.vkd.cmdBindPipeline(*cmdBufferRef, bindPoint, *pipeline1);
922 ctx.vkd.cmdPushConstants(*cmdBufferRef, *pipelineLayout, pcStages, 0u, pcSize, &noOffset);
923 ctx.vkd.cmdDraw(*cmdBufferRef, vertexCount, 1u, 0u, 0u);
924 endRenderPass(ctx.vkd, *cmdBufferRef);
925 copyImageToBuffer(ctx.vkd, *cmdBufferRef, referenceBuffer.getImage(), referenceBuffer.getBuffer(), fbExtent.swizzle(0, 1),
928 endCommandBuffer(ctx.vkd, *cmdBufferRef);
929 submitCommandsAndWait(ctx.vkd, ctx.device, ctx.queue, *cmdBufferRef);
932 beginCommandBuffer(ctx.vkd, *cmdBufferRes);
933 beginRenderPass(ctx.vkd, *cmdBufferRes, *renderPass, *framebuffer1, scissors.at(0u), clearColor);
934 ctx.vkd.cmdBindVertexBuffers(*cmdBufferRes, 0u, 1u, &vertexBuffer.get(), &vertexBufferOffset);
936 ctx.vkd.cmdBindPipeline(*cmdBufferRes, bindPoint, *pipeline0);
937 ctx.vkd.cmdPushConstants(*cmdBufferRes, *pipelineLayout, pcStages, 0u, pcSize, &offscreenOffset);
938 ctx.vkd.cmdDraw(*cmdBufferRes, vertexCount, 1u, 0u, 0u);
940 ctx.vkd.cmdBindPipeline(*cmdBufferRes, bindPoint, *pipeline1);
941 ctx.vkd.cmdPushConstants(*cmdBufferRes, *pipelineLayout, pcStages, 0u, pcSize, &noOffset);
942 ctx.vkd.cmdDraw(*cmdBufferRes, vertexCount, 1u, 0u, 0u);
943 endRenderPass(ctx.vkd, *cmdBufferRes);
944 copyImageToBuffer(ctx.vkd, *cmdBufferRes, resultBuffer.getImage(), resultBuffer.getBuffer(), fbExtent.swizzle(0, 1),
947 endCommandBuffer(ctx.vkd, *cmdBufferRes);
948 submitCommandsAndWait(ctx.vkd, ctx.device, ctx.queue, *cmdBufferRes);
950 invalidateAlloc(ctx.vkd, ctx.device, referenceBuffer.getBufferAllocation());
951 invalidateAlloc(ctx.vkd, ctx.device, resultBuffer.getBufferAllocation());