From 10ed9c9d32377e33ebee07a48af454d47f16352b Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 7 Oct 2012 20:53:42 +0200 Subject: [PATCH] =?utf8?q?Fix=20an=20issue=20with=20textures=20that=20are?= =?utf8?q?=20immediately=20bounced=20(they=20need=20mipmaps=20in=20all=20c?= =?utf8?q?ases,=20since=20=E2=80=9Cinputs=E2=80=9D=20to=20a=20phase=20now?= =?utf8?q?=20always=20are=20RTT=20inputs).=20Also=20add=20a=20FIXME=20to?= =?utf8?q?=20kill=20bounces=20in=20some=20of=20those=20cases.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- effect_chain.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 -- 2.39.2