mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-10 16:34:36 +00:00
PostProcessing/GLSL: Skip recompile on target size change
This is specific to reshade.
This commit is contained in:
@@ -124,8 +124,11 @@ void PostProcessing::GLSLShader::FillUniformBuffer(void* buffer, s32 viewport_x,
|
||||
bool PostProcessing::GLSLShader::CompilePipeline(GPUTexture::Format format, u32 width, u32 height, Error* error,
|
||||
ProgressCallback* progress)
|
||||
{
|
||||
if (m_pipeline)
|
||||
m_pipeline.reset();
|
||||
if (m_output_format == format)
|
||||
return true;
|
||||
|
||||
m_pipeline.reset();
|
||||
m_output_format = GPUTexture::Format::Unknown;
|
||||
|
||||
PostProcessingGLSLShaderGen shadergen(g_gpu_device->GetRenderAPI(), g_gpu_device->GetFeatures().dual_source_blend,
|
||||
g_gpu_device->GetFeatures().framebuffer_fetch);
|
||||
@@ -164,6 +167,7 @@ bool PostProcessing::GLSLShader::CompilePipeline(GPUTexture::Format format, u32
|
||||
return false;
|
||||
}
|
||||
|
||||
m_output_format = format;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ private:
|
||||
|
||||
std::unique_ptr<GPUPipeline> m_pipeline;
|
||||
std::unique_ptr<GPUSampler> m_sampler;
|
||||
GPUTexture::Format m_output_format = GPUTexture::Format::Unknown;
|
||||
};
|
||||
|
||||
} // namespace PostProcessing
|
||||
Reference in New Issue
Block a user