]> git.tdb.fi Git - libs/gl.git/commitdiff
Mostly cosmetic changes
authorMikko Rasa <tdb@tdb.fi>
Thu, 17 Mar 2022 20:12:20 +0000 (22:12 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 17 Mar 2022 20:12:20 +0000 (22:12 +0200)
source/backends/vulkan/program_backend.h
source/core/module.cpp
source/core/program.cpp
source/materials/rendermethod.cpp
source/render/scene.h

index 16cf7b27f9756c0dca5e4662784419e36f91766c..4f9d9c4730103e8188a8c2e1c3422bfe0458056f 100644 (file)
@@ -17,9 +17,6 @@ class VulkanProgram: public NonCopyable
        friend class VulkanPipelineState;
 
 protected:
-       struct TransientData
-       { };
-
        Device &device;
        unsigned n_stages = 0;
        unsigned stage_flags = 0;
index f42a0da76a17d75f30c2da746fcf35f061a8e1ae..5475e434ac2636331c846a529bdf99fb508efb04 100644 (file)
@@ -313,7 +313,7 @@ SpirVModule *SpirVModule::specialize(const map<string, int> &spec_values) const
                                unsigned func_id = *(op+2);
                                new_code.push_back(func_id);
 
-                               unsigned i=3;
+                               unsigned i = 3;
                                while(i<word_count)
                                {
                                        unsigned word = *(op+i++);
index a82ac1d227279be4edd1175428af8e6c0dfe6ffd..8ac13bbd0ce21454cb5af1b269dacc0fc6770205 100644 (file)
@@ -74,7 +74,6 @@ void Program::collect_uniforms(const SpirVModule &mod)
        reflect_data.uniform_blocks.emplace_back();
        vector<vector<string> > block_uniform_names(1);
 
-       unsigned n_descriptor_sets = 0;
        for(const SpirVModule::Variable &v: mod.get_variables())
        {
                if((v.storage==SpirVModule::UNIFORM || v.storage==SpirVModule::PUSH_CONSTANT) && v.struct_type)
@@ -94,7 +93,7 @@ void Program::collect_uniforms(const SpirVModule &mod)
                                        info.bind_point = v.binding | (v.descriptor_set<<20);
                                else
                                        info.bind_point = ReflectData::DEFAULT_BLOCK;
-                               n_descriptor_sets = max(n_descriptor_sets, v.descriptor_set+1);
+                               reflect_data.n_descriptor_sets = max(reflect_data.n_descriptor_sets, v.descriptor_set+1);
                        }
 
                        string prefix;
@@ -113,7 +112,7 @@ void Program::collect_uniforms(const SpirVModule &mod)
                        info.location = v.location;
                        if(v.binding>=0)
                                info.binding = v.binding | (v.descriptor_set<<20);
-                       n_descriptor_sets = max(n_descriptor_sets, v.descriptor_set+1);
+                       reflect_data.n_descriptor_sets = max(reflect_data.n_descriptor_sets, v.descriptor_set+1);
                        info.array_size = max(v.array_size, 1U);
                        info.type = v.type;
                }
@@ -141,7 +140,6 @@ void Program::collect_uniforms(const SpirVModule &mod)
                block.update_layout_hash();
        }
 
-       reflect_data.n_descriptor_sets = n_descriptor_sets;
        reflect_data.update_layout_hash();
 }
 
index 66424856bdc12abbc9642846e63273da900c29aa..78b937d017f40ae069ff0900082ca4675900dae1 100644 (file)
@@ -154,7 +154,7 @@ void RenderMethod::Loader::init_actions()
        add("blend", &Loader::blend);
        add("blend", &Loader::blend_factors);
        add("face_cull", &RenderMethod::face_cull);
-       add("shader",   &Loader::shader);
+       add("shader", &Loader::shader);
        add("image_based_lighting", &RenderMethod::image_based_lighting);
        add("instancing", &RenderMethod::instancing);
        add("material", &Loader::material_inline);
index 512b020b8e3b29d5b930baff4c7bc29cc58cfb5d..e6115ae56541d9e9907818da03c780f45f80660d 100644 (file)
@@ -60,8 +60,6 @@ public:
        };
 
 protected:
-       mutable Matrix culling_matrix;
-
        Scene() = default;
 public:
        virtual ~Scene() = default;