Permalink
Browse files

Oops, broke Vulkan in the rebase somehow. Fixed.

  • Loading branch information...
hrydgard committed Aug 14, 2017
1 parent 00f57a5 commit 776c9e384f4d0de79f3c1d8b9bcdad199d93aaac
Showing with 11 additions and 13 deletions.
  1. +11 −13 GPU/Vulkan/DrawEngineVulkan.cpp
@@ -750,30 +750,28 @@ void DrawEngineVulkan::DoFlush() {
sampler = nullSampler_;
}
VulkanPipelineRasterStateKey pipelineKey;
VulkanDynamicState dynState;
ConvertStateToVulkanKey(*framebufferManager_, shaderManager_, prim, pipelineKey, dynState);
ConvertStateToVulkanKey(*framebufferManager_, shaderManager_, prim, pipelineKey_, dynState_);
// TODO: Dirty-flag these.
vkCmdSetScissor(cmd, 0, 1, &dynState.scissor);
vkCmdSetViewport(cmd, 0, 1, &dynState.viewport);
if (dynState.useStencil) {
vkCmdSetStencilWriteMask(cmd, VK_STENCIL_FRONT_AND_BACK, dynState.stencilWriteMask);
vkCmdSetStencilCompareMask(cmd, VK_STENCIL_FRONT_AND_BACK, dynState.stencilCompareMask);
vkCmdSetScissor(cmd, 0, 1, &dynState_.scissor);
vkCmdSetViewport(cmd, 0, 1, &dynState_.viewport);
if (dynState_.useStencil) {
vkCmdSetStencilWriteMask(cmd, VK_STENCIL_FRONT_AND_BACK, dynState_.stencilWriteMask);
vkCmdSetStencilCompareMask(cmd, VK_STENCIL_FRONT_AND_BACK, dynState_.stencilCompareMask);
}
if (result.setStencil) {
vkCmdSetStencilReference(cmd, VK_STENCIL_FRONT_AND_BACK, result.stencilValue);
} else if (dynState.useStencil) {
vkCmdSetStencilReference(cmd, VK_STENCIL_FRONT_AND_BACK, dynState.stencilRef);
} else if (dynState_.useStencil) {
vkCmdSetStencilReference(cmd, VK_STENCIL_FRONT_AND_BACK, dynState_.stencilRef);
}
if (dynState.useBlendColor) {
if (dynState_.useBlendColor) {
float bc[4];
Uint8x4ToFloat4(bc, dynState.blendColor);
Uint8x4ToFloat4(bc, dynState_.blendColor);
vkCmdSetBlendConstants(cmd, bc);
}
dirtyUniforms_ |= shaderManager_->UpdateUniforms();
shaderManager_->GetShaders(prim, lastVType_, &vshader, &fshader, useHWTransform);
VulkanPipeline *pipeline = pipelineManager_->GetOrCreatePipeline(pipelineLayout_, renderPass, pipelineKey, dec_, vshader, fshader, false);
VulkanPipeline *pipeline = pipelineManager_->GetOrCreatePipeline(pipelineLayout_, renderPass, pipelineKey_, dec_, vshader, fshader, false);
if (!pipeline) {
// Already logged, let's bail out.
return;

0 comments on commit 776c9e3

Please sign in to comment.