From 0d6a94fa23f9900aff915fac0552033797bb02ab Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 17 Dec 2023 11:27:46 +0200 Subject: [PATCH] Mostly cosmetic tweaks --- source/glsl/compiler.h | 2 +- source/glsl/generate.h | 4 ++++ source/glsl/optimize.cpp | 1 - source/glsl/resolve.cpp | 2 +- source/glsl/syntax.h | 4 +--- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source/glsl/compiler.h b/source/glsl/compiler.h index dde50841..223c6e1e 100644 --- a/source/glsl/compiler.h +++ b/source/glsl/compiler.h @@ -131,7 +131,7 @@ private: /** Appends a single stage to the matching stage of the target. */ void append_stage(const Stage &); - /// Imports a module by name and appends it to the target. */ + /** Imports a module by name and appends it to the target. */ void import(ModuleCache &, const std::string &); /** Generates any implicitly defines syntactic structures and resolves diff --git a/source/glsl/generate.h b/source/glsl/generate.h index bc25a712..190d3ecf 100644 --- a/source/glsl/generate.h +++ b/source/glsl/generate.h @@ -63,6 +63,10 @@ private: void visit(Passthrough &) override; }; +/** +Adds default global input and output layout qualifiers for stages which need +them (currently tessellation evaluation). +*/ class LayoutDefaulter: private TraversingVisitor { private: diff --git a/source/glsl/optimize.cpp b/source/glsl/optimize.cpp index a3eb20f2..0086a072 100644 --- a/source/glsl/optimize.cpp +++ b/source/glsl/optimize.cpp @@ -694,7 +694,6 @@ void AggregateDismantler::visit(VariableDeclaration &var) const FunctionCall *init_call = var.init_expression.get_as(); if((init_call && init_call->constructor) || !var.init_expression) { - Aggregate &aggre = aggregates[&var]; aggre.declaration = &var; aggre.decl_scope = current_block; diff --git a/source/glsl/resolve.cpp b/source/glsl/resolve.cpp index bd835880..77989f30 100644 --- a/source/glsl/resolve.cpp +++ b/source/glsl/resolve.cpp @@ -1076,7 +1076,7 @@ void ExpressionResolver::visit_constructor(FunctionCall &call) if(column_component_count==row_count) { /* The column has filled up. Create a vector constructor - for it.*/ + for it. */ unique_ptr column_call = make_unique(); column_call->name = basic->base_type->name; column_call->constructor = true; diff --git a/source/glsl/syntax.h b/source/glsl/syntax.h index 61083dee..bc598204 100644 --- a/source/glsl/syntax.h +++ b/source/glsl/syntax.h @@ -66,9 +66,7 @@ struct Node Node() = default; Node(const Node &) = default; -private: - Node &operator=(const Node &); -public: + Node &operator=(const Node &) = delete; virtual ~Node() = default; virtual Node *clone() const = 0; -- 2.45.2