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:
Eric Anholt
2013-09-20 11:03:44 -07:00
parent 07572621bc
commit 10ef949424
33 changed files with 126 additions and 2 deletions

View File

@@ -29,6 +29,8 @@
#include "main/hash_table.h"
#include "program.h"
namespace {
class ubo_visitor : public program_resource_visitor {
public:
ubo_visitor(void *mem_ctx, gl_uniform_buffer_variable *variables,
@@ -147,6 +149,8 @@ private:
}
};
} /* anonymous namespace */
struct block {
const glsl_type *type;
bool has_instance_name;