Commit 59d982c0 by Jamie Madill Committed by Commit Bot

Refactor built-in symbol table.

In preparation for reducing binary size. Shortend a bunch of strings and symbol prefixes so the autogen file will be more compact. Bug: chromium:998535 Change-Id: If1bedaaacc06dce9678d432055ffa0c9215a8dbd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814724Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 11dc1635
{ {
"src/compiler/translator/ImmutableString_ESSL_autogen.cpp": "src/compiler/translator/ImmutableString_ESSL_autogen.cpp":
"2c8ea95fdeb119742dbce1264186baf0", "7a3f3014d9607087478ab62bb7380c41",
"src/compiler/translator/ImmutableString_autogen.cpp": "src/compiler/translator/ImmutableString_autogen.cpp":
"c5ce7814ee542605b4c353a2ac2590b1", "f263dab8a3de5424902d50fd9c171377",
"src/compiler/translator/ParseContext_ESSL_autogen.h": "src/compiler/translator/ParseContext_ESSL_autogen.h":
"1edbc3eb12319018818147bccd3a226d", "1edbc3eb12319018818147bccd3a226d",
"src/compiler/translator/ParseContext_complete_autogen.h": "src/compiler/translator/ParseContext_complete_autogen.h":
"a4209c68899e9cf3bcce81be2cb5f39f", "a4209c68899e9cf3bcce81be2cb5f39f",
"src/compiler/translator/SymbolTable_ESSL_autogen.cpp": "src/compiler/translator/SymbolTable_ESSL_autogen.cpp":
"f5d8521b9ba52b75349acbd0f07e1cec", "de7c9ea8f4f76a1d6597eb8a8314c419",
"src/compiler/translator/SymbolTable_autogen.cpp": "src/compiler/translator/SymbolTable_autogen.cpp":
"684ce2afa8d3254b12ff3a9db15258b3", "c52199fd8dc27c7eb0da78c6d0054c0f",
"src/compiler/translator/SymbolTable_autogen.h": "src/compiler/translator/SymbolTable_autogen.h":
"3b7cc472d076136a048d6b6f9c28460c", "3ce7740b6ad93a86d198c3937b70c17e",
"src/compiler/translator/builtin_function_declarations.txt": "src/compiler/translator/builtin_function_declarations.txt":
"fc9b0b050448d015482c9f13cab1df67", "fc9b0b050448d015482c9f13cab1df67",
"src/compiler/translator/builtin_variables.json": "src/compiler/translator/builtin_variables.json":
"e0155915c71991dee1c46358fdb7dd8b", "e0155915c71991dee1c46358fdb7dd8b",
"src/compiler/translator/gen_builtin_symbols.py": "src/compiler/translator/gen_builtin_symbols.py":
"3c867ef8bd6d80fa3d237c601b98407d", "f52b542220a3240cb92633ea2aa4b563",
"src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h": "src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h":
"3c7cdcb39ac0bd262a7d2c8edf8650c0", "3c7cdcb39ac0bd262a7d2c8edf8650c0",
"src/compiler/translator/tree_util/BuiltIn_complete_autogen.h": "src/compiler/translator/tree_util/BuiltIn_complete_autogen.h":
"b840c72eb7184799469740e91f8715ab", "b840c72eb7184799469740e91f8715ab",
"src/tests/compiler_tests/ImmutableString_test_ESSL_autogen.cpp": "src/tests/compiler_tests/ImmutableString_test_ESSL_autogen.cpp":
"d5d22a67766f59cb5c99f188a9bf223f", "760243f6505f48d9f72b6dd5ffbe8f23",
"src/tests/compiler_tests/ImmutableString_test_autogen.cpp": "src/tests/compiler_tests/ImmutableString_test_autogen.cpp":
"c01c3151b2307bf822ea1796b92ec76d" "3329875ef3e29005aad2839c96f3ec31"
} }
\ No newline at end of file
...@@ -133,7 +133,7 @@ bool TSymbolTable::setGlInArraySize(unsigned int inputArraySize) ...@@ -133,7 +133,7 @@ bool TSymbolTable::setGlInArraySize(unsigned int inputArraySize)
{ {
return mGlInVariableWithArraySize->getType().getOutermostArraySize() == inputArraySize; return mGlInVariableWithArraySize->getType().getOutermostArraySize() == inputArraySize;
} }
const TInterfaceBlock *glPerVertex = static_cast<const TInterfaceBlock *>(mVar_gl_PerVertex); const TInterfaceBlock *glPerVertex = static_cast<const TInterfaceBlock *>(m_gl_PerVertex);
TType *glInType = new TType(glPerVertex, EvqPerVertexIn, TLayoutQualifier::Create()); TType *glInType = new TType(glPerVertex, EvqPerVertexIn, TLayoutQualifier::Create());
glInType->makeArray(inputArraySize); glInType->makeArray(inputArraySize);
mGlInVariableWithArraySize = mGlInVariableWithArraySize =
...@@ -149,12 +149,12 @@ TVariable *TSymbolTable::getGlInVariableWithArraySize() const ...@@ -149,12 +149,12 @@ TVariable *TSymbolTable::getGlInVariableWithArraySize() const
const TVariable *TSymbolTable::gl_FragData() const const TVariable *TSymbolTable::gl_FragData() const
{ {
return static_cast<const TVariable *>(mVar_gl_FragData); return static_cast<const TVariable *>(m_gl_FragData);
} }
const TVariable *TSymbolTable::gl_SecondaryFragDataEXT() const const TVariable *TSymbolTable::gl_SecondaryFragDataEXT() const
{ {
return static_cast<const TVariable *>(mVar_gl_SecondaryFragDataEXT); return static_cast<const TVariable *>(m_gl_SecondaryFragDataEXT);
} }
TSymbolTable::VariableMetadata *TSymbolTable::getOrCreateVariableMetadata(const TVariable &variable) TSymbolTable::VariableMetadata *TSymbolTable::getOrCreateVariableMetadata(const TVariable &variable)
......
...@@ -68,7 +68,7 @@ using ValidateExtension = int(ShBuiltInResources::*); ...@@ -68,7 +68,7 @@ using ValidateExtension = int(ShBuiltInResources::*);
struct SymbolEntry struct SymbolEntry
{ {
constexpr SymbolEntry(ImmutableString &&name, constexpr SymbolEntry(const char *name,
const TSymbol *symbol, const TSymbol *symbol,
VarPointer var, VarPointer var,
int esslVersion, int esslVersion,
...@@ -89,7 +89,7 @@ struct SymbolEntry ...@@ -89,7 +89,7 @@ struct SymbolEntry
int esslExtVersion2 = -1, int esslExtVersion2 = -1,
Shader esslExtShaderType2 = Shader::ALL, Shader esslExtShaderType2 = Shader::ALL,
ValidateExtension esslExtension2 = nullptr) ValidateExtension esslExtension2 = nullptr)
: name(std::move(name)), : name(name),
symbol(symbol), symbol(symbol),
var(var), var(var),
esslVersion(esslVersion), esslVersion(esslVersion),
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -18,59 +18,59 @@ namespace sh ...@@ -18,59 +18,59 @@ namespace sh
class TSymbolTableBase class TSymbolTableBase
{ {
public: public:
TSymbolTableBase() = default; TSymbolTableBase() = default;
TSymbol *mVar_gl_DepthRangeParameters = nullptr; TSymbol *m_gl_DepthRangeParameters = nullptr;
TSymbol *mVar_gl_DepthRange = nullptr; TSymbol *m_gl_DepthRange = nullptr;
TSymbol *mVar_gl_MaxVertexAttribs = nullptr; TSymbol *m_gl_MaxVertexAttribs = nullptr;
TSymbol *mVar_gl_MaxVertexUniformVectors = nullptr; TSymbol *m_gl_MaxVertexUniformVectors = nullptr;
TSymbol *mVar_gl_MaxVertexTextureImageUnits = nullptr; TSymbol *m_gl_MaxVertexTextureImageUnits = nullptr;
TSymbol *mVar_gl_MaxCombinedTextureImageUnits = nullptr; TSymbol *m_gl_MaxCombinedTextureImageUnits = nullptr;
TSymbol *mVar_gl_MaxTextureImageUnits = nullptr; TSymbol *m_gl_MaxTextureImageUnits = nullptr;
TSymbol *mVar_gl_MaxFragmentUniformVectors = nullptr; TSymbol *m_gl_MaxFragmentUniformVectors = nullptr;
TSymbol *mVar_gl_MaxVaryingVectors = nullptr; TSymbol *m_gl_MaxVaryingVectors = nullptr;
TSymbol *mVar_gl_MaxDrawBuffers = nullptr; TSymbol *m_gl_MaxDrawBuffers = nullptr;
TSymbol *mVar_gl_MaxDualSourceDrawBuffersEXT = nullptr; TSymbol *m_gl_MaxDualSourceDrawBuffersEXT = nullptr;
TSymbol *mVar_gl_MaxVertexOutputVectors = nullptr; TSymbol *m_gl_MaxVertexOutputVectors = nullptr;
TSymbol *mVar_gl_MaxFragmentInputVectors = nullptr; TSymbol *m_gl_MaxFragmentInputVectors = nullptr;
TSymbol *mVar_gl_MinProgramTexelOffset = nullptr; TSymbol *m_gl_MinProgramTexelOffset = nullptr;
TSymbol *mVar_gl_MaxProgramTexelOffset = nullptr; TSymbol *m_gl_MaxProgramTexelOffset = nullptr;
TSymbol *mVar_gl_MaxImageUnits = nullptr; TSymbol *m_gl_MaxImageUnits = nullptr;
TSymbol *mVar_gl_MaxVertexImageUniforms = nullptr; TSymbol *m_gl_MaxVertexImageUniforms = nullptr;
TSymbol *mVar_gl_MaxFragmentImageUniforms = nullptr; TSymbol *m_gl_MaxFragmentImageUniforms = nullptr;
TSymbol *mVar_gl_MaxComputeImageUniforms = nullptr; TSymbol *m_gl_MaxComputeImageUniforms = nullptr;
TSymbol *mVar_gl_MaxCombinedImageUniforms = nullptr; TSymbol *m_gl_MaxCombinedImageUniforms = nullptr;
TSymbol *mVar_gl_MaxCombinedShaderOutputResources = nullptr; TSymbol *m_gl_MaxCombinedShaderOutputResources = nullptr;
TSymbol *mVar_gl_MaxComputeWorkGroupCount = nullptr; TSymbol *m_gl_MaxComputeWorkGroupCount = nullptr;
TSymbol *mVar_gl_MaxComputeWorkGroupSize = nullptr; TSymbol *m_gl_MaxComputeWorkGroupSize = nullptr;
TSymbol *mVar_gl_MaxComputeUniformComponents = nullptr; TSymbol *m_gl_MaxComputeUniformComponents = nullptr;
TSymbol *mVar_gl_MaxComputeTextureImageUnits = nullptr; TSymbol *m_gl_MaxComputeTextureImageUnits = nullptr;
TSymbol *mVar_gl_MaxComputeAtomicCounters = nullptr; TSymbol *m_gl_MaxComputeAtomicCounters = nullptr;
TSymbol *mVar_gl_MaxComputeAtomicCounterBuffers = nullptr; TSymbol *m_gl_MaxComputeAtomicCounterBuffers = nullptr;
TSymbol *mVar_gl_MaxVertexAtomicCounters = nullptr; TSymbol *m_gl_MaxVertexAtomicCounters = nullptr;
TSymbol *mVar_gl_MaxFragmentAtomicCounters = nullptr; TSymbol *m_gl_MaxFragmentAtomicCounters = nullptr;
TSymbol *mVar_gl_MaxCombinedAtomicCounters = nullptr; TSymbol *m_gl_MaxCombinedAtomicCounters = nullptr;
TSymbol *mVar_gl_MaxAtomicCounterBindings = nullptr; TSymbol *m_gl_MaxAtomicCounterBindings = nullptr;
TSymbol *mVar_gl_MaxVertexAtomicCounterBuffers = nullptr; TSymbol *m_gl_MaxVertexAtomicCounterBuffers = nullptr;
TSymbol *mVar_gl_MaxFragmentAtomicCounterBuffers = nullptr; TSymbol *m_gl_MaxFragmentAtomicCounterBuffers = nullptr;
TSymbol *mVar_gl_MaxCombinedAtomicCounterBuffers = nullptr; TSymbol *m_gl_MaxCombinedAtomicCounterBuffers = nullptr;
TSymbol *mVar_gl_MaxAtomicCounterBufferSize = nullptr; TSymbol *m_gl_MaxAtomicCounterBufferSize = nullptr;
TSymbol *mVar_gl_MaxGeometryInputComponents = nullptr; TSymbol *m_gl_MaxGeometryInputComponents = nullptr;
TSymbol *mVar_gl_MaxGeometryOutputComponents = nullptr; TSymbol *m_gl_MaxGeometryOutputComponents = nullptr;
TSymbol *mVar_gl_MaxGeometryImageUniforms = nullptr; TSymbol *m_gl_MaxGeometryImageUniforms = nullptr;
TSymbol *mVar_gl_MaxGeometryTextureImageUnits = nullptr; TSymbol *m_gl_MaxGeometryTextureImageUnits = nullptr;
TSymbol *mVar_gl_MaxGeometryOutputVertices = nullptr; TSymbol *m_gl_MaxGeometryOutputVertices = nullptr;
TSymbol *mVar_gl_MaxGeometryTotalOutputComponents = nullptr; TSymbol *m_gl_MaxGeometryTotalOutputComponents = nullptr;
TSymbol *mVar_gl_MaxGeometryUniformComponents = nullptr; TSymbol *m_gl_MaxGeometryUniformComponents = nullptr;
TSymbol *mVar_gl_MaxGeometryAtomicCounters = nullptr; TSymbol *m_gl_MaxGeometryAtomicCounters = nullptr;
TSymbol *mVar_gl_MaxGeometryAtomicCounterBuffers = nullptr; TSymbol *m_gl_MaxGeometryAtomicCounterBuffers = nullptr;
TSymbol *mVar_gl_FragData = nullptr; TSymbol *m_gl_FragData = nullptr;
TSymbol *mVar_gl_SecondaryFragDataEXT = nullptr; TSymbol *m_gl_SecondaryFragDataEXT = nullptr;
TSymbol *mVar_gl_FragDepthEXT = nullptr; TSymbol *m_gl_FragDepthEXT = nullptr;
TSymbol *mVar_gl_LastFragData = nullptr; TSymbol *m_gl_LastFragData = nullptr;
TSymbol *mVar_gl_LastFragDataNV = nullptr; TSymbol *m_gl_LastFragDataNV = nullptr;
TSymbol *mVar_gl_PerVertex = nullptr; TSymbol *m_gl_PerVertex = nullptr;
TSymbol *mVar_gl_in = nullptr; TSymbol *m_gl_in = nullptr;
TSymbol *mVar_gl_PositionGS = nullptr; TSymbol *m_gl_PositionGS = nullptr;
}; };
} // namespace sh } // namespace sh
......
...@@ -742,7 +742,7 @@ class GroupedList: ...@@ -742,7 +742,7 @@ class GroupedList:
obj_data = self.objs[hash_val] obj_data = self.objs[hash_val]
data = [] data = []
data.append('ImmutableString("{name}")'.format(name=obj_data['name'])) data.append('"{name}"'.format(name=obj_data['name']))
symbol = obj_data['obj'] if 'obj' in obj_data else 'nullptr' symbol = obj_data['obj'] if 'obj' in obj_data else 'nullptr'
var = '&TSymbolTableBase::{}'.format( var = '&TSymbolTableBase::{}'.format(
...@@ -816,7 +816,7 @@ class GroupedList: ...@@ -816,7 +816,7 @@ class GroupedList:
code.append('SymbolEntry(' + ', '.join(data) + ')') code.append('SymbolEntry(' + ', '.join(data) + ')')
else: else:
code.append("""SymbolEntry(ImmutableString(""), code.append("""SymbolEntry("",
nullptr, nullptr, -1, -1, Shader::ALL, nullptr, nullptr, -1, -1, Shader::ALL,
nullptr, nullptr, -1, Shader::ALL, nullptr, nullptr, nullptr, -1, Shader::ALL, nullptr,
nullptr, nullptr, -1, Shader::ALL, nullptr)""") nullptr, nullptr, -1, Shader::ALL, nullptr)""")
...@@ -1304,7 +1304,7 @@ def get_variable_name_to_store_parameters(parameters): ...@@ -1304,7 +1304,7 @@ def get_variable_name_to_store_parameters(parameters):
def define_constexpr_variable(template_args, variable_declarations): def define_constexpr_variable(template_args, variable_declarations):
template_variable_declaration = 'constexpr const TVariable kVar_{name_with_suffix}(BuiltInId::{name_with_suffix}, BuiltInName::{name}, SymbolType::BuiltIn, TExtension::{extension}, {type});' template_variable_declaration = 'constexpr const TVariable k{name_with_suffix}(BuiltInId::{name_with_suffix}, BuiltInName::{name}, SymbolType::BuiltIn, TExtension::{extension}, {type});'
variable_declarations.append(template_variable_declaration.format(**template_args)) variable_declarations.append(template_variable_declaration.format(**template_args))
...@@ -1470,7 +1470,7 @@ def process_single_function_group( ...@@ -1470,7 +1470,7 @@ def process_single_function_group(
template_args['name_with_suffix'], parameters) template_args['name_with_suffix'], parameters)
template_args['mangled_name_length'] = len(template_args['mangled_name']) template_args['mangled_name_length'] = len(template_args['mangled_name'])
obj = '&BuiltInFunction::function_{unique_name}'.format(**template_args) obj = '&BuiltInFunction::{unique_name}'.format(**template_args)
get_builtin_if_statements.add_obj( get_builtin_if_statements.add_obj(
essl_level, glsl_level, shader_type, template_args['mangled_name'], obj, essl_level, glsl_level, shader_type, template_args['mangled_name'], obj,
template_args['essl_extension'], template_args['glsl_extension'], template_args['essl_extension'], template_args['glsl_extension'],
...@@ -1503,7 +1503,7 @@ def process_single_function_group( ...@@ -1503,7 +1503,7 @@ def process_single_function_group(
define_constexpr_variable(param_template_args, variable_declarations) define_constexpr_variable(param_template_args, variable_declarations)
defined_parameter_names.add(unique_param_name) defined_parameter_names.add(unique_param_name)
parameters_list.append( parameters_list.append(
'&BuiltInVariable::kVar_{name_with_suffix}'.format(**param_template_args)) '&BuiltInVariable::k{name_with_suffix}'.format(**param_template_args))
template_args['parameters_var_name'] = get_variable_name_to_store_parameters( template_args['parameters_var_name'] = get_variable_name_to_store_parameters(
parameters) parameters)
...@@ -1519,7 +1519,7 @@ def process_single_function_group( ...@@ -1519,7 +1519,7 @@ def process_single_function_group(
'parameters_var_name']] = template_parameter_list_declaration.format( 'parameters_var_name']] = template_parameter_list_declaration.format(
**template_args) **template_args)
template_function_declaration = 'constexpr const TFunction function_{unique_name}(BuiltInId::{human_readable_name}, BuiltInName::{name_with_suffix}, TExtension::{extension}, BuiltInParameters::{parameters_var_name}, {param_count}, {return_type}, EOp{op}, {known_to_not_have_side_effects});' template_function_declaration = 'constexpr const TFunction {unique_name}(BuiltInId::{human_readable_name}, BuiltInName::{name_with_suffix}, TExtension::{extension}, BuiltInParameters::{parameters_var_name}, {param_count}, {return_type}, EOp{op}, {known_to_not_have_side_effects});'
function_declarations.append(template_function_declaration.format(**template_args)) function_declarations.append(template_function_declaration.format(**template_args))
id_counter += 1 id_counter += 1
...@@ -1662,7 +1662,7 @@ def process_single_variable_group(shader_type, group_name, group, builtin_id_dec ...@@ -1662,7 +1662,7 @@ def process_single_variable_group(shader_type, group_name, group, builtin_id_dec
if 'private' in props and props['private']: if 'private' in props and props['private']:
is_member = False is_member = False
else: else:
template_init_variable = ' mVar_{name_with_suffix} = {name_with_suffix};' template_init_variable = ' m_{name_with_suffix} = {name_with_suffix};'
elif 'initDynamicType' in props: elif 'initDynamicType' in props:
# Handle variables whose type can't be expressed as TStaticType # Handle variables whose type can't be expressed as TStaticType
...@@ -1672,7 +1672,7 @@ def process_single_variable_group(shader_type, group_name, group, builtin_id_dec ...@@ -1672,7 +1672,7 @@ def process_single_variable_group(shader_type, group_name, group, builtin_id_dec
template_args['initDynamicType'] = props['initDynamicType'].format(**template_args) template_args['initDynamicType'] = props['initDynamicType'].format(**template_args)
template_init_variable = """ {initDynamicType} template_init_variable = """ {initDynamicType}
{type_name}->realize(); {type_name}->realize();
mVar_{name_with_suffix} = new TVariable(BuiltInId::{name_with_suffix}, BuiltInName::{name}, SymbolType::BuiltIn, TExtension::{extension}, {type});""" m_{name_with_suffix} = new TVariable(BuiltInId::{name_with_suffix}, BuiltInName::{name}, SymbolType::BuiltIn, TExtension::{extension}, {type});"""
elif 'value' in props: elif 'value' in props:
# Handle variables with constant value, such as gl_MaxDrawBuffers. # Handle variables with constant value, such as gl_MaxDrawBuffers.
...@@ -1684,21 +1684,21 @@ def process_single_variable_group(shader_type, group_name, group, builtin_id_dec ...@@ -1684,21 +1684,21 @@ def process_single_variable_group(shader_type, group_name, group, builtin_id_dec
resources_key = props['valueKey'] resources_key = props['valueKey']
template_args['value'] = 'resources.' + resources_key template_args['value'] = 'resources.' + resources_key
template_args['object_size'] = TType(props['type']).get_object_size() template_args['object_size'] = TType(props['type']).get_object_size()
template_init_variable = """ mVar_{name_with_suffix} = new TVariable(BuiltInId::{name_with_suffix}, BuiltInName::{name}, SymbolType::BuiltIn, TExtension::{extension}, {type}); template_init_variable = """ m_{name_with_suffix} = new TVariable(BuiltInId::{name_with_suffix}, BuiltInName::{name}, SymbolType::BuiltIn, TExtension::{extension}, {type});
{{ {{
TConstantUnion *unionArray = new TConstantUnion[{object_size}]; TConstantUnion *unionArray = new TConstantUnion[{object_size}];
unionArray[0].setIConst({value}); unionArray[0].setIConst({value});
static_cast<TVariable *>(mVar_{name_with_suffix})->shareConstPointer(unionArray); static_cast<TVariable *>(m_{name_with_suffix})->shareConstPointer(unionArray);
}}""" }}"""
if template_args['object_size'] > 1: if template_args['object_size'] > 1:
template_init_variable = """ mVar_{name_with_suffix} = new TVariable(BuiltInId::{name_with_suffix}, BuiltInName::{name}, SymbolType::BuiltIn, TExtension::{extension}, {type}); template_init_variable = """ m_{name_with_suffix} = new TVariable(BuiltInId::{name_with_suffix}, BuiltInName::{name}, SymbolType::BuiltIn, TExtension::{extension}, {type});
{{ {{
TConstantUnion *unionArray = new TConstantUnion[{object_size}]; TConstantUnion *unionArray = new TConstantUnion[{object_size}];
for (size_t index = 0u; index < {object_size}; ++index) for (size_t index = 0u; index < {object_size}; ++index)
{{ {{
unionArray[index].setIConst({value}[index]); unionArray[index].setIConst({value}[index]);
}} }}
static_cast<TVariable *>(mVar_{name_with_suffix})->shareConstPointer(unionArray); static_cast<TVariable *>(m_{name_with_suffix})->shareConstPointer(unionArray);
}}""" }}"""
else: else:
...@@ -1713,14 +1713,14 @@ def process_single_variable_group(shader_type, group_name, group, builtin_id_dec ...@@ -1713,14 +1713,14 @@ def process_single_variable_group(shader_type, group_name, group, builtin_id_dec
template_get_variable_definition = """const TVariable *{name_with_suffix}() template_get_variable_definition = """const TVariable *{name_with_suffix}()
{{ {{
return &kVar_{name_with_suffix}; return &k{name_with_suffix};
}} }}
""" """
get_variable_definitions.append( get_variable_definitions.append(
template_get_variable_definition.format(**template_args)) template_get_variable_definition.format(**template_args))
if essl_level != 'GLSL_BUILTINS': if essl_level != 'GLSL_BUILTINS':
obj = '&BuiltInVariable::kVar_{name_with_suffix}'.format(**template_args) obj = '&BuiltInVariable::k{name_with_suffix}'.format(**template_args)
# TODO(http://anglebug.com/3835): Add GLSL level once GLSL built-in vars are added # TODO(http://anglebug.com/3835): Add GLSL level once GLSL built-in vars are added
get_builtin_if_statements.add_obj( get_builtin_if_statements.add_obj(
essl_level, 'COMMON_BUILTINS', shader_type, template_args['name'], obj, essl_level, 'COMMON_BUILTINS', shader_type, template_args['name'], obj,
...@@ -1730,11 +1730,11 @@ def process_single_variable_group(shader_type, group_name, group, builtin_id_dec ...@@ -1730,11 +1730,11 @@ def process_single_variable_group(shader_type, group_name, group, builtin_id_dec
if is_member: if is_member:
init_member_variables.append(template_init_variable.format(**template_args)) init_member_variables.append(template_init_variable.format(**template_args))
template_declare_member_variable = 'TSymbol *mVar_{name_with_suffix} = nullptr;' template_declare_member_variable = 'TSymbol *m_{name_with_suffix} = nullptr;'
declare_member_variables.append( declare_member_variables.append(
template_declare_member_variable.format(**template_args)) template_declare_member_variable.format(**template_args))
obj = 'mVar_{name_with_suffix}'.format(**template_args) obj = 'm_{name_with_suffix}'.format(**template_args)
# TODO(http://anglebug.com/3835): Add GLSL level once GLSL built-in vars are added # TODO(http://anglebug.com/3835): Add GLSL level once GLSL built-in vars are added
get_builtin_if_statements.add_obj( get_builtin_if_statements.add_obj(
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment