Crashfix, fix left-behind culling disabling

This commit is contained in:
Henrik Rydgard 2016-01-10 23:41:19 +01:00
parent 02d1648872
commit 4b978b1fd3
2 changed files with 1 additions and 5 deletions

View file

@ -13,13 +13,13 @@ PipelineManagerVulkan::PipelineManagerVulkan(VulkanContext *vulkan) : vulkan_(vu
PipelineManagerVulkan::~PipelineManagerVulkan() {
Clear();
vulkan_->QueueDelete(pipelineCache_);
}
void PipelineManagerVulkan::Clear() {
// This should kill off all the shaders at once.
// This could also be an opportunity to store the whole cache to disk. Will need to also
// store the keys.
vulkan_->QueueDelete(pipelineCache_);
for (auto iter : pipelines_) {
delete iter.second;
}

View file

@ -202,7 +202,6 @@ void ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManager, ShaderManagerV
// Set cull
bool wantCull = !gstate.isModeThrough() && prim != GE_PRIM_RECTANGLES && gstate.isCullEnabled();
key.cullMode = wantCull ? (gstate.getCullMode() ? VK_CULL_MODE_FRONT_BIT : VK_CULL_MODE_BACK_BIT) : VK_CULL_MODE_NONE;
key.cullMode = VK_CULL_MODE_NONE;
// Depth Test
if (gstate.isDepthTestEnabled()) {
@ -290,9 +289,6 @@ void ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManager, ShaderManagerV
if (depthMin < 0.0f) depthMin = 0.0f;
if (depthMax > 1.0f) depthMax = 1.0f;
if (vpAndScissor.dirtyProj) {
shaderManager->DirtyUniform(DIRTY_PROJMATRIX);
}
if (vpAndScissor.dirtyDepth) {
shaderManager->DirtyUniform(DIRTY_DEPTHRANGE);
}