Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/threepp/renderers/VulkanRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8915,7 +8915,7 @@ namespace threepp {
gpci.layout = rasterPipelineLayout;
gpci.renderPass = rasterGbufRenderPass;
gpci.subpass = 0;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpci, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpci, nullptr,
&rasterGbufPipeline),
"vkCreateGraphicsPipelines(rasterGbuf)");

Expand Down Expand Up @@ -8964,7 +8964,7 @@ namespace threepp {
gpciInd.pStages = stagesInd;
gpciInd.pVertexInputState = &viInd;

check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpciInd, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpciInd, nullptr,
&rasterGbufIndirectPipeline),
"vkCreateGraphicsPipelines(rasterGbufIndirect)");

Expand Down Expand Up @@ -9010,7 +9010,7 @@ namespace threepp {
gpciDecal.pStages = stagesDecal;
gpciDecal.pDepthStencilState = &dsDecal;
gpciDecal.pColorBlendState = &cbDecal;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpciDecal, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpciDecal, nullptr,
&rasterGbufDecalPipeline),
"vkCreateGraphicsPipelines(rasterGbufDecal)");

Expand Down Expand Up @@ -9170,7 +9170,7 @@ namespace threepp {
gpci.pColorBlendState = &cb;
gpci.pDynamicState = &dyn;
gpci.layout = overlayPipelineLayout;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpci, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpci, nullptr,
&overlayWireframePipeline),
"vkCreateGraphicsPipelines(overlayWireframe)");

Expand All @@ -9184,7 +9184,7 @@ namespace threepp {
rsBasic.cullMode = VK_CULL_MODE_BACK_BIT;
VkGraphicsPipelineCreateInfo gpciBasic = gpci;
gpciBasic.pRasterizationState = &rsBasic;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpciBasic, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpciBasic, nullptr,
&overlayBasicPipeline),
"vkCreateGraphicsPipelines(overlayBasic)");

Expand Down Expand Up @@ -9213,7 +9213,7 @@ namespace threepp {
cbBlend.pAttachments = &cbasBlend;
VkGraphicsPipelineCreateInfo gpciBasicTr = gpciBasic;
gpciBasicTr.pColorBlendState = &cbBlend;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpciBasicTr, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpciBasicTr, nullptr,
&overlayBasicTransparentPipeline),
"vkCreateGraphicsPipelines(overlayBasicTransparent)");

Expand All @@ -9233,7 +9233,7 @@ namespace threepp {
VkGraphicsPipelineCreateInfo gpciLineList = gpci;
gpciLineList.pInputAssemblyState = &iaLineList;
gpciLineList.pRasterizationState = &rsLine;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpciLineList, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpciLineList, nullptr,
&overlayLineListPipeline),
"vkCreateGraphicsPipelines(overlayLineList)");

Expand All @@ -9243,7 +9243,7 @@ namespace threepp {
VkGraphicsPipelineCreateInfo gpciLineStrip = gpci;
gpciLineStrip.pInputAssemblyState = &iaLineStrip;
gpciLineStrip.pRasterizationState = &rsLine;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpciLineStrip, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpciLineStrip, nullptr,
&overlayLineStripPipeline),
"vkCreateGraphicsPipelines(overlayLineStrip)");

Expand Down Expand Up @@ -9303,15 +9303,15 @@ namespace threepp {
gpciLineListColored.stageCount = 2;
gpciLineListColored.pStages = cStages;
gpciLineListColored.pVertexInputState = &cvi;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpciLineListColored, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpciLineListColored, nullptr,
&overlayLineListColoredPipeline),
"vkCreateGraphicsPipelines(overlayLineListColored)");

VkGraphicsPipelineCreateInfo gpciLineStripColored = gpciLineStrip;
gpciLineStripColored.stageCount = 2;
gpciLineStripColored.pStages = cStages;
gpciLineStripColored.pVertexInputState = &cvi;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpciLineStripColored, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpciLineStripColored, nullptr,
&overlayLineStripColoredPipeline),
"vkCreateGraphicsPipelines(overlayLineStripColored)");

Expand Down Expand Up @@ -9357,7 +9357,7 @@ namespace threepp {
gpciPointList.pStages = pStages;
gpciPointList.pVertexInputState = &cvi;
gpciPointList.pInputAssemblyState = &iaPointList;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &gpciPointList, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &gpciPointList, nullptr,
&overlayPointListPipeline),
"vkCreateGraphicsPipelines(overlayPointList)");

