X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Ffinalize.h;h=4fc2e1b00c42806768e0aca28b9166eb2284939b;hb=0fdc229b8b43f1897de4611672ac65b4db954be0;hp=6e96c65eaecb46c0b7d04aaae3027cb063d7bbdf;hpb=acd7bb6e23e2aff9934ecf32852c62ba72c13574;p=libs%2Fgl.git diff --git a/source/glsl/finalize.h b/source/glsl/finalize.h index 6e96c65e..4fc2e1b0 100644 --- a/source/glsl/finalize.h +++ b/source/glsl/finalize.h @@ -43,6 +43,10 @@ private: std::vector unbound_textures; std::vector unbound_blocks; + /* Dirty hack to work around an issue where vertex attributes prevent the + flat qualifier from working on the same location. */ + std::set used_vertex_attribs; + public: void apply(Module &, const Features &, bool = true); private: @@ -61,10 +65,20 @@ Converts the output depth range to match expectations of the target API. */ class DepthRangeConverter: private TraversingVisitor { +private: + bool assignment_target = false; + bool r_gl_pervertex = false; + bool r_gl_position = false; + bool r_position_z_assigned = false; + public: void apply(Stage &, const Features &); private: + virtual void visit(VariableReference &); + virtual void visit(MemberAccess &); + virtual void visit(Swizzle &); + virtual void visit(Assignment &); virtual void visit(FunctionDeclaration &); };