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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user