Expand Down Expand Up @@ -9481,7 +9481,7 @@ namespace threepp {
dgpci.pColorBlendState = &dcb;
dgpci.pDynamicState = &ddyn;
dgpci.layout = rasterPipelineLayout;
check(vkCreateGraphicsPipelines(ctx->device(), VK_NULL_HANDLE, 1, &dgpci, nullptr,
check(vkCreateGraphicsPipelines(ctx->device(), ctx->pipelineCache(), 1, &dgpci, nullptr,
&overlayDepthPrepassPipeline),
"vkCreateGraphicsPipelines(overlayDepthPrepass)");

Expand Down Expand Up @@ -11234,7 +11234,7 @@ namespace threepp {

const uint32_t idx = rtVariantIndex(useSer, restirDISpec);
check(ctx->rt().createRayTracingPipelines(
ctx->device(), VK_NULL_HANDLE, VK_NULL_HANDLE,
ctx->device(), VK_NULL_HANDLE, ctx->pipelineCache(),
1, &rci, nullptr, &rtVariants_[idx].pipeline),
"vkCreateRayTracingPipelinesKHR (single)");
createShaderBindingTable(useSer, restirDISpec);
Expand Down Expand Up @@ -13737,7 +13737,7 @@ namespace threepp {
cpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpci.stage = ssci;
cpci.layout = eventShadePipelineLayout_;
check(vkCreateComputePipelines(ctx->device(), VK_NULL_HANDLE, 1, &cpci, nullptr, &eventShadePipeline_),
check(vkCreateComputePipelines(ctx->device(), ctx->pipelineCache(), 1, &cpci, nullptr, &eventShadePipeline_),
"vkCreateComputePipelines(event_shade)");
vkDestroyShaderModule(ctx->device(), mod, nullptr);

Expand Down
10 changes: 5 additions & 5 deletions src/threepp/renderers/vulkan/BloomPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ namespace threepp::vulkan {
img = createStorageSampledImage(halfW_, halfH_, "vmaCreateImage(bloom.B)");
}

static VkPipeline makeComputePipe(VkDevice d, VkPipelineLayout layout,
static VkPipeline makeComputePipe(VkDevice d, VkPipelineCache cache, VkPipelineLayout layout,
const uint32_t* spv, size_t spvBytes,
const char* label) {
VkShaderModuleCreateInfo smci{};
Expand All @@ -158,7 +158,7 @@ namespace threepp::vulkan {
cpci.stage = stage;
cpci.layout = layout;
VkPipeline pipe = VK_NULL_HANDLE;
check(vkCreateComputePipelines(d, VK_NULL_HANDLE, 1, &cpci, nullptr, &pipe), label);
check(vkCreateComputePipelines(d, cache, 1, &cpci, nullptr, &pipe), label);
vkDestroyShaderModule(d, mod, nullptr);
return pipe;
}
Expand Down Expand Up @@ -244,11 +244,11 @@ namespace threepp::vulkan {
"vkCreatePipelineLayout(composite)");
}

downPipe_ = makeComputePipe(d, bloomPipeLayout_, kBloomDownCompSpv,
downPipe_ = makeComputePipe(d, ctx_.pipelineCache(), bloomPipeLayout_, kBloomDownCompSpv,
sizeof(kBloomDownCompSpv), "vkCreateComputePipelines(bloom_down)");
blurPipe_ = makeComputePipe(d, bloomPipeLayout_, kBloomBlurCompSpv,
blurPipe_ = makeComputePipe(d, ctx_.pipelineCache(), bloomPipeLayout_, kBloomBlurCompSpv,
sizeof(kBloomBlurCompSpv), "vkCreateComputePipelines(bloom_blur)");
compPipe_ = makeComputePipe(d, compPipeLayout_, kCompositeCompSpv,
compPipe_ = makeComputePipe(d, ctx_.pipelineCache(), compPipeLayout_, kCompositeCompSpv,
sizeof(kCompositeCompSpv), "vkCreateComputePipelines(composite)");
}

Expand Down
4 changes: 2 additions & 2 deletions src/threepp/renderers/vulkan/DeferredShade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace threepp::vulkan {
cpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpci.stage = stage;
cpci.layout = pipeLayout_;
check(vkCreateComputePipelines(d, VK_NULL_HANDLE, 1, &cpci, nullptr, &pipe_),
check(vkCreateComputePipelines(d, ctx_.pipelineCache(), 1, &cpci, nullptr, &pipe_),
"vkCreateComputePipelines(deferred_shade)");

// Second pipeline — spatial denoise + recombine — shares the descriptor
Expand All @@ -142,7 +142,7 @@ namespace threepp::vulkan {
check(vkCreateShaderModule(d, &smciD, nullptr, &modD), "vkCreateShaderModule(deferred_denoise)");
VkComputePipelineCreateInfo cpciD = cpci;
cpciD.stage.module = modD;
check(vkCreateComputePipelines(d, VK_NULL_HANDLE, 1, &cpciD, nullptr, &denoisePipe_),
check(vkCreateComputePipelines(d, ctx_.pipelineCache(), 1, &cpciD, nullptr, &denoisePipe_),
"vkCreateComputePipelines(deferred_denoise)");

vkDestroyShaderModule(d, mod, nullptr);
Expand Down
4 changes: 2 additions & 2 deletions src/threepp/renderers/vulkan/Denoiser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ namespace threepp::vulkan {
cpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpci.stage = stage;
cpci.layout = pipelineLayout_;
check(vkCreateComputePipelines(ctx_.device(), VK_NULL_HANDLE,
check(vkCreateComputePipelines(ctx_.device(), ctx_.pipelineCache(),
1, &cpci, nullptr, &finalizePipeline_),
"vkCreateComputePipelines(denoise)");
vkDestroyShaderModule(ctx_.device(), mod, nullptr);
Expand All @@ -225,7 +225,7 @@ namespace threepp::vulkan {
acpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
acpci.stage = astage;
acpci.layout = pipelineLayout_;
check(vkCreateComputePipelines(ctx_.device(), VK_NULL_HANDLE,
check(vkCreateComputePipelines(ctx_.device(), ctx_.pipelineCache(),
1, &acpci, nullptr, &atrousPipeline_),
"vkCreateComputePipelines(denoise_atrous)");
vkDestroyShaderModule(ctx_.device(), amod, nullptr);
Expand Down
2 changes: 1 addition & 1 deletion src/threepp/renderers/vulkan/EnvPrefilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace threepp::vulkan {
cpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpci.stage = stage;
cpci.layout = pipelineLayout_;
check(vkCreateComputePipelines(ctx_.device(), VK_NULL_HANDLE,
check(vkCreateComputePipelines(ctx_.device(), ctx_.pipelineCache(),
1, &cpci, nullptr, &pipeline_),
"vkCreateComputePipelines(prefilter)");
vkDestroyShaderModule(ctx_.device(), mod, nullptr);
Expand Down
2 changes: 1 addition & 1 deletion src/threepp/renderers/vulkan/EventCameraDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace threepp::vulkan {
cpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpci.stage = ssci;
cpci.layout = pipelineLayout_;
check(vkCreateComputePipelines(ctx_.device(), VK_NULL_HANDLE, 1, &cpci, nullptr, &pipeline_),
check(vkCreateComputePipelines(ctx_.device(), ctx_.pipelineCache(), 1, &cpci, nullptr, &pipeline_),
"vkCreateComputePipelines(event_detect)");

vkDestroyShaderModule(ctx_.device(), shader, nullptr);
Expand Down
2 changes: 1 addition & 1 deletion src/threepp/renderers/vulkan/FoamWorldPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace threepp::vulkan {
cpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpci.stage = stage;
cpci.layout = pipelineLayout_;
check(vkCreateComputePipelines(ctx_.device(), VK_NULL_HANDLE,
check(vkCreateComputePipelines(ctx_.device(), ctx_.pipelineCache(),
1, &cpci, nullptr, &pipeline_),
"vkCreateComputePipelines(foamWorld)");
vkDestroyShaderModule(ctx_.device(), mod, nullptr);
Expand Down
2 changes: 1 addition & 1 deletion src/threepp/renderers/vulkan/GrassWindPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace threepp::vulkan {
cpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpci.stage = stage;
cpci.layout = pipelineLayout_;
check(vkCreateComputePipelines(ctx_.device(), VK_NULL_HANDLE,
check(vkCreateComputePipelines(ctx_.device(), ctx_.pipelineCache(),
1, &cpci, nullptr, &pipeline_),
"vkCreateComputePipelines(grass_wind)");
vkDestroyShaderModule(ctx_.device(), mod, nullptr);
Expand Down
12 changes: 6 additions & 6 deletions src/threepp/renderers/vulkan/OverlayPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ void OverlayPass::createOrthoLinePipelines() {
gpci.pColorBlendState = &cb;
gpci.pDynamicState = &dyn;
gpci.layout = orthoLinePipelineLayout_;
check(vkCreateGraphicsPipelines(ctx_.device(), VK_NULL_HANDLE, 1, &gpci, nullptr,
check(vkCreateGraphicsPipelines(ctx_.device(), ctx_.pipelineCache(), 1, &gpci, nullptr,
&orthoLineListPipeline_),
"vkCreateGraphicsPipelines(orthoLineList)");

VkGraphicsPipelineCreateInfo gpciStrip = gpci;
gpciStrip.pInputAssemblyState = &iaStrip;
check(vkCreateGraphicsPipelines(ctx_.device(), VK_NULL_HANDLE, 1, &gpciStrip, nullptr,
check(vkCreateGraphicsPipelines(ctx_.device(), ctx_.pipelineCache(), 1, &gpciStrip, nullptr,
&orthoLineStripPipeline_),
"vkCreateGraphicsPipelines(orthoLineStrip)");

Expand All @@ -212,7 +212,7 @@ void OverlayPass::createOrthoLinePipelines() {

VkGraphicsPipelineCreateInfo gpciMesh = gpci;
gpciMesh.pInputAssemblyState = &iaTri;
check(vkCreateGraphicsPipelines(ctx_.device(), VK_NULL_HANDLE, 1, &gpciMesh, nullptr,
check(vkCreateGraphicsPipelines(ctx_.device(), ctx_.pipelineCache(), 1, &gpciMesh, nullptr,
&orthoMeshPipeline_),
"vkCreateGraphicsPipelines(orthoMesh)");

Expand All @@ -228,7 +228,7 @@ void OverlayPass::createOrthoLinePipelines() {
cbT.pAttachments = &cbasT;
VkGraphicsPipelineCreateInfo gpciMeshT = gpciMesh;
gpciMeshT.pColorBlendState = &cbT;
check(vkCreateGraphicsPipelines(ctx_.device(), VK_NULL_HANDLE, 1, &gpciMeshT, nullptr,
check(vkCreateGraphicsPipelines(ctx_.device(), ctx_.pipelineCache(), 1, &gpciMeshT, nullptr,
&orthoMeshTransparentPipeline_),
"vkCreateGraphicsPipelines(orthoMeshTransparent)");

Expand Down Expand Up @@ -343,7 +343,7 @@ void OverlayPass::createOrthoPointPipeline() {
gpci.pColorBlendState = &cb;
gpci.pDynamicState = &dyn;
gpci.layout = orthoLinePipelineLayout_;
check(vkCreateGraphicsPipelines(ctx_.device(), VK_NULL_HANDLE, 1, &gpci, nullptr,
check(vkCreateGraphicsPipelines(ctx_.device(), ctx_.pipelineCache(), 1, &gpci, nullptr,
&orthoPointListPipeline_),
"vkCreateGraphicsPipelines(orthoPointList)");

Expand Down Expand Up @@ -512,7 +512,7 @@ void OverlayPass::createSpriteOverlayPipeline() {
gpci.pColorBlendState = &cb;
gpci.pDynamicState = &dyn;
gpci.layout = spritePipelineLayout_;
check(vkCreateGraphicsPipelines(ctx_.device(), VK_NULL_HANDLE, 1, &gpci, nullptr,
check(vkCreateGraphicsPipelines(ctx_.device(), ctx_.pipelineCache(), 1, &gpci, nullptr,
&overlaySpritePipeline_),
"vkCreateGraphicsPipelines(overlaySprite)");

Expand Down
2 changes: 1 addition & 1 deletion src/threepp/renderers/vulkan/SkinningPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace threepp::vulkan {
cpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpci.stage = stage;
cpci.layout = pipelineLayout_;
check(vkCreateComputePipelines(ctx_.device(), VK_NULL_HANDLE,
check(vkCreateComputePipelines(ctx_.device(), ctx_.pipelineCache(),
1, &cpci, nullptr, &pipeline_),
"vkCreateComputePipelines(skinning)");
vkDestroyShaderModule(ctx_.device(), mod, nullptr);
Expand Down
4 changes: 2 additions & 2 deletions src/threepp/renderers/vulkan/TaaResolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ namespace threepp::vulkan {
cpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpci.stage = stage;
cpci.layout = pipelineLayout_;
check(vkCreateComputePipelines(ctx_.device(), VK_NULL_HANDLE,
check(vkCreateComputePipelines(ctx_.device(), ctx_.pipelineCache(),
1, &cpci, nullptr, &pipeline_),
"vkCreateComputePipelines(taa)");
vkDestroyShaderModule(ctx_.device(), mod, nullptr);
Expand Down Expand Up @@ -286,7 +286,7 @@ namespace threepp::vulkan {
rcpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
rcpci.stage = rstage;
rcpci.layout = rcasPipeLayout_;
check(vkCreateComputePipelines(ctx_.device(), VK_NULL_HANDLE, 1, &rcpci,
check(vkCreateComputePipelines(ctx_.device(), ctx_.pipelineCache(), 1, &rcpci,
nullptr, &rcasPipe_),
"vkCreateComputePipelines(rcas)");
vkDestroyShaderModule(ctx_.device(), rmod, nullptr);
Expand Down
2 changes: 1 addition & 1 deletion src/threepp/renderers/vulkan/TetSkinningPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace threepp::vulkan {
cpci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpci.stage = stage;
cpci.layout = pipelineLayout_;
check(vkCreateComputePipelines(ctx_.device(), VK_NULL_HANDLE,
check(vkCreateComputePipelines(ctx_.device(), ctx_.pipelineCache(),
1, &cpci, nullptr, &pipeline_),
"vkCreateComputePipelines(tetSkinning)");
vkDestroyShaderModule(ctx_.device(), mod, nullptr);
Expand Down
Loading
Loading