]> git.sesse.net Git - movit/blobdiff - effect.h
Run init_lanczos_table using std::call_once, now that we have C++11.
[movit] / effect.h
index 073780f172bdbc929db64238c1705221264691c4..ba39d6a3cf5bbdc88503214062fd6e075c3da48e 100644 (file)
--- a/effect.h
+++ b/effect.h
@@ -196,7 +196,16 @@ public:
        // set sets_virtual_output_size(), though.
        //
        // Does not make a lot of sense together with needs_texture_bounce().
-       virtual bool one_to_one_sampling() const { return false; }
+       // Cannot be set for compute shaders.
+       virtual bool one_to_one_sampling() const { return strong_one_to_one_sampling(); }
+
+       // Similar in use to one_to_one_sampling(), but even stricter:
+       // The effect must not use texture coordinate in any way beyond
+       // giving it unmodified to its (single) input. This allows it to
+       // also be used after a compute shader, in the same phase.
+       //
+       // An effect that it strong one-to-one must also be one-to-one.
+       virtual bool strong_one_to_one_sampling() const { return false; }
 
        // Whether this effect wants to output to a different size than
        // its input(s) (see inform_input_size(), below). See also
@@ -403,19 +412,19 @@ private:
        std::map<std::string, float *> params_vec4;
 
        // Picked out by EffectChain during finalization.
-       std::vector<Uniform<int> > uniforms_image2d;
-       std::vector<Uniform<int> > uniforms_sampler2d;
-       std::vector<Uniform<bool> > uniforms_bool;
-       std::vector<Uniform<int> > uniforms_int;
-       std::vector<Uniform<float> > uniforms_float;
-       std::vector<Uniform<float> > uniforms_vec2;
-       std::vector<Uniform<float> > uniforms_vec3;
-       std::vector<Uniform<float> > uniforms_vec4;
-       std::vector<Uniform<float> > uniforms_float_array;
-       std::vector<Uniform<float> > uniforms_vec2_array;
-       std::vector<Uniform<float> > uniforms_vec3_array;
-       std::vector<Uniform<float> > uniforms_vec4_array;
-       std::vector<Uniform<Eigen::Matrix3d> > uniforms_mat3;
+       std::vector<Uniform<int>> uniforms_image2d;
+       std::vector<Uniform<int>> uniforms_sampler2d;
+       std::vector<Uniform<bool>> uniforms_bool;
+       std::vector<Uniform<int>> uniforms_int;
+       std::vector<Uniform<float>> uniforms_float;
+       std::vector<Uniform<float>> uniforms_vec2;
+       std::vector<Uniform<float>> uniforms_vec3;
+       std::vector<Uniform<float>> uniforms_vec4;
+       std::vector<Uniform<float>> uniforms_float_array;
+       std::vector<Uniform<float>> uniforms_vec2_array;
+       std::vector<Uniform<float>> uniforms_vec3_array;
+       std::vector<Uniform<float>> uniforms_vec4_array;
+       std::vector<Uniform<Eigen::Matrix3d>> uniforms_mat3;
        friend class EffectChain;
 };