mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-11 08:39:48 +12:00
Shader decompiler: Fix redundant compilations
This commit is contained in:
parent
69accdec54
commit
efcb42af2c
2 changed files with 1 additions and 2 deletions
|
@ -95,7 +95,6 @@ class RendererGL final : public Renderer {
|
|||
for (auto& it : programCache) {
|
||||
CachedProgram& cachedProgram = it.second;
|
||||
cachedProgram.program.free();
|
||||
glDeleteBuffers(1, &cachedProgram.uboBinding);
|
||||
}
|
||||
|
||||
for (auto& it : vertexShaderCache) {
|
||||
|
|
|
@ -944,7 +944,7 @@ bool RendererGL::prepareForDraw(ShaderUnit& shaderUnit, bool isImmediateMode) {
|
|||
// If the optional is false, we have never tried to recompile the shader before. Try to recompile it and see if it works.
|
||||
if (!shader.has_value()) {
|
||||
// Initialize shader to a "null" shader (handle == 0)
|
||||
*shader = OpenGL::Shader();
|
||||
shader = OpenGL::Shader();
|
||||
|
||||
std::string picaShaderSource = PICA::ShaderGen::decompileShader(
|
||||
shaderUnit.vs, *emulatorConfig, shaderUnit.vs.entrypoint, PICA::ShaderGen::API::GL, PICA::ShaderGen::Language::GLSL
|
||||
|
|
Loading…
Add table
Reference in a new issue