From: Steinar H. Gunderson Date: Sun, 7 Oct 2012 18:53:42 +0000 (+0200) Subject: Fix an issue with textures that are immediately bounced (they need mipmaps in all... X-Git-Tag: 1.0~352 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=10ed9c9d32377e33ebee07a48af454d47f16352b Fix an issue with textures that are immediately bounced (they need mipmaps in all cases, since “inputs” to a phase now always are RTT inputs). Also add a FIXME to kill bounces in some of those cases. --- diff --git a/effect_chain.cpp b/effect_chain.cpp index ced571e..7b3d2e8 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -351,6 +351,7 @@ void EffectChain::construct_glsl_programs(Effect *output) for (unsigned i = 0; i < deps.size(); ++i) { bool start_new_phase = false; + // FIXME: If we sample directly from a texture, we won't need this. if (effect->needs_texture_bounce()) { start_new_phase = true; } @@ -527,6 +528,8 @@ void EffectChain::finalize() for (unsigned i = 0; i < inputs.size(); ++i) { inputs[i]->finalize(); } + + assert(phases[0]->inputs.empty()); finalized = true; } @@ -556,11 +559,6 @@ void EffectChain::render_to_screen() } std::set generated_mipmaps; - for (unsigned i = 0; i < inputs.size(); ++i) { - // Inputs generate their own mipmaps if they need to - // (see input.cpp). - generated_mipmaps.insert(inputs[i]); - } for (unsigned phase = 0; phase < phases.size(); ++phase) { // See if the requested output size has changed. If so, we need to recreate