Hash :
c23f4611
Author :
Date :
2012-11-28T19:42:57
Interface design for user-defined name hashing. 1) We use BuiltInResources to pass the hash function to ANGLE, deciding whether we applies hash function or not. 2) We use 64 bits hashing function, because 64 bits is 16 bytes using hex representation, plus the "webgl_" prefix, we can keep the names under 128 (WebGL allows 5 levels of nesting in structures). If chooseing 128 bits, we will go beyond 128 characters, and some drivers can't handle that safely. ANGLEBUG=315 Review URL: https://codereview.appspot.com/6822077 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1466 736b8ea6-26fd-11df-bfd4-992fa37f6226
//
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#ifndef COMPILER_HASH_NAMES_H_
#define COMPILER_HASH_NAMES_H_
#include <map>
#include "compiler/intermediate.h"
#include "GLSLANG/ShaderLang.h"
#define HASHED_NAME_PREFIX "webgl_"
typedef std::map<TPersistString, TPersistString> NameMap;
#endif // COMPILER_HASH_NAMES_H_