glsl: Hide many classes local to individual .cpp files in anon namespaces.
This gives the compiler the chance to inline and not export class symbols even in the absence of LTO. Saves about 60kb on disk. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@.intel.com>
This commit is contained in:
@@ -42,6 +42,8 @@
|
||||
#include "ir_visitor.h"
|
||||
#include "glsl_types.h"
|
||||
|
||||
namespace {
|
||||
|
||||
class ir_set_program_inouts_visitor : public ir_hierarchical_visitor {
|
||||
public:
|
||||
ir_set_program_inouts_visitor(struct gl_program *prog, GLenum shader_type)
|
||||
@@ -67,6 +69,8 @@ private:
|
||||
GLenum shader_type;
|
||||
};
|
||||
|
||||
} /* anonymous namespace */
|
||||
|
||||
static inline bool
|
||||
is_shader_inout(ir_variable *var)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user