mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-08 03:51:39 +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) {
|
for (auto& it : programCache) {
|
||||||
CachedProgram& cachedProgram = it.second;
|
CachedProgram& cachedProgram = it.second;
|
||||||
cachedProgram.program.free();
|
cachedProgram.program.free();
|
||||||
glDeleteBuffers(1, &cachedProgram.uboBinding);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& it : vertexShaderCache) {
|
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 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()) {
|
if (!shader.has_value()) {
|
||||||
// Initialize shader to a "null" shader (handle == 0)
|
// Initialize shader to a "null" shader (handle == 0)
|
||||||
*shader = OpenGL::Shader();
|
shader = OpenGL::Shader();
|
||||||
|
|
||||||
std::string picaShaderSource = PICA::ShaderGen::decompileShader(
|
std::string picaShaderSource = PICA::ShaderGen::decompileShader(
|
||||||
shaderUnit.vs, *emulatorConfig, shaderUnit.vs.entrypoint, PICA::ShaderGen::API::GL, PICA::ShaderGen::Language::GLSL
|
shaderUnit.vs, *emulatorConfig, shaderUnit.vs.entrypoint, PICA::ShaderGen::API::GL, PICA::ShaderGen::Language::GLSL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue