Vulkan: Make sure textures/samplers are unbound at the end of PresentationCommon::CopyToOutput.

Validation caught an issue where old stuff lingered in sampler 1 and texture 1.

Bug probably introduced in #12921, but could also be others.
This commit is contained in:
Henrik Rydgård committed 2020-07-13 23:32:37 +02:00
1 parent 53b2ab191b
commit 131a1eedfb
6 files changed
+48 -2

No files matched your search

+9
View File
@@ -618,6 +618,15 @@ void OpenGLContext::EndFrame() {
FrameData &frameData = frameData_[renderManager_.GetCurFrame()];
renderManager_.EndPushBuffer(frameData.push); // upload the data!
renderManager_.Finish();
// Unbind stuff.
for (auto &texture : boundTextures_) {
texture = nullptr;
}
for (auto &sampler : boundSamplers_) {
sampler = nullptr;
}
curPipeline_ = nullptr;
}
InputLayout *OpenGLContext::CreateInputLayout(const InputLayoutDesc &desc) {