Translator: Reorganize files

This change makes the translator files more organized by:

- Grouping files that are specific to a certain output under their own
  directory,
- Moving transformations under tree_ops
- Removing Direct from metal translation now that that SPIR-V Cross path
  is removed

Bug: angleproject:6394
Change-Id: Iaf5bb8d5604b84748dece029821b1f77b2813967
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678780
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This commit is contained in:
Shahbaz Youssefi
2023-07-11 10:25:40 -04:00
committed by Angle LUCI CQ
parent 4e6124dae8
commit 9b63700be1
228 changed files with 909 additions and 1244 deletions

View File

@@ -716,8 +716,7 @@ template("translator_lib") {
_needs_glsl_and_vulkan_base = true _needs_glsl_and_vulkan_base = true
_uses_spirv = true _uses_spirv = true
# This translator is needed by metal backend also. sources += angle_translator_lib_spirv_sources
sources += angle_translator_lib_vulkan_sources
} }
if (angle_enable_vulkan || use_fuzzing_engine) { if (angle_enable_vulkan || use_fuzzing_engine) {
@@ -725,7 +724,7 @@ template("translator_lib") {
} }
if (angle_enable_metal) { if (angle_enable_metal) {
sources += angle_translator_lib_metal_sources sources += angle_translator_lib_msl_sources
defines += [ "ANGLE_ENABLE_METAL" ] defines += [ "ANGLE_ENABLE_METAL" ]
} }
} }

View File

@@ -1,8 +1,8 @@
{ {
"src/compiler/translator/emulated_builtin_function_data_hlsl.json": "src/compiler/translator/hlsl/emulated_builtin_function_data_hlsl.json":
"002ad46d144c51fe98d73478aa554ba7", "002ad46d144c51fe98d73478aa554ba7",
"src/compiler/translator/emulated_builtin_functions_hlsl_autogen.cpp": "src/compiler/translator/hlsl/emulated_builtin_functions_hlsl_autogen.cpp":
"eeb085d4abc08e7dd15a1db8807efed6", "eeb085d4abc08e7dd15a1db8807efed6",
"src/compiler/translator/gen_emulated_builtin_function_tables.py": "src/compiler/translator/hlsl/gen_emulated_builtin_function_tables.py":
"cdeb72610aefe2e87ecf46cf7617e487" "cdeb72610aefe2e87ecf46cf7617e487"
} }

View File

@@ -184,12 +184,11 @@ assert INCLUDE_REGEX.findall(b' # include <foo> //comment\n#include "bar"') ==
IGNORED_INCLUDES = { IGNORED_INCLUDES = {
b'absl/container/flat_hash_map.h', b'absl/container/flat_hash_map.h',
b'absl/container/flat_hash_set.h', b'absl/container/flat_hash_set.h',
b'compiler/translator/TranslatorESSL.h', b'compiler/translator/glsl/TranslatorESSL.h',
b'compiler/translator/TranslatorGLSL.h', b'compiler/translator/glsl/TranslatorGLSL.h',
b'compiler/translator/TranslatorHLSL.h', b'compiler/translator/hlsl/TranslatorHLSL.h',
b'compiler/translator/TranslatorMetal.h', b'compiler/translator/msl/TranslatorMSL.h',
b'compiler/translator/TranslatorMetalDirect.h', b'compiler/translator/spirv/TranslatorSPIRV.h',
b'compiler/translator/TranslatorVulkan.h',
b'contrib/optimizations/slide_hash_neon.h', b'contrib/optimizations/slide_hash_neon.h',
b'dirent_on_windows.h', b'dirent_on_windows.h',
b'dlopen_fuchsia.h', b'dlopen_fuchsia.h',

View File

@@ -83,7 +83,7 @@ generators = {
'DXGI format support': 'DXGI format support':
'src/libANGLE/renderer/gen_dxgi_support_tables.py', 'src/libANGLE/renderer/gen_dxgi_support_tables.py',
'Emulated HLSL functions': 'Emulated HLSL functions':
'src/compiler/translator/gen_emulated_builtin_function_tables.py', 'src/compiler/translator/hlsl/gen_emulated_builtin_function_tables.py',
'Extension files': 'Extension files':
'src/libANGLE/gen_extensions.py', 'src/libANGLE/gen_extensions.py',
'GL copy conversion table': 'GL copy conversion table':

View File

@@ -33,12 +33,12 @@ angle_code_affecting_program_serialize += angle_translator_essl_sources
angle_code_affecting_program_serialize += angle_translator_glsl_sources angle_code_affecting_program_serialize += angle_translator_glsl_sources
angle_code_affecting_program_serialize += angle_translator_glsl_apple_sources angle_code_affecting_program_serialize += angle_translator_glsl_apple_sources
angle_code_affecting_program_serialize += angle_translator_hlsl_sources angle_code_affecting_program_serialize += angle_translator_hlsl_sources
angle_code_affecting_program_serialize += angle_translator_lib_vulkan_sources angle_code_affecting_program_serialize += angle_translator_lib_spirv_sources
angle_code_affecting_program_serialize += angle_code_affecting_program_serialize +=
angle_translator_essl_symbol_table_sources angle_translator_essl_symbol_table_sources
angle_code_affecting_program_serialize += angle_code_affecting_program_serialize +=
angle_translator_glsl_symbol_table_sources angle_translator_glsl_symbol_table_sources
angle_code_affecting_program_serialize += angle_translator_lib_metal_sources angle_code_affecting_program_serialize += angle_translator_lib_msl_sources
angle_code_affecting_program_serialize += angle_preprocessor_sources angle_code_affecting_program_serialize += angle_preprocessor_sources
vulkan_backend_dir = "libANGLE/renderer/vulkan/" vulkan_backend_dir = "libANGLE/renderer/vulkan/"

View File

@@ -6,7 +6,7 @@ angle_translator_exported_headers = [
"include/GLSLANG/ShaderLang.h", "include/GLSLANG/ShaderLang.h",
"include/GLSLANG/ShaderVars.h", "include/GLSLANG/ShaderVars.h",
"src/compiler/translator/blocklayout.h", "src/compiler/translator/blocklayout.h",
"src/compiler/translator/blocklayoutHLSL.h", "src/compiler/translator/hlsl/blocklayoutHLSL.h",
] ]
angle_translator_sources = [ angle_translator_sources = [
@@ -42,7 +42,6 @@ angle_translator_sources = [
"src/compiler/translator/Diagnostics.h", "src/compiler/translator/Diagnostics.h",
"src/compiler/translator/DirectiveHandler.cpp", "src/compiler/translator/DirectiveHandler.cpp",
"src/compiler/translator/DirectiveHandler.h", "src/compiler/translator/DirectiveHandler.h",
"src/compiler/translator/DriverUniformMetal.h",
"src/compiler/translator/ExtensionBehavior.cpp", "src/compiler/translator/ExtensionBehavior.cpp",
"src/compiler/translator/ExtensionBehavior.h", "src/compiler/translator/ExtensionBehavior.h",
"src/compiler/translator/FlagStd140Structs.cpp", "src/compiler/translator/FlagStd140Structs.cpp",
@@ -87,11 +86,6 @@ angle_translator_sources = [
"src/compiler/translator/SymbolTable_autogen.h", "src/compiler/translator/SymbolTable_autogen.h",
"src/compiler/translator/SymbolUniqueId.cpp", "src/compiler/translator/SymbolUniqueId.cpp",
"src/compiler/translator/SymbolUniqueId.h", "src/compiler/translator/SymbolUniqueId.h",
"src/compiler/translator/TranslatorESSL.h",
"src/compiler/translator/TranslatorGLSL.h",
"src/compiler/translator/TranslatorHLSL.h",
"src/compiler/translator/TranslatorMetalDirect.h",
"src/compiler/translator/TranslatorVulkan.h",
"src/compiler/translator/Types.cpp", "src/compiler/translator/Types.cpp",
"src/compiler/translator/Types.h", "src/compiler/translator/Types.h",
"src/compiler/translator/ValidateAST.cpp", "src/compiler/translator/ValidateAST.cpp",
@@ -116,13 +110,19 @@ angle_translator_sources = [
"src/compiler/translator/ValidateVaryingLocations.h", "src/compiler/translator/ValidateVaryingLocations.h",
"src/compiler/translator/VariablePacker.cpp", "src/compiler/translator/VariablePacker.cpp",
"src/compiler/translator/VariablePacker.h", "src/compiler/translator/VariablePacker.h",
"src/compiler/translator/VersionGLSL.h",
"src/compiler/translator/blocklayout.cpp", "src/compiler/translator/blocklayout.cpp",
"src/compiler/translator/glsl/TranslatorESSL.h",
"src/compiler/translator/glsl/TranslatorGLSL.h",
"src/compiler/translator/glsl/VersionGLSL.h",
"src/compiler/translator/glslang.h", "src/compiler/translator/glslang.h",
"src/compiler/translator/glslang_lex_autogen.cpp", "src/compiler/translator/glslang_lex_autogen.cpp",
"src/compiler/translator/glslang_tab_autogen.cpp", "src/compiler/translator/glslang_tab_autogen.cpp",
"src/compiler/translator/glslang_tab_autogen.h", "src/compiler/translator/glslang_tab_autogen.h",
"src/compiler/translator/hlsl/TranslatorHLSL.h",
"src/compiler/translator/length_limits.h", "src/compiler/translator/length_limits.h",
"src/compiler/translator/msl/DriverUniformMetal.h",
"src/compiler/translator/msl/TranslatorMSL.h",
"src/compiler/translator/spirv/TranslatorSPIRV.h",
"src/compiler/translator/tree_ops/ClampFragDepth.cpp", "src/compiler/translator/tree_ops/ClampFragDepth.cpp",
"src/compiler/translator/tree_ops/ClampFragDepth.h", "src/compiler/translator/tree_ops/ClampFragDepth.h",
"src/compiler/translator/tree_ops/ClampIndirectIndices.cpp", "src/compiler/translator/tree_ops/ClampIndirectIndices.cpp",
@@ -187,16 +187,15 @@ angle_translator_sources = [
"src/compiler/translator/tree_ops/SimplifyLoopConditions.h", "src/compiler/translator/tree_ops/SimplifyLoopConditions.h",
"src/compiler/translator/tree_ops/SplitSequenceOperator.cpp", "src/compiler/translator/tree_ops/SplitSequenceOperator.cpp",
"src/compiler/translator/tree_ops/SplitSequenceOperator.h", "src/compiler/translator/tree_ops/SplitSequenceOperator.h",
"src/compiler/translator/tree_ops/apple/AddAndTrueToLoopCondition.h", "src/compiler/translator/tree_ops/glsl/RegenerateStructNames.h",
"src/compiler/translator/tree_ops/apple/RewriteDoWhile.h", "src/compiler/translator/tree_ops/glsl/RewriteRepeatedAssignToSwizzled.h",
"src/compiler/translator/tree_ops/apple/RewriteRowMajorMatrices.h", "src/compiler/translator/tree_ops/glsl/ScalarizeVecAndMatConstructorArgs.h",
"src/compiler/translator/tree_ops/apple/RewriteUnaryMinusOperatorFloat.h", "src/compiler/translator/tree_ops/glsl/UseInterfaceBlockFields.h",
"src/compiler/translator/tree_ops/apple/UnfoldShortCircuitAST.h", "src/compiler/translator/tree_ops/glsl/apple/AddAndTrueToLoopCondition.h",
"src/compiler/translator/tree_ops/gl/RegenerateStructNames.h", "src/compiler/translator/tree_ops/glsl/apple/RewriteDoWhile.h",
"src/compiler/translator/tree_ops/gl/RewriteRepeatedAssignToSwizzled.h", "src/compiler/translator/tree_ops/glsl/apple/RewriteRowMajorMatrices.h",
"src/compiler/translator/tree_ops/gl/ScalarizeVecAndMatConstructorArgs.h", "src/compiler/translator/tree_ops/glsl/apple/RewriteUnaryMinusOperatorFloat.h",
"src/compiler/translator/tree_ops/gl/UseInterfaceBlockFields.h", "src/compiler/translator/tree_ops/glsl/apple/UnfoldShortCircuitAST.h",
"src/compiler/translator/tree_util/AsNode.h",
"src/compiler/translator/tree_util/BuiltIn.h", "src/compiler/translator/tree_util/BuiltIn.h",
"src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h", "src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h",
"src/compiler/translator/tree_util/BuiltIn_complete_autogen.h", "src/compiler/translator/tree_util/BuiltIn_complete_autogen.h",
@@ -214,12 +213,9 @@ angle_translator_sources = [
"src/compiler/translator/tree_util/IntermNodePatternMatcher.h", "src/compiler/translator/tree_util/IntermNodePatternMatcher.h",
"src/compiler/translator/tree_util/IntermNode_util.cpp", "src/compiler/translator/tree_util/IntermNode_util.cpp",
"src/compiler/translator/tree_util/IntermNode_util.h", "src/compiler/translator/tree_util/IntermNode_util.h",
"src/compiler/translator/tree_util/IntermRebuild.cpp",
"src/compiler/translator/tree_util/IntermRebuild.h",
"src/compiler/translator/tree_util/IntermTraverse.cpp", "src/compiler/translator/tree_util/IntermTraverse.cpp",
"src/compiler/translator/tree_util/IntermTraverse.h", "src/compiler/translator/tree_util/IntermTraverse.h",
"src/compiler/translator/tree_util/NodeSearch.h", "src/compiler/translator/tree_util/NodeSearch.h",
"src/compiler/translator/tree_util/NodeType.h",
"src/compiler/translator/tree_util/ReplaceArrayOfMatrixVarying.cpp", "src/compiler/translator/tree_util/ReplaceArrayOfMatrixVarying.cpp",
"src/compiler/translator/tree_util/ReplaceArrayOfMatrixVarying.h", "src/compiler/translator/tree_util/ReplaceArrayOfMatrixVarying.h",
"src/compiler/translator/tree_util/ReplaceClipCullDistanceVariable.cpp", "src/compiler/translator/tree_util/ReplaceClipCullDistanceVariable.cpp",
@@ -241,122 +237,122 @@ angle_translator_sources = [
"src/compiler/translator/util.h", "src/compiler/translator/util.h",
] ]
angle_translator_glsl_base_sources = [ angle_translator_glsl_base_sources = [
"src/compiler/translator/OutputGLSLBase.cpp", "src/compiler/translator/glsl/OutputGLSLBase.cpp",
"src/compiler/translator/OutputGLSLBase.h", "src/compiler/translator/glsl/OutputGLSLBase.h",
] ]
angle_translator_glsl_and_vulkan_base_sources = [ angle_translator_glsl_and_vulkan_base_sources = [
"src/compiler/translator/BuiltinsWorkaroundGLSL.cpp", "src/compiler/translator/glsl/OutputGLSL.cpp",
"src/compiler/translator/BuiltinsWorkaroundGLSL.h", "src/compiler/translator/glsl/OutputGLSL.h",
"src/compiler/translator/OutputGLSL.cpp",
"src/compiler/translator/OutputGLSL.h",
] ]
angle_translator_essl_sources = [ angle_translator_essl_sources = [
"src/compiler/translator/OutputESSL.cpp", "src/compiler/translator/glsl/OutputESSL.cpp",
"src/compiler/translator/OutputESSL.h", "src/compiler/translator/glsl/OutputESSL.h",
"src/compiler/translator/TranslatorESSL.cpp", "src/compiler/translator/glsl/TranslatorESSL.cpp",
] ]
angle_translator_glsl_sources = [ angle_translator_glsl_sources = [
"src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp", "src/compiler/translator/glsl/BuiltInFunctionEmulatorGLSL.cpp",
"src/compiler/translator/BuiltInFunctionEmulatorGLSL.h", "src/compiler/translator/glsl/BuiltInFunctionEmulatorGLSL.h",
"src/compiler/translator/ExtensionGLSL.cpp", "src/compiler/translator/glsl/ExtensionGLSL.cpp",
"src/compiler/translator/ExtensionGLSL.h", "src/compiler/translator/glsl/ExtensionGLSL.h",
"src/compiler/translator/TranslatorGLSL.cpp", "src/compiler/translator/glsl/TranslatorGLSL.cpp",
"src/compiler/translator/VersionGLSL.cpp", "src/compiler/translator/glsl/VersionGLSL.cpp",
"src/compiler/translator/tree_ops/gl/RegenerateStructNames.cpp", "src/compiler/translator/tree_ops/glsl/RegenerateStructNames.cpp",
"src/compiler/translator/tree_ops/gl/RewriteRepeatedAssignToSwizzled.cpp", "src/compiler/translator/tree_ops/glsl/RewriteRepeatedAssignToSwizzled.cpp",
"src/compiler/translator/tree_ops/gl/ScalarizeVecAndMatConstructorArgs.cpp", "src/compiler/translator/tree_ops/glsl/ScalarizeVecAndMatConstructorArgs.cpp",
"src/compiler/translator/tree_ops/gl/UseInterfaceBlockFields.cpp", "src/compiler/translator/tree_ops/glsl/UseInterfaceBlockFields.cpp",
] ]
angle_translator_glsl_apple_sources = [ angle_translator_glsl_apple_sources = [
"src/compiler/translator/tree_ops/apple/AddAndTrueToLoopCondition.cpp", "src/compiler/translator/tree_ops/glsl/apple/AddAndTrueToLoopCondition.cpp",
"src/compiler/translator/tree_ops/apple/RewriteDoWhile.cpp", "src/compiler/translator/tree_ops/glsl/apple/RewriteDoWhile.cpp",
"src/compiler/translator/tree_ops/apple/RewriteRowMajorMatrices.cpp", "src/compiler/translator/tree_ops/glsl/apple/RewriteRowMajorMatrices.cpp",
"src/compiler/translator/tree_ops/apple/RewriteUnaryMinusOperatorFloat.cpp", "src/compiler/translator/tree_ops/glsl/apple/RewriteUnaryMinusOperatorFloat.cpp",
"src/compiler/translator/tree_ops/apple/UnfoldShortCircuitAST.cpp", "src/compiler/translator/tree_ops/glsl/apple/UnfoldShortCircuitAST.cpp",
] ]
angle_translator_hlsl_sources = [ angle_translator_hlsl_sources = [
"src/compiler/translator/ASTMetadataHLSL.cpp", "src/compiler/translator/hlsl/ASTMetadataHLSL.cpp",
"src/compiler/translator/ASTMetadataHLSL.h", "src/compiler/translator/hlsl/ASTMetadataHLSL.h",
"src/compiler/translator/AtomicCounterFunctionHLSL.cpp", "src/compiler/translator/hlsl/AtomicCounterFunctionHLSL.cpp",
"src/compiler/translator/AtomicCounterFunctionHLSL.h", "src/compiler/translator/hlsl/AtomicCounterFunctionHLSL.h",
"src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp", "src/compiler/translator/hlsl/BuiltInFunctionEmulatorHLSL.cpp",
"src/compiler/translator/BuiltInFunctionEmulatorHLSL.h", "src/compiler/translator/hlsl/BuiltInFunctionEmulatorHLSL.h",
"src/compiler/translator/ImageFunctionHLSL.cpp", "src/compiler/translator/hlsl/ImageFunctionHLSL.cpp",
"src/compiler/translator/ImageFunctionHLSL.h", "src/compiler/translator/hlsl/ImageFunctionHLSL.h",
"src/compiler/translator/OutputHLSL.cpp", "src/compiler/translator/hlsl/OutputHLSL.cpp",
"src/compiler/translator/OutputHLSL.h", "src/compiler/translator/hlsl/OutputHLSL.h",
"src/compiler/translator/ResourcesHLSL.cpp", "src/compiler/translator/hlsl/ResourcesHLSL.cpp",
"src/compiler/translator/ResourcesHLSL.h", "src/compiler/translator/hlsl/ResourcesHLSL.h",
"src/compiler/translator/ShaderStorageBlockFunctionHLSL.cpp", "src/compiler/translator/hlsl/ShaderStorageBlockFunctionHLSL.cpp",
"src/compiler/translator/ShaderStorageBlockFunctionHLSL.h", "src/compiler/translator/hlsl/ShaderStorageBlockFunctionHLSL.h",
"src/compiler/translator/ShaderStorageBlockOutputHLSL.cpp", "src/compiler/translator/hlsl/ShaderStorageBlockOutputHLSL.cpp",
"src/compiler/translator/ShaderStorageBlockOutputHLSL.h", "src/compiler/translator/hlsl/ShaderStorageBlockOutputHLSL.h",
"src/compiler/translator/StructureHLSL.cpp", "src/compiler/translator/hlsl/StructureHLSL.cpp",
"src/compiler/translator/StructureHLSL.h", "src/compiler/translator/hlsl/StructureHLSL.h",
"src/compiler/translator/TextureFunctionHLSL.cpp", "src/compiler/translator/hlsl/TextureFunctionHLSL.cpp",
"src/compiler/translator/TextureFunctionHLSL.h", "src/compiler/translator/hlsl/TextureFunctionHLSL.h",
"src/compiler/translator/TranslatorHLSL.cpp", "src/compiler/translator/hlsl/TranslatorHLSL.cpp",
"src/compiler/translator/UtilsHLSL.cpp", "src/compiler/translator/hlsl/UtilsHLSL.cpp",
"src/compiler/translator/UtilsHLSL.h", "src/compiler/translator/hlsl/UtilsHLSL.h",
"src/compiler/translator/blocklayoutHLSL.cpp", "src/compiler/translator/hlsl/blocklayoutHLSL.cpp",
"src/compiler/translator/emulated_builtin_functions_hlsl_autogen.cpp", "src/compiler/translator/hlsl/emulated_builtin_functions_hlsl_autogen.cpp",
"src/compiler/translator/tree_ops/d3d/AddDefaultReturnStatements.cpp", "src/compiler/translator/tree_ops/hlsl/AddDefaultReturnStatements.cpp",
"src/compiler/translator/tree_ops/d3d/AddDefaultReturnStatements.h", "src/compiler/translator/tree_ops/hlsl/AddDefaultReturnStatements.h",
"src/compiler/translator/tree_ops/d3d/AggregateAssignArraysInSSBOs.cpp", "src/compiler/translator/tree_ops/hlsl/AggregateAssignArraysInSSBOs.cpp",
"src/compiler/translator/tree_ops/d3d/AggregateAssignArraysInSSBOs.h", "src/compiler/translator/tree_ops/hlsl/AggregateAssignArraysInSSBOs.h",
"src/compiler/translator/tree_ops/d3d/AggregateAssignStructsInSSBOs.cpp", "src/compiler/translator/tree_ops/hlsl/AggregateAssignStructsInSSBOs.cpp",
"src/compiler/translator/tree_ops/d3d/AggregateAssignStructsInSSBOs.h", "src/compiler/translator/tree_ops/hlsl/AggregateAssignStructsInSSBOs.h",
"src/compiler/translator/tree_ops/d3d/ArrayReturnValueToOutParameter.cpp", "src/compiler/translator/tree_ops/hlsl/ArrayReturnValueToOutParameter.cpp",
"src/compiler/translator/tree_ops/d3d/ArrayReturnValueToOutParameter.h", "src/compiler/translator/tree_ops/hlsl/ArrayReturnValueToOutParameter.h",
"src/compiler/translator/tree_ops/d3d/BreakVariableAliasingInInnerLoops.cpp", "src/compiler/translator/tree_ops/hlsl/BreakVariableAliasingInInnerLoops.cpp",
"src/compiler/translator/tree_ops/d3d/BreakVariableAliasingInInnerLoops.h", "src/compiler/translator/tree_ops/hlsl/BreakVariableAliasingInInnerLoops.h",
"src/compiler/translator/tree_ops/d3d/ExpandIntegerPowExpressions.cpp", "src/compiler/translator/tree_ops/hlsl/ExpandIntegerPowExpressions.cpp",
"src/compiler/translator/tree_ops/d3d/ExpandIntegerPowExpressions.h", "src/compiler/translator/tree_ops/hlsl/ExpandIntegerPowExpressions.h",
"src/compiler/translator/tree_ops/d3d/RecordUniformBlocksWithLargeArrayMember.cpp", "src/compiler/translator/tree_ops/hlsl/RecordUniformBlocksWithLargeArrayMember.cpp",
"src/compiler/translator/tree_ops/d3d/RecordUniformBlocksWithLargeArrayMember.h", "src/compiler/translator/tree_ops/hlsl/RecordUniformBlocksWithLargeArrayMember.h",
"src/compiler/translator/tree_ops/d3d/RemoveSwitchFallThrough.cpp", "src/compiler/translator/tree_ops/hlsl/RemoveSwitchFallThrough.cpp",
"src/compiler/translator/tree_ops/d3d/RemoveSwitchFallThrough.h", "src/compiler/translator/tree_ops/hlsl/RemoveSwitchFallThrough.h",
"src/compiler/translator/tree_ops/d3d/RewriteAtomicFunctionExpressions.cpp", "src/compiler/translator/tree_ops/hlsl/RewriteAtomicFunctionExpressions.cpp",
"src/compiler/translator/tree_ops/d3d/RewriteAtomicFunctionExpressions.h", "src/compiler/translator/tree_ops/hlsl/RewriteAtomicFunctionExpressions.h",
"src/compiler/translator/tree_ops/d3d/RewriteElseBlocks.cpp", "src/compiler/translator/tree_ops/hlsl/RewriteElseBlocks.cpp",
"src/compiler/translator/tree_ops/d3d/RewriteElseBlocks.h", "src/compiler/translator/tree_ops/hlsl/RewriteElseBlocks.h",
"src/compiler/translator/tree_ops/d3d/RewriteExpressionsWithShaderStorageBlock.cpp", "src/compiler/translator/tree_ops/hlsl/RewriteExpressionsWithShaderStorageBlock.cpp",
"src/compiler/translator/tree_ops/d3d/RewriteExpressionsWithShaderStorageBlock.h", "src/compiler/translator/tree_ops/hlsl/RewriteExpressionsWithShaderStorageBlock.h",
"src/compiler/translator/tree_ops/d3d/RewriteUnaryMinusOperatorInt.cpp", "src/compiler/translator/tree_ops/hlsl/RewriteUnaryMinusOperatorInt.cpp",
"src/compiler/translator/tree_ops/d3d/RewriteUnaryMinusOperatorInt.h", "src/compiler/translator/tree_ops/hlsl/RewriteUnaryMinusOperatorInt.h",
"src/compiler/translator/tree_ops/d3d/SeparateArrayConstructorStatements.cpp", "src/compiler/translator/tree_ops/hlsl/SeparateArrayConstructorStatements.cpp",
"src/compiler/translator/tree_ops/d3d/SeparateArrayConstructorStatements.h", "src/compiler/translator/tree_ops/hlsl/SeparateArrayConstructorStatements.h",
"src/compiler/translator/tree_ops/d3d/SeparateArrayInitialization.cpp", "src/compiler/translator/tree_ops/hlsl/SeparateArrayInitialization.cpp",
"src/compiler/translator/tree_ops/d3d/SeparateArrayInitialization.h", "src/compiler/translator/tree_ops/hlsl/SeparateArrayInitialization.h",
"src/compiler/translator/tree_ops/d3d/SeparateExpressionsReturningArrays.cpp", "src/compiler/translator/tree_ops/hlsl/SeparateExpressionsReturningArrays.cpp",
"src/compiler/translator/tree_ops/d3d/SeparateExpressionsReturningArrays.h", "src/compiler/translator/tree_ops/hlsl/SeparateExpressionsReturningArrays.h",
"src/compiler/translator/tree_ops/d3d/UnfoldShortCircuitToIf.cpp", "src/compiler/translator/tree_ops/hlsl/UnfoldShortCircuitToIf.cpp",
"src/compiler/translator/tree_ops/d3d/UnfoldShortCircuitToIf.h", "src/compiler/translator/tree_ops/hlsl/UnfoldShortCircuitToIf.h",
"src/compiler/translator/tree_ops/d3d/WrapSwitchStatementsInBlocks.cpp", "src/compiler/translator/tree_ops/hlsl/WrapSwitchStatementsInBlocks.cpp",
"src/compiler/translator/tree_ops/d3d/WrapSwitchStatementsInBlocks.h", "src/compiler/translator/tree_ops/hlsl/WrapSwitchStatementsInBlocks.h",
] ]
angle_translator_lib_vulkan_sources = [ angle_translator_lib_spirv_sources = [
"src/compiler/translator/BuildSPIRV.cpp", "src/compiler/translator/spirv/BuildSPIRV.cpp",
"src/compiler/translator/BuildSPIRV.h", "src/compiler/translator/spirv/BuildSPIRV.h",
"src/compiler/translator/OutputSPIRV.cpp", "src/compiler/translator/spirv/BuiltinsWorkaround.cpp",
"src/compiler/translator/OutputSPIRV.h", "src/compiler/translator/spirv/BuiltinsWorkaround.h",
"src/compiler/translator/TranslatorVulkan.cpp", "src/compiler/translator/spirv/OutputSPIRV.cpp",
"src/compiler/translator/tree_ops/vulkan/EmulateAdvancedBlendEquations.cpp", "src/compiler/translator/spirv/OutputSPIRV.h",
"src/compiler/translator/tree_ops/vulkan/EmulateAdvancedBlendEquations.h", "src/compiler/translator/spirv/TranslatorSPIRV.cpp",
"src/compiler/translator/tree_ops/vulkan/EmulateDithering.cpp", "src/compiler/translator/tree_ops/spirv/EmulateAdvancedBlendEquations.cpp",
"src/compiler/translator/tree_ops/vulkan/EmulateDithering.h", "src/compiler/translator/tree_ops/spirv/EmulateAdvancedBlendEquations.h",
"src/compiler/translator/tree_ops/vulkan/EmulateFragColorData.cpp", "src/compiler/translator/tree_ops/spirv/EmulateDithering.cpp",
"src/compiler/translator/tree_ops/vulkan/EmulateFragColorData.h", "src/compiler/translator/tree_ops/spirv/EmulateDithering.h",
"src/compiler/translator/tree_ops/vulkan/EmulateFramebufferFetch.cpp", "src/compiler/translator/tree_ops/spirv/EmulateFragColorData.cpp",
"src/compiler/translator/tree_ops/vulkan/EmulateFramebufferFetch.h", "src/compiler/translator/tree_ops/spirv/EmulateFragColorData.h",
"src/compiler/translator/tree_ops/vulkan/EmulateYUVBuiltIns.cpp", "src/compiler/translator/tree_ops/spirv/EmulateFramebufferFetch.cpp",
"src/compiler/translator/tree_ops/vulkan/EmulateYUVBuiltIns.h", "src/compiler/translator/tree_ops/spirv/EmulateFramebufferFetch.h",
"src/compiler/translator/tree_ops/vulkan/FlagSamplersWithTexelFetch.cpp", "src/compiler/translator/tree_ops/spirv/EmulateYUVBuiltIns.cpp",
"src/compiler/translator/tree_ops/vulkan/FlagSamplersWithTexelFetch.h", "src/compiler/translator/tree_ops/spirv/EmulateYUVBuiltIns.h",
"src/compiler/translator/tree_ops/vulkan/RewriteInterpolateAtOffset.cpp", "src/compiler/translator/tree_ops/spirv/FlagSamplersWithTexelFetch.cpp",
"src/compiler/translator/tree_ops/vulkan/RewriteInterpolateAtOffset.h", "src/compiler/translator/tree_ops/spirv/FlagSamplersWithTexelFetch.h",
"src/compiler/translator/tree_ops/vulkan/RewriteR32fImages.cpp", "src/compiler/translator/tree_ops/spirv/RewriteInterpolateAtOffset.cpp",
"src/compiler/translator/tree_ops/vulkan/RewriteR32fImages.h", "src/compiler/translator/tree_ops/spirv/RewriteInterpolateAtOffset.h",
"src/compiler/translator/tree_ops/spirv/RewriteR32fImages.cpp",
"src/compiler/translator/tree_ops/spirv/RewriteR32fImages.h",
] ]
angle_translator_essl_symbol_table_sources = [ angle_translator_essl_symbol_table_sources = [
@@ -368,77 +364,81 @@ angle_translator_glsl_symbol_table_sources = [
"src/compiler/translator/SymbolTable_autogen.cpp", "src/compiler/translator/SymbolTable_autogen.cpp",
] ]
angle_translator_lib_metal_sources = [ angle_translator_lib_msl_sources = [
"src/compiler/translator/DriverUniformMetal.cpp", "src/compiler/translator/msl/AsNode.h",
"src/compiler/translator/TranslatorMetalDirect.cpp", "src/compiler/translator/msl/AstHelpers.cpp",
"src/compiler/translator/TranslatorMetalDirect/AddExplicitTypeCasts.cpp", "src/compiler/translator/msl/AstHelpers.h",
"src/compiler/translator/TranslatorMetalDirect/AddExplicitTypeCasts.h", "src/compiler/translator/msl/ConstantNames.cpp",
"src/compiler/translator/TranslatorMetalDirect/AstHelpers.cpp", "src/compiler/translator/msl/DebugSink.h",
"src/compiler/translator/TranslatorMetalDirect/AstHelpers.h", "src/compiler/translator/msl/DiscoverDependentFunctions.cpp",
"src/compiler/translator/TranslatorMetalDirect/ConstantNames.cpp", "src/compiler/translator/msl/DiscoverDependentFunctions.h",
"src/compiler/translator/TranslatorMetalDirect/ConvertUnsupportedConstructorsToFunctionCalls.cpp", "src/compiler/translator/msl/DiscoverEnclosingFunctionTraverser.cpp",
"src/compiler/translator/TranslatorMetalDirect/ConvertUnsupportedConstructorsToFunctionCalls.h", "src/compiler/translator/msl/DiscoverEnclosingFunctionTraverser.h",
"src/compiler/translator/TranslatorMetalDirect/DebugSink.h", "src/compiler/translator/msl/DriverUniformMetal.cpp",
"src/compiler/translator/TranslatorMetalDirect/DiscoverDependentFunctions.cpp", "src/compiler/translator/msl/EmitMetal.cpp",
"src/compiler/translator/TranslatorMetalDirect/DiscoverDependentFunctions.h", "src/compiler/translator/msl/EmitMetal.h",
"src/compiler/translator/TranslatorMetalDirect/DiscoverEnclosingFunctionTraverser.cpp", "src/compiler/translator/msl/IdGen.cpp",
"src/compiler/translator/TranslatorMetalDirect/DiscoverEnclosingFunctionTraverser.h", "src/compiler/translator/msl/IdGen.h",
"src/compiler/translator/TranslatorMetalDirect/EmitMetal.cpp", "src/compiler/translator/msl/IntermRebuild.cpp",
"src/compiler/translator/TranslatorMetalDirect/EmitMetal.h", "src/compiler/translator/msl/IntermRebuild.h",
"src/compiler/translator/TranslatorMetalDirect/FixTypeConstructors.cpp", "src/compiler/translator/msl/Layout.cpp",
"src/compiler/translator/TranslatorMetalDirect/FixTypeConstructors.h", "src/compiler/translator/msl/Layout.h",
"src/compiler/translator/TranslatorMetalDirect/GuardFragDepthWrite.cpp", "src/compiler/translator/msl/MapFunctionsToDefinitions.cpp",
"src/compiler/translator/TranslatorMetalDirect/GuardFragDepthWrite.h", "src/compiler/translator/msl/MapFunctionsToDefinitions.h",
"src/compiler/translator/TranslatorMetalDirect/HoistConstants.cpp", "src/compiler/translator/msl/MapSymbols.cpp",
"src/compiler/translator/TranslatorMetalDirect/HoistConstants.h", "src/compiler/translator/msl/MapSymbols.h",
"src/compiler/translator/TranslatorMetalDirect/IdGen.cpp", "src/compiler/translator/msl/ModifyStruct.cpp",
"src/compiler/translator/TranslatorMetalDirect/IdGen.h", "src/compiler/translator/msl/ModifyStruct.h",
"src/compiler/translator/TranslatorMetalDirect/IntroduceVertexIndexID.cpp", "src/compiler/translator/msl/Name.cpp",
"src/compiler/translator/TranslatorMetalDirect/IntroduceVertexIndexID.h", "src/compiler/translator/msl/Name.h",
"src/compiler/translator/TranslatorMetalDirect/Layout.cpp", "src/compiler/translator/msl/NodeType.h",
"src/compiler/translator/TranslatorMetalDirect/Layout.h", "src/compiler/translator/msl/Pipeline.cpp",
"src/compiler/translator/TranslatorMetalDirect/MapFunctionsToDefinitions.cpp", "src/compiler/translator/msl/Pipeline.h",
"src/compiler/translator/TranslatorMetalDirect/MapFunctionsToDefinitions.h", "src/compiler/translator/msl/ProgramPrelude.cpp",
"src/compiler/translator/TranslatorMetalDirect/MapSymbols.cpp", "src/compiler/translator/msl/ProgramPrelude.h",
"src/compiler/translator/TranslatorMetalDirect/MapSymbols.h", "src/compiler/translator/msl/Reference.h",
"src/compiler/translator/TranslatorMetalDirect/ModifyStruct.cpp", "src/compiler/translator/msl/RewritePipelines.cpp",
"src/compiler/translator/TranslatorMetalDirect/ModifyStruct.h", "src/compiler/translator/msl/RewritePipelines.h",
"src/compiler/translator/TranslatorMetalDirect/Name.cpp", "src/compiler/translator/msl/SkippingTraverser.h",
"src/compiler/translator/TranslatorMetalDirect/Name.h", "src/compiler/translator/msl/SymbolEnv.cpp",
"src/compiler/translator/TranslatorMetalDirect/NameEmbeddedUniformStructsMetal.cpp", "src/compiler/translator/msl/SymbolEnv.h",
"src/compiler/translator/TranslatorMetalDirect/NameEmbeddedUniformStructsMetal.h", "src/compiler/translator/msl/ToposortStructs.cpp",
"src/compiler/translator/TranslatorMetalDirect/Pipeline.cpp", "src/compiler/translator/msl/ToposortStructs.h",
"src/compiler/translator/TranslatorMetalDirect/Pipeline.h", "src/compiler/translator/msl/TranslatorMSL.cpp",
"src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp", "src/compiler/translator/msl/UtilsMSL.cpp",
"src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.h", "src/compiler/translator/msl/UtilsMSL.h",
"src/compiler/translator/TranslatorMetalDirect/ReduceInterfaceBlocks.cpp", "src/compiler/translator/tree_ops/msl/AddExplicitTypeCasts.cpp",
"src/compiler/translator/TranslatorMetalDirect/ReduceInterfaceBlocks.h", "src/compiler/translator/tree_ops/msl/AddExplicitTypeCasts.h",
"src/compiler/translator/TranslatorMetalDirect/Reference.h", "src/compiler/translator/tree_ops/msl/ConvertUnsupportedConstructorsToFunctionCalls.cpp",
"src/compiler/translator/TranslatorMetalDirect/RewriteCaseDeclarations.cpp", "src/compiler/translator/tree_ops/msl/ConvertUnsupportedConstructorsToFunctionCalls.h",
"src/compiler/translator/TranslatorMetalDirect/RewriteCaseDeclarations.h", "src/compiler/translator/tree_ops/msl/FixTypeConstructors.cpp",
"src/compiler/translator/TranslatorMetalDirect/RewriteInterpolants.cpp", "src/compiler/translator/tree_ops/msl/FixTypeConstructors.h",
"src/compiler/translator/TranslatorMetalDirect/RewriteInterpolants.h", "src/compiler/translator/tree_ops/msl/GuardFragDepthWrite.cpp",
"src/compiler/translator/TranslatorMetalDirect/RewriteOutArgs.cpp", "src/compiler/translator/tree_ops/msl/GuardFragDepthWrite.h",
"src/compiler/translator/TranslatorMetalDirect/RewriteOutArgs.h", "src/compiler/translator/tree_ops/msl/HoistConstants.cpp",
"src/compiler/translator/TranslatorMetalDirect/RewritePipelines.cpp", "src/compiler/translator/tree_ops/msl/HoistConstants.h",
"src/compiler/translator/TranslatorMetalDirect/RewritePipelines.h", "src/compiler/translator/tree_ops/msl/IntroduceVertexIndexID.cpp",
"src/compiler/translator/TranslatorMetalDirect/RewriteUnaddressableReferences.cpp", "src/compiler/translator/tree_ops/msl/IntroduceVertexIndexID.h",
"src/compiler/translator/TranslatorMetalDirect/RewriteUnaddressableReferences.h", "src/compiler/translator/tree_ops/msl/NameEmbeddedUniformStructsMetal.cpp",
"src/compiler/translator/TranslatorMetalDirect/SeparateCompoundExpressions.cpp", "src/compiler/translator/tree_ops/msl/NameEmbeddedUniformStructsMetal.h",
"src/compiler/translator/TranslatorMetalDirect/SeparateCompoundExpressions.h", "src/compiler/translator/tree_ops/msl/ReduceInterfaceBlocks.cpp",
"src/compiler/translator/TranslatorMetalDirect/SeparateCompoundStructDeclarations.cpp", "src/compiler/translator/tree_ops/msl/ReduceInterfaceBlocks.h",
"src/compiler/translator/TranslatorMetalDirect/SeparateCompoundStructDeclarations.h", "src/compiler/translator/tree_ops/msl/RewriteCaseDeclarations.cpp",
"src/compiler/translator/TranslatorMetalDirect/SkippingTraverser.h", "src/compiler/translator/tree_ops/msl/RewriteCaseDeclarations.h",
"src/compiler/translator/TranslatorMetalDirect/SymbolEnv.cpp", "src/compiler/translator/tree_ops/msl/RewriteInterpolants.cpp",
"src/compiler/translator/TranslatorMetalDirect/SymbolEnv.h", "src/compiler/translator/tree_ops/msl/RewriteInterpolants.h",
"src/compiler/translator/TranslatorMetalDirect/ToposortStructs.cpp", "src/compiler/translator/tree_ops/msl/RewriteOutArgs.cpp",
"src/compiler/translator/TranslatorMetalDirect/ToposortStructs.h", "src/compiler/translator/tree_ops/msl/RewriteOutArgs.h",
"src/compiler/translator/TranslatorMetalDirect/TranslatorMetalUtils.cpp", "src/compiler/translator/tree_ops/msl/RewriteUnaddressableReferences.cpp",
"src/compiler/translator/TranslatorMetalDirect/TranslatorMetalUtils.h", "src/compiler/translator/tree_ops/msl/RewriteUnaddressableReferences.h",
"src/compiler/translator/TranslatorMetalDirect/TransposeRowMajorMatrices.cpp", "src/compiler/translator/tree_ops/msl/SeparateCompoundExpressions.cpp",
"src/compiler/translator/TranslatorMetalDirect/TransposeRowMajorMatrices.h", "src/compiler/translator/tree_ops/msl/SeparateCompoundExpressions.h",
"src/compiler/translator/TranslatorMetalDirect/WrapMain.cpp", "src/compiler/translator/tree_ops/msl/SeparateCompoundStructDeclarations.cpp",
"src/compiler/translator/TranslatorMetalDirect/WrapMain.h", "src/compiler/translator/tree_ops/msl/SeparateCompoundStructDeclarations.h",
"src/compiler/translator/tree_ops/msl/TransposeRowMajorMatrices.cpp",
"src/compiler/translator/tree_ops/msl/TransposeRowMajorMatrices.h",
"src/compiler/translator/tree_ops/msl/WrapMain.cpp",
"src/compiler/translator/tree_ops/msl/WrapMain.h",
] ]
angle_preprocessor_sources = [ angle_preprocessor_sources = [

View File

@@ -112,7 +112,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
hasUnsupportedOptions = hasUnsupportedOptions || hasMacGLSLOptions; hasUnsupportedOptions = hasUnsupportedOptions || hasMacGLSLOptions;
#endif #endif
} }
if (!IsOutputVulkan(shaderOutput)) if (!IsOutputSPIRV(shaderOutput))
{ {
hasUnsupportedOptions = hasUnsupportedOptions =
hasUnsupportedOptions || options.emulateSeamfulCubeMapSampling || hasUnsupportedOptions || options.emulateSeamfulCubeMapSampling ||

View File

@@ -5,23 +5,23 @@
// //
#ifdef ANGLE_ENABLE_ESSL #ifdef ANGLE_ENABLE_ESSL
# include "compiler/translator/TranslatorESSL.h" # include "compiler/translator/glsl/TranslatorESSL.h"
#endif // ANGLE_ENABLE_ESSL #endif // ANGLE_ENABLE_ESSL
#ifdef ANGLE_ENABLE_GLSL #ifdef ANGLE_ENABLE_GLSL
# include "compiler/translator/TranslatorGLSL.h" # include "compiler/translator/glsl/TranslatorGLSL.h"
#endif // ANGLE_ENABLE_GLSL #endif // ANGLE_ENABLE_GLSL
#ifdef ANGLE_ENABLE_HLSL #ifdef ANGLE_ENABLE_HLSL
# include "compiler/translator/TranslatorHLSL.h" # include "compiler/translator/hlsl/TranslatorHLSL.h"
#endif // ANGLE_ENABLE_HLSL #endif // ANGLE_ENABLE_HLSL
#ifdef ANGLE_ENABLE_VULKAN #ifdef ANGLE_ENABLE_VULKAN
# include "compiler/translator/TranslatorVulkan.h" # include "compiler/translator/spirv/TranslatorSPIRV.h"
#endif // ANGLE_ENABLE_VULKAN #endif // ANGLE_ENABLE_VULKAN
#ifdef ANGLE_ENABLE_METAL #ifdef ANGLE_ENABLE_METAL
# include "compiler/translator/TranslatorMetalDirect.h" # include "compiler/translator/msl/TranslatorMSL.h"
#endif // ANGLE_ENABLE_METAL #endif // ANGLE_ENABLE_METAL
#include "compiler/translator/util.h" #include "compiler/translator/util.h"
@@ -58,16 +58,16 @@ TCompiler *ConstructCompiler(sh::GLenum type, ShShaderSpec spec, ShShaderOutput
#endif // ANGLE_ENABLE_HLSL #endif // ANGLE_ENABLE_HLSL
#ifdef ANGLE_ENABLE_VULKAN #ifdef ANGLE_ENABLE_VULKAN
if (IsOutputVulkan(output)) if (IsOutputSPIRV(output))
{ {
return new TranslatorVulkan(type, spec); return new TranslatorSPIRV(type, spec);
} }
#endif // ANGLE_ENABLE_VULKAN #endif // ANGLE_ENABLE_VULKAN
#ifdef ANGLE_ENABLE_METAL #ifdef ANGLE_ENABLE_METAL
if (IsOutputMetalDirect(output)) if (IsOutputMSL(output))
{ {
return new TranslatorMetalDirect(type, spec, output); return new TranslatorMSL(type, spec, output);
} }
#endif // ANGLE_ENABLE_METAL #endif // ANGLE_ENABLE_METAL

View File

@@ -50,13 +50,13 @@
#include "compiler/translator/tree_ops/SeparateDeclarations.h" #include "compiler/translator/tree_ops/SeparateDeclarations.h"
#include "compiler/translator/tree_ops/SimplifyLoopConditions.h" #include "compiler/translator/tree_ops/SimplifyLoopConditions.h"
#include "compiler/translator/tree_ops/SplitSequenceOperator.h" #include "compiler/translator/tree_ops/SplitSequenceOperator.h"
#include "compiler/translator/tree_ops/apple/AddAndTrueToLoopCondition.h" #include "compiler/translator/tree_ops/glsl/RegenerateStructNames.h"
#include "compiler/translator/tree_ops/apple/RewriteDoWhile.h" #include "compiler/translator/tree_ops/glsl/RewriteRepeatedAssignToSwizzled.h"
#include "compiler/translator/tree_ops/apple/UnfoldShortCircuitAST.h" #include "compiler/translator/tree_ops/glsl/ScalarizeVecAndMatConstructorArgs.h"
#include "compiler/translator/tree_ops/gl/RegenerateStructNames.h" #include "compiler/translator/tree_ops/glsl/UseInterfaceBlockFields.h"
#include "compiler/translator/tree_ops/gl/RewriteRepeatedAssignToSwizzled.h" #include "compiler/translator/tree_ops/glsl/apple/AddAndTrueToLoopCondition.h"
#include "compiler/translator/tree_ops/gl/ScalarizeVecAndMatConstructorArgs.h" #include "compiler/translator/tree_ops/glsl/apple/RewriteDoWhile.h"
#include "compiler/translator/tree_ops/gl/UseInterfaceBlockFields.h" #include "compiler/translator/tree_ops/glsl/apple/UnfoldShortCircuitAST.h"
#include "compiler/translator/tree_util/BuiltIn.h" #include "compiler/translator/tree_util/BuiltIn.h"
#include "compiler/translator/tree_util/IntermNodePatternMatcher.h" #include "compiler/translator/tree_util/IntermNodePatternMatcher.h"
#include "compiler/translator/tree_util/ReplaceShadowingVariables.h" #include "compiler/translator/tree_util/ReplaceShadowingVariables.h"
@@ -187,7 +187,7 @@ bool RemoveInvariant(sh::GLenum shaderType,
const ShCompileOptions &compileOptions) const ShCompileOptions &compileOptions)
{ {
if (shaderType == GL_FRAGMENT_SHADER && if (shaderType == GL_FRAGMENT_SHADER &&
(IsGLSL420OrNewer(outputType) || IsOutputVulkan(outputType))) (IsGLSL420OrNewer(outputType) || IsOutputSPIRV(outputType)))
return true; return true;
if (compileOptions.removeInvariantAndCentroidForESSL3 && shaderVersion >= 300 && if (compileOptions.removeInvariantAndCentroidForESSL3 && shaderVersion >= 300 &&
@@ -645,7 +645,7 @@ bool TCompiler::getShaderBinary(const ShHandle compilerHandle,
gl::BinaryOutputStream stream; gl::BinaryOutputStream stream;
gl::ShaderType shaderType = gl::FromGLenum<gl::ShaderType>(mShaderType); gl::ShaderType shaderType = gl::FromGLenum<gl::ShaderType>(mShaderType);
gl::CompiledShaderState state(shaderType); gl::CompiledShaderState state(shaderType);
state.buildCompiledShaderState(compilerHandle, IsOutputVulkan(mOutputType)); state.buildCompiledShaderState(compilerHandle, IsOutputSPIRV(mOutputType));
stream.writeBytes( stream.writeBytes(
reinterpret_cast<const unsigned char *>(angle::GetANGLEShaderProgramVersion()), reinterpret_cast<const unsigned char *>(angle::GetANGLEShaderProgramVersion()),

View File

@@ -36,7 +36,7 @@ class TParseContext;
class TranslatorHLSL; class TranslatorHLSL;
#endif // ANGLE_ENABLE_HLSL #endif // ANGLE_ENABLE_HLSL
#ifdef ANGLE_ENABLE_METAL #ifdef ANGLE_ENABLE_METAL
class TranslatorMetalDirect; class TranslatorMSL;
#endif // ANGLE_ENABLE_METAL #endif // ANGLE_ENABLE_METAL
using SpecConstUsageBits = angle::PackedEnumBitSet<vk::SpecConstUsage, uint32_t>; using SpecConstUsageBits = angle::PackedEnumBitSet<vk::SpecConstUsage, uint32_t>;
@@ -64,12 +64,12 @@ class TShHandleBase
public: public:
TShHandleBase(); TShHandleBase();
virtual ~TShHandleBase(); virtual ~TShHandleBase();
virtual TCompiler *getAsCompiler() { return 0; } virtual TCompiler *getAsCompiler() { return nullptr; }
#ifdef ANGLE_ENABLE_HLSL #ifdef ANGLE_ENABLE_HLSL
virtual TranslatorHLSL *getAsTranslatorHLSL() { return 0; } virtual TranslatorHLSL *getAsTranslatorHLSL() { return nullptr; }
#endif // ANGLE_ENABLE_HLSL #endif // ANGLE_ENABLE_HLSL
#ifdef ANGLE_ENABLE_METAL #ifdef ANGLE_ENABLE_METAL
virtual TranslatorMetalDirect *getAsTranslatorMetalDirect() { return nullptr; } virtual TranslatorMSL *getAsTranslatorMSL() { return nullptr; }
#endif // ANGLE_ENABLE_METAL #endif // ANGLE_ENABLE_METAL
protected: protected:

View File

@@ -15,7 +15,7 @@
#include "compiler/translator/InitializeDll.h" #include "compiler/translator/InitializeDll.h"
#include "compiler/translator/length_limits.h" #include "compiler/translator/length_limits.h"
#ifdef ANGLE_ENABLE_HLSL #ifdef ANGLE_ENABLE_HLSL
# include "compiler/translator/TranslatorHLSL.h" # include "compiler/translator/hlsl/TranslatorHLSL.h"
#endif // ANGLE_ENABLE_HLSL #endif // ANGLE_ENABLE_HLSL
#include "angle_gl.h" #include "angle_gl.h"
#include "compiler/translator/VariablePacker.h" #include "compiler/translator/VariablePacker.h"

View File

@@ -1,21 +0,0 @@
//
// Copyright 2022 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_TRANSLATOR_TRANSLATORMETALDIRECT_GUARDFRAGDEPTHWRITE_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_GUARDFRAGDEPTHWRITE_H_
#include "compiler/translator/Compiler.h"
#include "compiler/translator/TranslatorMetalDirect/ProgramPrelude.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h"
namespace sh
{
[[nodiscard]] bool GuardFragDepthWrite(TCompiler &compiler, TIntermBlock &root);
} // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_GUARDFRAGDEPTHWRITE_H_

View File

@@ -1,21 +0,0 @@
//
// Copyright 2020 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_TRANSLATOR_TRANSLATORMETALDIRECT_TRANSPOSEROWMAJORMATRICIES_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_TRANSPOSEROWMAJORMATRICIES_H_
#include "compiler/translator/Compiler.h"
#include "compiler/translator/TranslatorMetalDirect/ProgramPrelude.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h"
namespace sh
{
[[nodiscard]] bool TransposeRowMajorMatricies(TCompiler &compiler, TIntermBlock &root);
} // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_TRANSPOSEROWMAJORMATRICIES_H_

View File

@@ -4,11 +4,11 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/BuiltInFunctionEmulatorGLSL.h" #include "compiler/translator/glsl/BuiltInFunctionEmulatorGLSL.h"
#include "angle_gl.h" #include "angle_gl.h"
#include "compiler/translator/BuiltInFunctionEmulator.h" #include "compiler/translator/BuiltInFunctionEmulator.h"
#include "compiler/translator/VersionGLSL.h" #include "compiler/translator/glsl/VersionGLSL.h"
#include "compiler/translator/tree_util/BuiltIn.h" #include "compiler/translator/tree_util/BuiltIn.h"
namespace sh namespace sh

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORGLSL_H_ #ifndef COMPILER_TRANSLATOR_GLSL_BUILTINFUNCTIONEMULATORGLSL_H_
#define COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORGLSL_H_ #define COMPILER_TRANSLATOR_GLSL_BUILTINFUNCTIONEMULATORGLSL_H_
#include "GLSLANG/ShaderLang.h" #include "GLSLANG/ShaderLang.h"
@@ -37,4 +37,4 @@ void InitBuiltInFunctionEmulatorForGLSLMissingFunctions(BuiltInFunctionEmulator
int targetGLSLVersion); int targetGLSLVersion);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORGLSL_H_ #endif // COMPILER_TRANSLATOR_GLSL_BUILTINFUNCTIONEMULATORGLSL_H_

View File

@@ -6,9 +6,9 @@
// ExtensionGLSL.cpp: Implements the TExtensionGLSL class that tracks GLSL extension requirements // ExtensionGLSL.cpp: Implements the TExtensionGLSL class that tracks GLSL extension requirements
// of shaders. // of shaders.
#include "compiler/translator/ExtensionGLSL.h" #include "compiler/translator/glsl/ExtensionGLSL.h"
#include "compiler/translator/VersionGLSL.h" #include "compiler/translator/glsl/VersionGLSL.h"
namespace sh namespace sh
{ {

View File

@@ -6,8 +6,8 @@
// ExtensionGLSL.h: Defines the TExtensionGLSL class that tracks GLSL extension requirements of // ExtensionGLSL.h: Defines the TExtensionGLSL class that tracks GLSL extension requirements of
// shaders. // shaders.
#ifndef COMPILER_TRANSLATOR_EXTENSIONGLSL_H_ #ifndef COMPILER_TRANSLATOR_GLSL_EXTENSIONGLSL_H_
#define COMPILER_TRANSLATOR_EXTENSIONGLSL_H_ #define COMPILER_TRANSLATOR_GLSL_EXTENSIONGLSL_H_
#include <set> #include <set>
#include <string> #include <string>
@@ -41,4 +41,4 @@ class TExtensionGLSL : public TIntermTraverser
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_EXTENSIONGLSL_H_ #endif // COMPILER_TRANSLATOR_GLSL_EXTENSIONGLSL_H_

View File

@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/OutputESSL.h" #include "compiler/translator/glsl/OutputESSL.h"
namespace sh namespace sh
{ {

View File

@@ -4,10 +4,10 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_OUTPUTESSL_H_ #ifndef COMPILER_TRANSLATOR_GLSL_OUTPUTESSL_H_
#define COMPILER_TRANSLATOR_OUTPUTESSL_H_ #define COMPILER_TRANSLATOR_GLSL_OUTPUTESSL_H_
#include "compiler/translator/OutputGLSLBase.h" #include "compiler/translator/glsl/OutputGLSLBase.h"
namespace sh namespace sh
{ {
@@ -27,4 +27,4 @@ class TOutputESSL : public TOutputGLSLBase
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_OUTPUTESSL_H_ #endif // COMPILER_TRANSLATOR_GLSL_OUTPUTESSL_H_

View File

@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/OutputGLSL.h" #include "compiler/translator/glsl/OutputGLSL.h"
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"

View File

@@ -4,10 +4,10 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_OUTPUTGLSL_H_ #ifndef COMPILER_TRANSLATOR_GLSL_OUTPUTGLSL_H_
#define COMPILER_TRANSLATOR_OUTPUTGLSL_H_ #define COMPILER_TRANSLATOR_GLSL_OUTPUTGLSL_H_
#include "compiler/translator/OutputGLSLBase.h" #include "compiler/translator/glsl/OutputGLSLBase.h"
namespace sh namespace sh
{ {
@@ -28,4 +28,4 @@ class TOutputGLSL : public TOutputGLSLBase
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_OUTPUTGLSL_H_ #endif // COMPILER_TRANSLATOR_GLSL_OUTPUTGLSL_H_

View File

@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/OutputGLSLBase.h" #include "compiler/translator/glsl/OutputGLSLBase.h"
#include "angle_gl.h" #include "angle_gl.h"
#include "common/debug.h" #include "common/debug.h"

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_OUTPUTGLSLBASE_H_ #ifndef COMPILER_TRANSLATOR_GLSL_OUTPUTGLSLBASE_H_
#define COMPILER_TRANSLATOR_OUTPUTGLSLBASE_H_ #define COMPILER_TRANSLATOR_GLSL_OUTPUTGLSLBASE_H_
#include <set> #include <set>
@@ -151,4 +151,4 @@ void EmitMultiviewGLSL(const TCompiler &,
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_OUTPUTGLSLBASE_H_ #endif // COMPILER_TRANSLATOR_GLSL_OUTPUTGLSLBASE_H_

View File

@@ -4,13 +4,13 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/TranslatorESSL.h" #include "compiler/translator/glsl/TranslatorESSL.h"
#include "angle_gl.h" #include "angle_gl.h"
#include "common/utilities.h" #include "common/utilities.h"
#include "compiler/translator/BuiltInFunctionEmulatorGLSL.h"
#include "compiler/translator/OutputESSL.h"
#include "compiler/translator/StaticType.h" #include "compiler/translator/StaticType.h"
#include "compiler/translator/glsl/BuiltInFunctionEmulatorGLSL.h"
#include "compiler/translator/glsl/OutputESSL.h"
#include "compiler/translator/tree_ops/DeclarePerVertexBlocks.h" #include "compiler/translator/tree_ops/DeclarePerVertexBlocks.h"
#include "compiler/translator/tree_ops/RecordConstantPrecision.h" #include "compiler/translator/tree_ops/RecordConstantPrecision.h"
#include "compiler/translator/tree_util/ReplaceClipCullDistanceVariable.h" #include "compiler/translator/tree_util/ReplaceClipCullDistanceVariable.h"

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORESSL_H_ #ifndef COMPILER_TRANSLATOR_GLSL_TRANSLATORESSL_H_
#define COMPILER_TRANSLATOR_TRANSLATORESSL_H_ #define COMPILER_TRANSLATOR_GLSL_TRANSLATORESSL_H_
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
@@ -32,4 +32,4 @@ class TranslatorESSL : public TCompiler
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORESSL_H_ #endif // COMPILER_TRANSLATOR_GLSL_TRANSLATORESSL_H_

View File

@@ -4,16 +4,16 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/TranslatorGLSL.h" #include "compiler/translator/glsl/TranslatorGLSL.h"
#include "angle_gl.h" #include "angle_gl.h"
#include "compiler/translator/BuiltInFunctionEmulatorGLSL.h" #include "compiler/translator/glsl/BuiltInFunctionEmulatorGLSL.h"
#include "compiler/translator/ExtensionGLSL.h" #include "compiler/translator/glsl/ExtensionGLSL.h"
#include "compiler/translator/OutputGLSL.h" #include "compiler/translator/glsl/OutputGLSL.h"
#include "compiler/translator/VersionGLSL.h" #include "compiler/translator/glsl/VersionGLSL.h"
#include "compiler/translator/tree_ops/RewriteTexelFetchOffset.h" #include "compiler/translator/tree_ops/RewriteTexelFetchOffset.h"
#include "compiler/translator/tree_ops/apple/RewriteRowMajorMatrices.h" #include "compiler/translator/tree_ops/glsl/apple/RewriteRowMajorMatrices.h"
#include "compiler/translator/tree_ops/apple/RewriteUnaryMinusOperatorFloat.h" #include "compiler/translator/tree_ops/glsl/apple/RewriteUnaryMinusOperatorFloat.h"
namespace sh namespace sh
{ {

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORGLSL_H_ #ifndef COMPILER_TRANSLATOR_GLSL_TRANSLATORGLSL_H_
#define COMPILER_TRANSLATOR_TRANSLATORGLSL_H_ #define COMPILER_TRANSLATOR_GLSL_TRANSLATORGLSL_H_
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
@@ -34,4 +34,4 @@ class TranslatorGLSL : public TCompiler
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORGLSL_H_ #endif // COMPILER_TRANSLATOR_GLSL_TRANSLATORGLSL_H_

View File

@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/VersionGLSL.h" #include "compiler/translator/glsl/VersionGLSL.h"
#include "angle_gl.h" #include "angle_gl.h"
#include "compiler/translator/Symbol.h" #include "compiler/translator/Symbol.h"

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_VERSIONGLSL_H_ #ifndef COMPILER_TRANSLATOR_GLSL_VERSIONGLSL_H_
#define COMPILER_TRANSLATOR_VERSIONGLSL_H_ #define COMPILER_TRANSLATOR_GLSL_VERSIONGLSL_H_
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
@@ -73,4 +73,4 @@ class TVersionGLSL : public TIntermTraverser
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_VERSIONGLSL_H_ #endif // COMPILER_TRANSLATOR_GLSL_VERSIONGLSL_H_

View File

@@ -6,7 +6,7 @@
// Analysis of the AST needed for HLSL generation // Analysis of the AST needed for HLSL generation
#include "compiler/translator/ASTMetadataHLSL.h" #include "compiler/translator/hlsl/ASTMetadataHLSL.h"
#include "compiler/translator/CallDAG.h" #include "compiler/translator/CallDAG.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"

View File

@@ -6,8 +6,8 @@
// Defines analyses of the AST needed for HLSL generation // Defines analyses of the AST needed for HLSL generation
#ifndef COMPILER_TRANSLATOR_ASTMETADATAHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_ASTMETADATAHLSL_H_
#define COMPILER_TRANSLATOR_ASTMETADATAHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_ASTMETADATAHLSL_H_
#include <set> #include <set>
#include <vector> #include <vector>
@@ -59,4 +59,4 @@ MetadataList CreateASTMetadataHLSL(TIntermNode *root, const CallDAG &callDag);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_ASTMETADATAHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_ASTMETADATAHLSL_H_

View File

@@ -7,7 +7,7 @@
// output. // output.
// //
#include "compiler/translator/AtomicCounterFunctionHLSL.h" #include "compiler/translator/hlsl/AtomicCounterFunctionHLSL.h"
#include "compiler/translator/Common.h" #include "compiler/translator/Common.h"
#include "compiler/translator/ImmutableStringBuilder.h" #include "compiler/translator/ImmutableStringBuilder.h"

View File

@@ -7,8 +7,8 @@
// output. // output.
// //
#ifndef COMPILER_TRANSLATOR_ATOMICCOUNTERFUNCTIONHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_ATOMICCOUNTERFUNCTIONHLSL_H_
#define COMPILER_TRANSLATOR_ATOMICCOUNTERFUNCTIONHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_ATOMICCOUNTERFUNCTIONHLSL_H_
#include <map> #include <map>
@@ -47,4 +47,4 @@ ImmutableString getAtomicCounterNameForBinding(int binding);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_ATOMICCOUNTERFUNCTIONHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_ATOMICCOUNTERFUNCTIONHLSL_H_

View File

@@ -4,10 +4,9 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/BuiltInFunctionEmulatorHLSL.h" #include "compiler/translator/hlsl/BuiltInFunctionEmulatorHLSL.h"
#include "angle_gl.h" #include "angle_gl.h"
#include "compiler/translator/BuiltInFunctionEmulator.h" #include "compiler/translator/BuiltInFunctionEmulator.h"
#include "compiler/translator/VersionGLSL.h"
#include "compiler/translator/tree_util/BuiltIn.h" #include "compiler/translator/tree_util/BuiltIn.h"
namespace sh namespace sh
@@ -19,7 +18,7 @@ const char *FindHLSLFunction(int uniqueId);
void InitBuiltInIsnanFunctionEmulatorForHLSLWorkarounds(BuiltInFunctionEmulator *emu, void InitBuiltInIsnanFunctionEmulatorForHLSLWorkarounds(BuiltInFunctionEmulator *emu,
int targetGLSLVersion) int targetGLSLVersion)
{ {
if (targetGLSLVersion < GLSL_VERSION_130) if (targetGLSLVersion < 130)
return; return;
emu->addEmulatedFunction(BuiltInId::isnan_Float1, emu->addEmulatedFunction(BuiltInId::isnan_Float1,

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_BUILTINFUNCTIONEMULATORHLSL_H_
#define COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_BUILTINFUNCTIONEMULATORHLSL_H_
#include "GLSLANG/ShaderLang.h" #include "GLSLANG/ShaderLang.h"
@@ -24,4 +24,4 @@ void InitBuiltInIsnanFunctionEmulatorForHLSLWorkarounds(BuiltInFunctionEmulator
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_BUILTINFUNCTIONEMULATORHLSL_H_

View File

@@ -6,9 +6,9 @@
// ImageFunctionHLSL: Class for writing implementations of ESSL image functions into HLSL output. // ImageFunctionHLSL: Class for writing implementations of ESSL image functions into HLSL output.
// //
#include "compiler/translator/ImageFunctionHLSL.h" #include "compiler/translator/hlsl/ImageFunctionHLSL.h"
#include "compiler/translator/ImmutableStringBuilder.h" #include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/UtilsHLSL.h" #include "compiler/translator/hlsl/UtilsHLSL.h"
namespace sh namespace sh
{ {

View File

@@ -6,8 +6,8 @@
// ImageFunctionHLSL: Class for writing implementations of ESSL image functions into HLSL output. // ImageFunctionHLSL: Class for writing implementations of ESSL image functions into HLSL output.
// //
#ifndef COMPILER_TRANSLATOR_IMAGEFUNCTIONHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_IMAGEFUNCTIONHLSL_H_
#define COMPILER_TRANSLATOR_IMAGEFUNCTIONHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_IMAGEFUNCTIONHLSL_H_
#include <set> #include <set>
@@ -93,4 +93,4 @@ class ImageFunctionHLSL final : angle::NonCopyable
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_IMAGEFUNCTIONHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_IMAGEFUNCTIONHLSL_H_

View File

@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/OutputHLSL.h" #include "compiler/translator/hlsl/OutputHLSL.h"
#include <stdio.h> #include <stdio.h>
#include <algorithm> #include <algorithm>
@@ -13,19 +13,19 @@
#include "common/angleutils.h" #include "common/angleutils.h"
#include "common/debug.h" #include "common/debug.h"
#include "common/utilities.h" #include "common/utilities.h"
#include "compiler/translator/AtomicCounterFunctionHLSL.h"
#include "compiler/translator/BuiltInFunctionEmulator.h" #include "compiler/translator/BuiltInFunctionEmulator.h"
#include "compiler/translator/BuiltInFunctionEmulatorHLSL.h"
#include "compiler/translator/ImageFunctionHLSL.h"
#include "compiler/translator/InfoSink.h" #include "compiler/translator/InfoSink.h"
#include "compiler/translator/ResourcesHLSL.h"
#include "compiler/translator/StaticType.h" #include "compiler/translator/StaticType.h"
#include "compiler/translator/StructureHLSL.h"
#include "compiler/translator/TextureFunctionHLSL.h"
#include "compiler/translator/TranslatorHLSL.h"
#include "compiler/translator/UtilsHLSL.h"
#include "compiler/translator/blocklayout.h" #include "compiler/translator/blocklayout.h"
#include "compiler/translator/tree_ops/d3d/RemoveSwitchFallThrough.h" #include "compiler/translator/hlsl/AtomicCounterFunctionHLSL.h"
#include "compiler/translator/hlsl/BuiltInFunctionEmulatorHLSL.h"
#include "compiler/translator/hlsl/ImageFunctionHLSL.h"
#include "compiler/translator/hlsl/ResourcesHLSL.h"
#include "compiler/translator/hlsl/StructureHLSL.h"
#include "compiler/translator/hlsl/TextureFunctionHLSL.h"
#include "compiler/translator/hlsl/TranslatorHLSL.h"
#include "compiler/translator/hlsl/UtilsHLSL.h"
#include "compiler/translator/tree_ops/hlsl/RemoveSwitchFallThrough.h"
#include "compiler/translator/tree_util/FindSymbolNode.h" #include "compiler/translator/tree_util/FindSymbolNode.h"
#include "compiler/translator/tree_util/NodeSearch.h" #include "compiler/translator/tree_util/NodeSearch.h"
#include "compiler/translator/util.h" #include "compiler/translator/util.h"

View File

@@ -4,19 +4,19 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_OUTPUTHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_OUTPUTHLSL_H_
#define COMPILER_TRANSLATOR_OUTPUTHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_OUTPUTHLSL_H_
#include <list> #include <list>
#include <map> #include <map>
#include <stack> #include <stack>
#include "angle_gl.h" #include "angle_gl.h"
#include "compiler/translator/ASTMetadataHLSL.h"
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
#include "compiler/translator/FlagStd140Structs.h" #include "compiler/translator/FlagStd140Structs.h"
#include "compiler/translator/ImmutableString.h" #include "compiler/translator/ImmutableString.h"
#include "compiler/translator/ShaderStorageBlockOutputHLSL.h" #include "compiler/translator/hlsl/ASTMetadataHLSL.h"
#include "compiler/translator/hlsl/ShaderStorageBlockOutputHLSL.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
class BuiltInFunctionEmulator; class BuiltInFunctionEmulator;
@@ -312,4 +312,4 @@ class OutputHLSL : public TIntermTraverser
}; };
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_OUTPUTHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_OUTPUTHLSL_H_

View File

@@ -7,14 +7,14 @@
// Methods for GLSL to HLSL translation for uniforms and interface blocks. // Methods for GLSL to HLSL translation for uniforms and interface blocks.
// //
#include "compiler/translator/ResourcesHLSL.h" #include "compiler/translator/hlsl/ResourcesHLSL.h"
#include "common/utilities.h" #include "common/utilities.h"
#include "compiler/translator/AtomicCounterFunctionHLSL.h"
#include "compiler/translator/ImmutableStringBuilder.h" #include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/StructureHLSL.h" #include "compiler/translator/hlsl/AtomicCounterFunctionHLSL.h"
#include "compiler/translator/UtilsHLSL.h" #include "compiler/translator/hlsl/StructureHLSL.h"
#include "compiler/translator/blocklayoutHLSL.h" #include "compiler/translator/hlsl/UtilsHLSL.h"
#include "compiler/translator/hlsl/blocklayoutHLSL.h"
#include "compiler/translator/util.h" #include "compiler/translator/util.h"
namespace sh namespace sh

View File

@@ -7,11 +7,11 @@
// Methods for GLSL to HLSL translation for uniforms and interface blocks. // Methods for GLSL to HLSL translation for uniforms and interface blocks.
// //
#ifndef COMPILER_TRANSLATOR_RESOURCESHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_RESOURCESHLSL_H_
#define COMPILER_TRANSLATOR_RESOURCESHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_RESOURCESHLSL_H_
#include "compiler/translator/OutputHLSL.h" #include "compiler/translator/hlsl/OutputHLSL.h"
#include "compiler/translator/UtilsHLSL.h" #include "compiler/translator/hlsl/UtilsHLSL.h"
namespace sh namespace sh
{ {
@@ -152,4 +152,4 @@ class ResourcesHLSL : angle::NonCopyable
}; };
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_RESOURCESHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_RESOURCESHLSL_H_

View File

@@ -6,12 +6,12 @@
// ShaderStorageBlockFunctionHLSL: Wrapper functions for RWByteAddressBuffer Load/Store functions. // ShaderStorageBlockFunctionHLSL: Wrapper functions for RWByteAddressBuffer Load/Store functions.
// //
#include "compiler/translator/ShaderStorageBlockFunctionHLSL.h" #include "compiler/translator/hlsl/ShaderStorageBlockFunctionHLSL.h"
#include "common/utilities.h" #include "common/utilities.h"
#include "compiler/translator/UtilsHLSL.h"
#include "compiler/translator/blocklayout.h" #include "compiler/translator/blocklayout.h"
#include "compiler/translator/blocklayoutHLSL.h" #include "compiler/translator/hlsl/UtilsHLSL.h"
#include "compiler/translator/hlsl/blocklayoutHLSL.h"
#include "compiler/translator/util.h" #include "compiler/translator/util.h"
namespace sh namespace sh

View File

@@ -23,8 +23,8 @@
// | ssbo_structure_access // | ssbo_structure_access
// //
#ifndef COMPILER_TRANSLATOR_SHADERSTORAGEBLOCKFUNCTIONHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_SHADERSTORAGEBLOCKFUNCTIONHLSL_H_
#define COMPILER_TRANSLATOR_SHADERSTORAGEBLOCKFUNCTIONHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_SHADERSTORAGEBLOCKFUNCTIONHLSL_H_
#include <set> #include <set>
@@ -91,4 +91,4 @@ class ShaderStorageBlockFunctionHLSL final : angle::NonCopyable
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_SHADERSTORAGEBLOCKFUNCTIONHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_SHADERSTORAGEBLOCKFUNCTIONHLSL_H_

View File

@@ -23,10 +23,10 @@
// | ssbo_structure_access // | ssbo_structure_access
// //
#include "compiler/translator/ShaderStorageBlockOutputHLSL.h" #include "compiler/translator/hlsl/ShaderStorageBlockOutputHLSL.h"
#include "compiler/translator/ResourcesHLSL.h" #include "compiler/translator/hlsl/ResourcesHLSL.h"
#include "compiler/translator/blocklayoutHLSL.h" #include "compiler/translator/hlsl/blocklayoutHLSL.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/util.h" #include "compiler/translator/util.h"

View File

@@ -7,12 +7,12 @@
// to an offset of RWByteAddressBuffer. // to an offset of RWByteAddressBuffer.
// //
#ifndef COMPILER_TRANSLATOR_SHADERSTORAGEBLOCKOUTPUTHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_SHADERSTORAGEBLOCKOUTPUTHLSL_H_
#define COMPILER_TRANSLATOR_SHADERSTORAGEBLOCKOUTPUTHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_SHADERSTORAGEBLOCKOUTPUTHLSL_H_
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
#include "compiler/translator/ShaderStorageBlockFunctionHLSL.h"
#include "compiler/translator/blocklayout.h" #include "compiler/translator/blocklayout.h"
#include "compiler/translator/hlsl/ShaderStorageBlockFunctionHLSL.h"
namespace sh namespace sh
{ {
@@ -83,4 +83,4 @@ class ShaderStorageBlockOutputHLSL
}; };
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_SHADERSTORAGEBLOCKOUTPUTHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_SHADERSTORAGEBLOCKOUTPUTHLSL_H_

View File

@@ -7,11 +7,11 @@
// HLSL translation of GLSL constructors and structures. // HLSL translation of GLSL constructors and structures.
// //
#include "compiler/translator/StructureHLSL.h" #include "compiler/translator/hlsl/StructureHLSL.h"
#include "common/utilities.h" #include "common/utilities.h"
#include "compiler/translator/OutputHLSL.h"
#include "compiler/translator/Types.h" #include "compiler/translator/Types.h"
#include "compiler/translator/UtilsHLSL.h" #include "compiler/translator/hlsl/OutputHLSL.h"
#include "compiler/translator/hlsl/UtilsHLSL.h"
#include "compiler/translator/util.h" #include "compiler/translator/util.h"
namespace sh namespace sh
@@ -29,7 +29,7 @@ TString Define(const TStructure &structure,
const TFieldList &fields = structure.fields(); const TFieldList &fields = structure.fields();
const bool isNameless = (structure.symbolType() == SymbolType::Empty); const bool isNameless = (structure.symbolType() == SymbolType::Empty);
const TString &structName = QualifiedStructNameString(structure, useHLSLRowMajorPacking, const TString &structName = QualifiedStructNameString(structure, useHLSLRowMajorPacking,
useStd140Packing, forcePadding); useStd140Packing, forcePadding);
const TString declareString = (isNameless ? "struct" : "struct " + structName); const TString declareString = (isNameless ? "struct" : "struct " + structName);
TString string; TString string;

View File

@@ -7,8 +7,8 @@
// HLSL translation of GLSL constructors and structures. // HLSL translation of GLSL constructors and structures.
// //
#ifndef COMPILER_TRANSLATOR_STRUCTUREHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_STRUCTUREHLSL_H_
#define COMPILER_TRANSLATOR_STRUCTUREHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_STRUCTUREHLSL_H_
#include "compiler/translator/Common.h" #include "compiler/translator/Common.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
@@ -99,4 +99,4 @@ class StructureHLSL : angle::NonCopyable
}; };
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_STRUCTUREHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_STRUCTUREHLSL_H_

View File

@@ -9,10 +9,10 @@
// behavior. // behavior.
// //
#include "compiler/translator/TextureFunctionHLSL.h" #include "compiler/translator/hlsl/TextureFunctionHLSL.h"
#include "compiler/translator/ImmutableStringBuilder.h" #include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/UtilsHLSL.h" #include "compiler/translator/hlsl/UtilsHLSL.h"
namespace sh namespace sh
{ {

View File

@@ -9,8 +9,8 @@
// behavior. // behavior.
// //
#ifndef COMPILER_TRANSLATOR_TEXTUREFUNCTIONHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_TEXTUREFUNCTIONHLSL_H_
#define COMPILER_TRANSLATOR_TEXTUREFUNCTIONHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_TEXTUREFUNCTIONHLSL_H_
#include <set> #include <set>
@@ -74,4 +74,4 @@ class TextureFunctionHLSL final : angle::NonCopyable
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TEXTUREFUNCTIONHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_TEXTUREFUNCTIONHLSL_H_

View File

@@ -4,29 +4,29 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/TranslatorHLSL.h" #include "compiler/translator/hlsl/TranslatorHLSL.h"
#include "compiler/translator/OutputHLSL.h" #include "compiler/translator/hlsl/OutputHLSL.h"
#include "compiler/translator/tree_ops/RemoveDynamicIndexing.h" #include "compiler/translator/tree_ops/RemoveDynamicIndexing.h"
#include "compiler/translator/tree_ops/RewriteTexelFetchOffset.h" #include "compiler/translator/tree_ops/RewriteTexelFetchOffset.h"
#include "compiler/translator/tree_ops/SimplifyLoopConditions.h" #include "compiler/translator/tree_ops/SimplifyLoopConditions.h"
#include "compiler/translator/tree_ops/SplitSequenceOperator.h" #include "compiler/translator/tree_ops/SplitSequenceOperator.h"
#include "compiler/translator/tree_ops/d3d/AddDefaultReturnStatements.h" #include "compiler/translator/tree_ops/hlsl/AddDefaultReturnStatements.h"
#include "compiler/translator/tree_ops/d3d/AggregateAssignArraysInSSBOs.h" #include "compiler/translator/tree_ops/hlsl/AggregateAssignArraysInSSBOs.h"
#include "compiler/translator/tree_ops/d3d/AggregateAssignStructsInSSBOs.h" #include "compiler/translator/tree_ops/hlsl/AggregateAssignStructsInSSBOs.h"
#include "compiler/translator/tree_ops/d3d/ArrayReturnValueToOutParameter.h" #include "compiler/translator/tree_ops/hlsl/ArrayReturnValueToOutParameter.h"
#include "compiler/translator/tree_ops/d3d/BreakVariableAliasingInInnerLoops.h" #include "compiler/translator/tree_ops/hlsl/BreakVariableAliasingInInnerLoops.h"
#include "compiler/translator/tree_ops/d3d/ExpandIntegerPowExpressions.h" #include "compiler/translator/tree_ops/hlsl/ExpandIntegerPowExpressions.h"
#include "compiler/translator/tree_ops/d3d/RecordUniformBlocksWithLargeArrayMember.h" #include "compiler/translator/tree_ops/hlsl/RecordUniformBlocksWithLargeArrayMember.h"
#include "compiler/translator/tree_ops/d3d/RewriteAtomicFunctionExpressions.h" #include "compiler/translator/tree_ops/hlsl/RewriteAtomicFunctionExpressions.h"
#include "compiler/translator/tree_ops/d3d/RewriteElseBlocks.h" #include "compiler/translator/tree_ops/hlsl/RewriteElseBlocks.h"
#include "compiler/translator/tree_ops/d3d/RewriteExpressionsWithShaderStorageBlock.h" #include "compiler/translator/tree_ops/hlsl/RewriteExpressionsWithShaderStorageBlock.h"
#include "compiler/translator/tree_ops/d3d/RewriteUnaryMinusOperatorInt.h" #include "compiler/translator/tree_ops/hlsl/RewriteUnaryMinusOperatorInt.h"
#include "compiler/translator/tree_ops/d3d/SeparateArrayConstructorStatements.h" #include "compiler/translator/tree_ops/hlsl/SeparateArrayConstructorStatements.h"
#include "compiler/translator/tree_ops/d3d/SeparateArrayInitialization.h" #include "compiler/translator/tree_ops/hlsl/SeparateArrayInitialization.h"
#include "compiler/translator/tree_ops/d3d/SeparateExpressionsReturningArrays.h" #include "compiler/translator/tree_ops/hlsl/SeparateExpressionsReturningArrays.h"
#include "compiler/translator/tree_ops/d3d/UnfoldShortCircuitToIf.h" #include "compiler/translator/tree_ops/hlsl/UnfoldShortCircuitToIf.h"
#include "compiler/translator/tree_ops/d3d/WrapSwitchStatementsInBlocks.h" #include "compiler/translator/tree_ops/hlsl/WrapSwitchStatementsInBlocks.h"
#include "compiler/translator/tree_util/IntermNodePatternMatcher.h" #include "compiler/translator/tree_util/IntermNodePatternMatcher.h"
namespace sh namespace sh

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_TRANSLATORHLSL_H_
#define COMPILER_TRANSLATOR_TRANSLATORHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_TRANSLATORHLSL_H_
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
@@ -50,4 +50,4 @@ class TranslatorHLSL : public TCompiler
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_TRANSLATORHLSL_H_

View File

@@ -7,12 +7,12 @@
// Utility methods for GLSL to HLSL translation. // Utility methods for GLSL to HLSL translation.
// //
#include "compiler/translator/UtilsHLSL.h" #include "compiler/translator/hlsl/UtilsHLSL.h"
#include "common/utilities.h" #include "common/utilities.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
#include "compiler/translator/StructureHLSL.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
#include "compiler/translator/hlsl/StructureHLSL.h"
#include "compiler/translator/util.h" #include "compiler/translator/util.h"
namespace sh namespace sh

View File

@@ -7,8 +7,8 @@
// Utility methods for GLSL to HLSL translation. // Utility methods for GLSL to HLSL translation.
// //
#ifndef COMPILER_TRANSLATOR_UTILSHLSL_H_ #ifndef COMPILER_TRANSLATOR_HLSL_UTILSHLSL_H_
#define COMPILER_TRANSLATOR_UTILSHLSL_H_ #define COMPILER_TRANSLATOR_HLSL_UTILSHLSL_H_
#include <vector> #include <vector>
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
@@ -145,4 +145,4 @@ TString DisambiguateFunctionName(const TFunction *func);
TString DisambiguateFunctionName(const TIntermSequence *args); TString DisambiguateFunctionName(const TIntermSequence *args);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_UTILSHLSL_H_ #endif // COMPILER_TRANSLATOR_HLSL_UTILSHLSL_H_

View File

@@ -7,7 +7,7 @@
// Implementation for block layout classes and methods. // Implementation for block layout classes and methods.
// //
#include "compiler/translator/blocklayoutHLSL.h" #include "compiler/translator/hlsl/blocklayoutHLSL.h"
#include "common/mathutil.h" #include "common/mathutil.h"
#include "common/utilities.h" #include "common/utilities.h"

View File

@@ -15,7 +15,7 @@
#include <GLSLANG/ShaderLang.h> #include <GLSLANG/ShaderLang.h>
#include "angle_gl.h" #include "angle_gl.h"
#include "blocklayout.h" #include "compiler/translator/blocklayout.h"
namespace sh namespace sh
{ {

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TREEUTIL_INTERMASNODE_H_ #ifndef COMPILER_TRANSLATOR_MSL_ASNODE_H_
#define COMPILER_TRANSLATOR_TREEUTIL_INTERMASNODE_H_ #define COMPILER_TRANSLATOR_MSL_ASNODE_H_
#include "common/angleutils.h" #include "common/angleutils.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
@@ -209,4 +209,4 @@ ANGLE_INLINE T *asNode(TIntermNode *node)
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TREEUTIL_INTERMASNODE_H_ #endif // COMPILER_TRANSLATOR_MSL_ASNODE_H_

View File

@@ -9,7 +9,7 @@
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include "compiler/translator/TranslatorMetalDirect/AstHelpers.h" #include "compiler/translator/msl/AstHelpers.h"
using namespace sh; using namespace sh;
@@ -193,7 +193,7 @@ const TFunction &sh::CloneFunctionAndChangeReturnType(TSymbolTable &symbolTable,
TType *newReturnType = new TType(&newReturn, true); TType *newReturnType = new TType(&newReturn, true);
TFunction &newFunc = *new TFunction(&symbolTable, newName.rawName(), newName.symbolType(), TFunction &newFunc = *new TFunction(&symbolTable, newName.rawName(), newName.symbolType(),
newReturnType, oldFunc.isKnownToNotHaveSideEffects()); newReturnType, oldFunc.isKnownToNotHaveSideEffects());
AcquireFunctionExtras(newFunc, oldFunc); AcquireFunctionExtras(newFunc, oldFunc);
AddParametersFrom(newFunc, oldFunc); AddParametersFrom(newFunc, oldFunc);

View File

@@ -4,16 +4,16 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_ASTHELPERS_H_ #ifndef COMPILER_TRANSLATOR_MSL_ASTHELPERS_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_ASTHELPERS_H_ #define COMPILER_TRANSLATOR_MSL_ASTHELPERS_H_
#include <cstring> #include <cstring>
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include "compiler/translator/TranslatorMetalDirect/IdGen.h" #include "compiler/translator/msl/IdGen.h"
#include "compiler/translator/TranslatorMetalDirect/Name.h" #include "compiler/translator/msl/Name.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h" #include "compiler/translator/msl/SymbolEnv.h"
namespace sh namespace sh
{ {
@@ -164,4 +164,4 @@ TIntermTyped &AsType(SymbolEnv &symbolEnv, const TType &toType, TIntermTyped &fr
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_ASTHELPERS_H_ #endif // COMPILER_TRANSLATOR_MSL_ASTHELPERS_H_

View File

@@ -8,9 +8,9 @@
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include "compiler/translator/TranslatorMetalDirect/DiscoverDependentFunctions.h" #include "compiler/translator/msl/DiscoverDependentFunctions.h"
#include "compiler/translator/TranslatorMetalDirect/DiscoverEnclosingFunctionTraverser.h" #include "compiler/translator/msl/DiscoverEnclosingFunctionTraverser.h"
#include "compiler/translator/TranslatorMetalDirect/MapFunctionsToDefinitions.h" #include "compiler/translator/msl/MapFunctionsToDefinitions.h"
using namespace sh; using namespace sh;

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_DISCOVERDEPENDENTFUNCTIONS_H_ #ifndef COMPILER_TRANSLATOR_MSL_DISCOVERDEPENDENTFUNCTIONS_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_DISCOVERDEPENDENTFUNCTIONS_H_ #define COMPILER_TRANSLATOR_MSL_DISCOVERDEPENDENTFUNCTIONS_H_
#include <functional> #include <functional>
#include <unordered_set> #include <unordered_set>
@@ -23,4 +23,4 @@ namespace sh
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_DISCOVERDEPENDENTFUNCTIONS_H_ #endif // COMPILER_TRANSLATOR_MSL_DISCOVERDEPENDENTFUNCTIONS_H_

View File

@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/TranslatorMetalDirect/DiscoverEnclosingFunctionTraverser.h" #include "compiler/translator/msl/DiscoverEnclosingFunctionTraverser.h"
using namespace sh; using namespace sh;

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_DISCOVERENCLOSINGFUNCTIONTRAVERSER_H_ #ifndef COMPILER_TRANSLATOR_MSL_DISCOVERENCLOSINGFUNCTIONTRAVERSER_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_DISCOVERENCLOSINGFUNCTIONTRAVERSER_H_ #define COMPILER_TRANSLATOR_MSL_DISCOVERENCLOSINGFUNCTIONTRAVERSER_H_
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
@@ -28,4 +28,4 @@ class DiscoverEnclosingFunctionTraverser : public TIntermTraverser
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_DISCOVERENCLOSINGFUNCTIONTRAVERSER_H_ #endif // COMPILER_TRANSLATOR_MSL_DISCOVERENCLOSINGFUNCTIONTRAVERSER_H_

View File

@@ -7,7 +7,7 @@
// Struct defining the default driver uniforms for direct and SpirV based ANGLE translation // Struct defining the default driver uniforms for direct and SpirV based ANGLE translation
// //
#include "compiler/translator/DriverUniformMetal.h" #include "compiler/translator/msl/DriverUniformMetal.h"
#include "compiler/translator/tree_util/BuiltIn.h" #include "compiler/translator/tree_util/BuiltIn.h"
#include "compiler/translator/tree_util/DriverUniform.h" #include "compiler/translator/tree_util/DriverUniform.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"

View File

@@ -7,8 +7,8 @@
// Struct defining the default driver uniforms for direct and SpirV based ANGLE translation // Struct defining the default driver uniforms for direct and SpirV based ANGLE translation
// //
#ifndef LIBANGLE_RENDERER_METAL_DRIVERUNIFORMMETAL_H_ #ifndef COMPILER_TRANSLATOR_MSL_DRIVERUNIFORMMETAL_H_
#define LIBANGLE_RENDERER_METAL_DRIVERUNIFORMMETAL_H_ #define COMPILER_TRANSLATOR_MSL_DRIVERUNIFORMMETAL_H_
#include "compiler/translator/tree_util/DriverUniform.h" #include "compiler/translator/tree_util/DriverUniform.h"
@@ -30,4 +30,4 @@ class DriverUniformMetal : public DriverUniformExtended
} // namespace sh } // namespace sh
#endif /* LIBANGLE_RENDERER_METAL_DRIVERUNIFORMMETAL_H_ */ #endif // COMPILER_TRANSLATOR_MSL_DRIVERUNIFORMMETAL_H_

View File

@@ -11,14 +11,14 @@
#include "compiler/translator/BaseTypes.h" #include "compiler/translator/BaseTypes.h"
#include "compiler/translator/ImmutableStringBuilder.h" #include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
#include "compiler/translator/TranslatorMetalDirect.h" #include "compiler/translator/msl/AstHelpers.h"
#include "compiler/translator/TranslatorMetalDirect/AstHelpers.h" #include "compiler/translator/msl/DebugSink.h"
#include "compiler/translator/TranslatorMetalDirect/DebugSink.h" #include "compiler/translator/msl/EmitMetal.h"
#include "compiler/translator/TranslatorMetalDirect/EmitMetal.h" #include "compiler/translator/msl/Layout.h"
#include "compiler/translator/TranslatorMetalDirect/Layout.h" #include "compiler/translator/msl/Name.h"
#include "compiler/translator/TranslatorMetalDirect/Name.h" #include "compiler/translator/msl/ProgramPrelude.h"
#include "compiler/translator/TranslatorMetalDirect/ProgramPrelude.h" #include "compiler/translator/msl/RewritePipelines.h"
#include "compiler/translator/TranslatorMetalDirect/RewritePipelines.h" #include "compiler/translator/msl/TranslatorMSL.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
using namespace sh; using namespace sh;

View File

@@ -4,15 +4,15 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_EMITMETAL_H_ #ifndef COMPILER_TRANSLATOR_MSL_EMITMETAL_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_EMITMETAL_H_ #define COMPILER_TRANSLATOR_MSL_EMITMETAL_H_
#include "common/angleutils.h" #include "common/angleutils.h"
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
#include "compiler/translator/TranslatorMetalDirect/IdGen.h" #include "compiler/translator/msl/IdGen.h"
#include "compiler/translator/TranslatorMetalDirect/ProgramPrelude.h" #include "compiler/translator/msl/ProgramPrelude.h"
#include "compiler/translator/TranslatorMetalDirect/RewritePipelines.h" #include "compiler/translator/msl/RewritePipelines.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h" #include "compiler/translator/msl/SymbolEnv.h"
namespace sh namespace sh
{ {
@@ -28,4 +28,4 @@ namespace sh
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_EMITMETAL_H_ #endif // COMPILER_TRANSLATOR_MSL_EMITMETAL_H_

View File

@@ -10,7 +10,7 @@
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include "compiler/translator/TranslatorMetalDirect/IdGen.h" #include "compiler/translator/msl/IdGen.h"
using namespace sh; using namespace sh;

View File

@@ -4,11 +4,11 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_IDGEN_H_ #ifndef COMPILER_TRANSLATOR_MSL_IDGEN_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_IDGEN_H_ #define COMPILER_TRANSLATOR_MSL_IDGEN_H_
#include "common/angleutils.h" #include "common/angleutils.h"
#include "compiler/translator/TranslatorMetalDirect/Name.h" #include "compiler/translator/msl/Name.h"
namespace sh namespace sh
{ {
@@ -39,4 +39,4 @@ class IdGen : angle::NonCopyable
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_IDGEN_H_ #endif // COMPILER_TRANSLATOR_MSL_IDGEN_H_

View File

@@ -8,8 +8,8 @@
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/AsNode.h" #include "compiler/translator/msl/AsNode.h"
#include "compiler/translator/tree_util/IntermRebuild.h" #include "compiler/translator/msl/IntermRebuild.h"
#define GUARD2(cond, failVal) \ #define GUARD2(cond, failVal) \
do \ do \

View File

@@ -4,11 +4,11 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_INTERMREBUILD_H_ #ifndef COMPILER_TRANSLATOR_MSL_INTERMREBUILD_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_INTERMREBUILD_H_ #define COMPILER_TRANSLATOR_MSL_INTERMREBUILD_H_
#include "compiler/translator/msl/NodeType.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
#include "compiler/translator/tree_util/NodeType.h"
namespace sh namespace sh
{ {
@@ -325,4 +325,4 @@ class TIntermRebuild : angle::NonCopyable
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_INTERMREBUILD_H_ #endif // COMPILER_TRANSLATOR_MSL_INTERMREBUILD_H_

View File

@@ -12,7 +12,7 @@
#include <unordered_set> #include <unordered_set>
#include "compiler/translator/Symbol.h" #include "compiler/translator/Symbol.h"
#include "compiler/translator/TranslatorMetalDirect/Layout.h" #include "compiler/translator/msl/Layout.h"
using namespace sh; using namespace sh;

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_LAYOUT_H_ #ifndef COMPILER_TRANSLATOR_MSL_LAYOUT_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_LAYOUT_H_ #define COMPILER_TRANSLATOR_MSL_LAYOUT_H_
#include "common/angleutils.h" #include "common/angleutils.h"
#include "compiler/translator/Types.h" #include "compiler/translator/Types.h"
@@ -86,4 +86,4 @@ struct MetalLayoutOfConfig
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_LAYOUT_H_ #endif // COMPILER_TRANSLATOR_MSL_LAYOUT_H_

View File

@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/TranslatorMetalDirect/MapFunctionsToDefinitions.h" #include "compiler/translator/msl/MapFunctionsToDefinitions.h"
#include "compiler/translator/Symbol.h" #include "compiler/translator/Symbol.h"
using namespace sh; using namespace sh;

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_MAPFUNCTIONSTODEFINITIONS_H_ #ifndef COMPILER_TRANSLATOR_MSL_MAPFUNCTIONSTODEFINITIONS_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_MAPFUNCTIONSTODEFINITIONS_H_ #define COMPILER_TRANSLATOR_MSL_MAPFUNCTIONSTODEFINITIONS_H_
#include <unordered_map> #include <unordered_map>
@@ -22,4 +22,4 @@ using FunctionToDefinition = std::unordered_map<const TFunction *, TIntermFuncti
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_MAPFUNCTIONSTODEFINITIONS_H_ #endif // COMPILER_TRANSLATOR_MSL_MAPFUNCTIONSTODEFINITIONS_H_

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/TranslatorMetalDirect/MapSymbols.h" #include "compiler/translator/msl/MapSymbols.h"
#include "compiler/translator/tree_util/IntermRebuild.h" #include "compiler/translator/msl/IntermRebuild.h"
using namespace sh; using namespace sh;

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_MAPVARIABLESTOMEMBERACCESS_H_ #ifndef COMPILER_TRANSLATOR_MSL_MAPVARIABLESTOMEMBERACCESS_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_MAPVARIABLESTOMEMBERACCESS_H_ #define COMPILER_TRANSLATOR_MSL_MAPVARIABLESTOMEMBERACCESS_H_
#include <functional> #include <functional>
@@ -23,4 +23,4 @@ namespace sh
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_MAPVARIABLESTOMEMBERACCESS_H_ #endif // COMPILER_TRANSLATOR_MSL_MAPVARIABLESTOMEMBERACCESS_H_

View File

@@ -12,9 +12,9 @@
#include <unordered_set> #include <unordered_set>
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
#include "compiler/translator/TranslatorMetalDirect.h" #include "compiler/translator/msl/AstHelpers.h"
#include "compiler/translator/TranslatorMetalDirect/AstHelpers.h" #include "compiler/translator/msl/ModifyStruct.h"
#include "compiler/translator/TranslatorMetalDirect/ModifyStruct.h" #include "compiler/translator/msl/TranslatorMSL.h"
using namespace sh; using namespace sh;

View File

@@ -4,19 +4,19 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_MODIFYSTRUCT_H_ #ifndef COMPILER_TRANSLATOR_MSL_MODIFYSTRUCT_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_MODIFYSTRUCT_H_ #define COMPILER_TRANSLATOR_MSL_MODIFYSTRUCT_H_
#include <cstring> #include <cstring>
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
#include "compiler/translator/TranslatorMetalDirect/IdGen.h" #include "compiler/translator/msl/IdGen.h"
#include "compiler/translator/TranslatorMetalDirect/Layout.h" #include "compiler/translator/msl/Layout.h"
#include "compiler/translator/TranslatorMetalDirect/Name.h" #include "compiler/translator/msl/Name.h"
#include "compiler/translator/TranslatorMetalDirect/ProgramPrelude.h" #include "compiler/translator/msl/ProgramPrelude.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h" #include "compiler/translator/msl/SymbolEnv.h"
namespace sh namespace sh
{ {
@@ -136,4 +136,4 @@ bool TryCreateModifiedStruct(TCompiler &compiler,
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_MODIFYSTRUCT_H_ #endif // COMPILER_TRANSLATOR_MSL_MODIFYSTRUCT_H_

View File

@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/TranslatorMetalDirect/Name.h" #include "compiler/translator/msl/Name.h"
#include "common/debug.h" #include "common/debug.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_NAME_H_ #ifndef COMPILER_TRANSLATOR_MSL_NAME_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_NAME_H_ #define COMPILER_TRANSLATOR_MSL_NAME_H_
#include "compiler/translator/ImmutableString.h" #include "compiler/translator/ImmutableString.h"
#include "compiler/translator/InfoSink.h" #include "compiler/translator/InfoSink.h"
@@ -67,4 +67,4 @@ constexpr Name kBaseInstanceName = Name("baseInstance");
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_NAME_H_ #endif // COMPILER_TRANSLATOR_MSL_NAME_H_

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_NODETYPE_H_ #ifndef COMPILER_TRANSLATOR_MSL_NODETYPE_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_NODETYPE_H_ #define COMPILER_TRANSLATOR_MSL_NODETYPE_H_
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
@@ -152,4 +152,4 @@ class GetNodeType : private TIntermTraverser
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_NODETYPE_H_ #endif // COMPILER_TRANSLATOR_MSL_NODETYPE_H_

View File

@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/TranslatorMetalDirect/Pipeline.h" #include "compiler/translator/msl/Pipeline.h"
#include "compiler/translator/tree_util/BuiltIn.h" #include "compiler/translator/tree_util/BuiltIn.h"
using namespace sh; using namespace sh;

View File

@@ -4,13 +4,13 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_PIPELINE_H_ #ifndef COMPILER_TRANSLATOR_MSL_PIPELINE_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_PIPELINE_H_ #define COMPILER_TRANSLATOR_MSL_PIPELINE_H_
#include "compiler/translator/Symbol.h" #include "compiler/translator/Symbol.h"
#include "compiler/translator/TranslatorMetalDirect/ModifyStruct.h" #include "compiler/translator/msl/ModifyStruct.h"
#include "compiler/translator/TranslatorMetalDirect/Name.h" #include "compiler/translator/msl/Name.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h" #include "compiler/translator/msl/SymbolEnv.h"
namespace sh namespace sh
{ {
@@ -128,4 +128,4 @@ struct PipelineStructs : angle::NonCopyable
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_PIPELINE_H_ #endif // COMPILER_TRANSLATOR_MSL_PIPELINE_H_

View File

@@ -8,9 +8,9 @@
#include "compiler/translator/InfoSink.h" #include "compiler/translator/InfoSink.h"
#include "compiler/translator/Symbol.h" #include "compiler/translator/Symbol.h"
#include "compiler/translator/TranslatorMetalDirect/AstHelpers.h" #include "compiler/translator/msl/AstHelpers.h"
#include "compiler/translator/TranslatorMetalDirect/Name.h" #include "compiler/translator/msl/Name.h"
#include "compiler/translator/TranslatorMetalDirect/ProgramPrelude.h" #include "compiler/translator/msl/ProgramPrelude.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
using namespace sh; using namespace sh;

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_PROGRAMPRELUDE_H_ #ifndef COMPILER_TRANSLATOR_MSL_PROGRAMPRELUDE_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_PROGRAMPRELUDE_H_ #define COMPILER_TRANSLATOR_MSL_PROGRAMPRELUDE_H_
#include <unordered_set> #include <unordered_set>
@@ -45,4 +45,4 @@ struct ProgramPreludeConfig
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_PROGRAMPRELUDE_H_ #endif // COMPILER_TRANSLATOR_MSL_PROGRAMPRELUDE_H_

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_REFERENCE_H_ #ifndef COMPILER_TRANSLATOR_MSL_REFERENCE_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_REFERENCE_H_ #define COMPILER_TRANSLATOR_MSL_REFERENCE_H_
namespace sh namespace sh
{ {
@@ -44,4 +44,4 @@ using CRef = Ref<T const>;
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_REFERENCE_H_ #endif // COMPILER_TRANSLATOR_MSL_REFERENCE_H_

View File

@@ -8,18 +8,18 @@
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include "compiler/translator/TranslatorMetalDirect.h" #include "compiler/translator/msl/AstHelpers.h"
#include "compiler/translator/TranslatorMetalDirect/AstHelpers.h" #include "compiler/translator/msl/DiscoverDependentFunctions.h"
#include "compiler/translator/TranslatorMetalDirect/DiscoverDependentFunctions.h" #include "compiler/translator/msl/IdGen.h"
#include "compiler/translator/TranslatorMetalDirect/IdGen.h" #include "compiler/translator/msl/IntermRebuild.h"
#include "compiler/translator/TranslatorMetalDirect/MapSymbols.h" #include "compiler/translator/msl/MapSymbols.h"
#include "compiler/translator/TranslatorMetalDirect/Pipeline.h" #include "compiler/translator/msl/Pipeline.h"
#include "compiler/translator/TranslatorMetalDirect/RewritePipelines.h" #include "compiler/translator/msl/RewritePipelines.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h" #include "compiler/translator/msl/SymbolEnv.h"
#include "compiler/translator/msl/TranslatorMSL.h"
#include "compiler/translator/tree_ops/PruneNoOps.h" #include "compiler/translator/tree_ops/PruneNoOps.h"
#include "compiler/translator/tree_util/DriverUniform.h" #include "compiler/translator/tree_util/DriverUniform.h"
#include "compiler/translator/tree_util/FindMain.h" #include "compiler/translator/tree_util/FindMain.h"
#include "compiler/translator/tree_util/IntermRebuild.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
using namespace sh; using namespace sh;

View File

@@ -4,17 +4,18 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_REWRITEPIPELINES_H_ #ifndef COMPILER_TRANSLATOR_MSL_REWRITEPIPELINES_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_REWRITEPIPELINES_H_ #define COMPILER_TRANSLATOR_MSL_REWRITEPIPELINES_H_
#include "common/angleutils.h" #include "common/angleutils.h"
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
#include "compiler/translator/TranslatorMetalDirect/IdGen.h" #include "compiler/translator/msl/IdGen.h"
#include "compiler/translator/TranslatorMetalDirect/Pipeline.h" #include "compiler/translator/msl/Pipeline.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h" #include "compiler/translator/msl/SymbolEnv.h"
namespace sh namespace sh
{ {
class DriverUniform;
// This rewrites all pipelines. // This rewrites all pipelines.
// //
@@ -42,4 +43,4 @@ namespace sh
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_REWRITEPIPELINES_H_ #endif // COMPILER_TRANSLATOR_MSL_REWRITEPIPELINES_H_

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_SKIPPINGTRAVERSER_H_ #ifndef COMPILER_TRANSLATOR_MSL_SKIPPINGTRAVERSER_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_SKIPPINGTRAVERSER_H_ #define COMPILER_TRANSLATOR_MSL_SKIPPINGTRAVERSER_H_
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
@@ -44,4 +44,4 @@ class SkippingTraverser : public TIntermTraverser
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_SKIPPINGTRAVERSER_H_ #endif // COMPILER_TRANSLATOR_MSL_SKIPPINGTRAVERSER_H_

View File

@@ -8,9 +8,9 @@
#include <limits> #include <limits>
#include "compiler/translator/ImmutableStringBuilder.h" #include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/TranslatorMetalDirect/AstHelpers.h" #include "compiler/translator/msl/AstHelpers.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h" #include "compiler/translator/msl/IntermRebuild.h"
#include "compiler/translator/tree_util/IntermRebuild.h" #include "compiler/translator/msl/SymbolEnv.h"
using namespace sh; using namespace sh;

View File

@@ -4,15 +4,15 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_SYMBOLENV_H_ #ifndef COMPILER_TRANSLATOR_MSL_SYMBOLENV_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_SYMBOLENV_H_ #define COMPILER_TRANSLATOR_MSL_SYMBOLENV_H_
#include <unordered_set> #include <unordered_set>
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
#include "compiler/translator/TranslatorMetalDirect/Name.h"
#include "compiler/translator/TranslatorMetalDirect/Reference.h"
#include "compiler/translator/Types.h" #include "compiler/translator/Types.h"
#include "compiler/translator/msl/Name.h"
#include "compiler/translator/msl/Reference.h"
namespace sh namespace sh
{ {
@@ -222,4 +222,4 @@ Name GetTextureTypeName(TBasicType samplerType);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_SYMBOLENV_H_ #endif // COMPILER_TRANSLATOR_MSL_SYMBOLENV_H_

View File

@@ -11,8 +11,8 @@
#include <vector> #include <vector>
#include "compiler/translator/ImmutableStringBuilder.h" #include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/TranslatorMetalDirect/AstHelpers.h" #include "compiler/translator/msl/AstHelpers.h"
#include "compiler/translator/TranslatorMetalDirect/ToposortStructs.h" #include "compiler/translator/msl/ToposortStructs.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"

View File

@@ -4,13 +4,13 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_TOPOSORTSTRUCTS_H_ #ifndef COMPILER_TRANSLATOR_MSL_TOPOSORTSTRUCTS_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_TOPOSORTSTRUCTS_H_ #define COMPILER_TRANSLATOR_MSL_TOPOSORTSTRUCTS_H_
#include "common/angleutils.h" #include "common/angleutils.h"
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
#include "compiler/translator/TranslatorMetalDirect/ProgramPrelude.h" #include "compiler/translator/msl/ProgramPrelude.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h" #include "compiler/translator/msl/SymbolEnv.h"
namespace sh namespace sh
{ {
@@ -24,4 +24,4 @@ namespace sh
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_TOPOSORTSTRUCTS_H_ #endif // COMPILER_TRANSLATOR_MSL_TOPOSORTSTRUCTS_H_

View File

@@ -4,34 +4,20 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/TranslatorMetalDirect.h" #include "compiler/translator/msl/TranslatorMSL.h"
#include "angle_gl.h" #include "angle_gl.h"
#include "common/utilities.h" #include "common/utilities.h"
#include "compiler/translator/DriverUniformMetal.h"
#include "compiler/translator/ImmutableStringBuilder.h" #include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/StaticType.h" #include "compiler/translator/StaticType.h"
#include "compiler/translator/TranslatorMetalDirect/AddExplicitTypeCasts.h" #include "compiler/translator/msl/AstHelpers.h"
#include "compiler/translator/TranslatorMetalDirect/AstHelpers.h" #include "compiler/translator/msl/DriverUniformMetal.h"
#include "compiler/translator/TranslatorMetalDirect/ConvertUnsupportedConstructorsToFunctionCalls.h" #include "compiler/translator/msl/EmitMetal.h"
#include "compiler/translator/TranslatorMetalDirect/EmitMetal.h" #include "compiler/translator/msl/Name.h"
#include "compiler/translator/TranslatorMetalDirect/FixTypeConstructors.h" #include "compiler/translator/msl/RewritePipelines.h"
#include "compiler/translator/TranslatorMetalDirect/HoistConstants.h" #include "compiler/translator/msl/SymbolEnv.h"
#include "compiler/translator/TranslatorMetalDirect/IntroduceVertexIndexID.h" #include "compiler/translator/msl/ToposortStructs.h"
#include "compiler/translator/TranslatorMetalDirect/Name.h" #include "compiler/translator/msl/UtilsMSL.h"
#include "compiler/translator/TranslatorMetalDirect/NameEmbeddedUniformStructsMetal.h"
#include "compiler/translator/TranslatorMetalDirect/ReduceInterfaceBlocks.h"
#include "compiler/translator/TranslatorMetalDirect/RewriteCaseDeclarations.h"
#include "compiler/translator/TranslatorMetalDirect/RewriteInterpolants.h"
#include "compiler/translator/TranslatorMetalDirect/RewriteOutArgs.h"
#include "compiler/translator/TranslatorMetalDirect/RewritePipelines.h"
#include "compiler/translator/TranslatorMetalDirect/RewriteUnaddressableReferences.h"
#include "compiler/translator/TranslatorMetalDirect/SeparateCompoundExpressions.h"
#include "compiler/translator/TranslatorMetalDirect/SeparateCompoundStructDeclarations.h"
#include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h"
#include "compiler/translator/TranslatorMetalDirect/ToposortStructs.h"
#include "compiler/translator/TranslatorMetalDirect/TranslatorMetalUtils.h"
#include "compiler/translator/TranslatorMetalDirect/WrapMain.h"
#include "compiler/translator/tree_ops/InitializeVariables.h" #include "compiler/translator/tree_ops/InitializeVariables.h"
#include "compiler/translator/tree_ops/MonomorphizeUnsupportedFunctions.h" #include "compiler/translator/tree_ops/MonomorphizeUnsupportedFunctions.h"
#include "compiler/translator/tree_ops/RemoveAtomicCounterBuiltins.h" #include "compiler/translator/tree_ops/RemoveAtomicCounterBuiltins.h"
@@ -42,6 +28,20 @@
#include "compiler/translator/tree_ops/RewriteDfdy.h" #include "compiler/translator/tree_ops/RewriteDfdy.h"
#include "compiler/translator/tree_ops/RewriteStructSamplers.h" #include "compiler/translator/tree_ops/RewriteStructSamplers.h"
#include "compiler/translator/tree_ops/SeparateStructFromUniformDeclarations.h" #include "compiler/translator/tree_ops/SeparateStructFromUniformDeclarations.h"
#include "compiler/translator/tree_ops/msl/AddExplicitTypeCasts.h"
#include "compiler/translator/tree_ops/msl/ConvertUnsupportedConstructorsToFunctionCalls.h"
#include "compiler/translator/tree_ops/msl/FixTypeConstructors.h"
#include "compiler/translator/tree_ops/msl/HoistConstants.h"
#include "compiler/translator/tree_ops/msl/IntroduceVertexIndexID.h"
#include "compiler/translator/tree_ops/msl/NameEmbeddedUniformStructsMetal.h"
#include "compiler/translator/tree_ops/msl/ReduceInterfaceBlocks.h"
#include "compiler/translator/tree_ops/msl/RewriteCaseDeclarations.h"
#include "compiler/translator/tree_ops/msl/RewriteInterpolants.h"
#include "compiler/translator/tree_ops/msl/RewriteOutArgs.h"
#include "compiler/translator/tree_ops/msl/RewriteUnaddressableReferences.h"
#include "compiler/translator/tree_ops/msl/SeparateCompoundExpressions.h"
#include "compiler/translator/tree_ops/msl/SeparateCompoundStructDeclarations.h"
#include "compiler/translator/tree_ops/msl/WrapMain.h"
#include "compiler/translator/tree_util/BuiltIn.h" #include "compiler/translator/tree_util/BuiltIn.h"
#include "compiler/translator/tree_util/DriverUniform.h" #include "compiler/translator/tree_util/DriverUniform.h"
#include "compiler/translator/tree_util/FindFunction.h" #include "compiler/translator/tree_util/FindFunction.h"
@@ -803,16 +803,14 @@ namespace mtl
{ {
TranslatorMetalReflection *getTranslatorMetalReflection(const TCompiler *compiler) TranslatorMetalReflection *getTranslatorMetalReflection(const TCompiler *compiler)
{ {
return ((TranslatorMetalDirect *)compiler)->getTranslatorMetalReflection(); return ((TranslatorMSL *)compiler)->getTranslatorMetalReflection();
} }
} // namespace mtl } // namespace mtl
TranslatorMetalDirect::TranslatorMetalDirect(sh::GLenum type, TranslatorMSL::TranslatorMSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output)
ShShaderSpec spec,
ShShaderOutput output)
: TCompiler(type, spec, output) : TCompiler(type, spec, output)
{} {}
[[nodiscard]] bool TranslatorMetalDirect::insertRasterizationDiscardLogic(TIntermBlock &root) [[nodiscard]] bool TranslatorMSL::insertRasterizationDiscardLogic(TIntermBlock &root)
{ {
// This transformation leaves the tree in an inconsistent state by using a variable that's // This transformation leaves the tree in an inconsistent state by using a variable that's
// defined in text, outside of the knowledge of the AST. // defined in text, outside of the knowledge of the AST.
@@ -856,8 +854,8 @@ TranslatorMetalDirect::TranslatorMetalDirect(sh::GLenum type,
// Metal needs to inverse the depth if depthRange is is reverse order, i.e. depth near > depth far // Metal needs to inverse the depth if depthRange is is reverse order, i.e. depth near > depth far
// This is achieved by multiply the depth value with scale value stored in // This is achieved by multiply the depth value with scale value stored in
// driver uniform's depthRange.reserved // driver uniform's depthRange.reserved
bool TranslatorMetalDirect::transformDepthBeforeCorrection(TIntermBlock *root, bool TranslatorMSL::transformDepthBeforeCorrection(TIntermBlock *root,
const DriverUniformMetal *driverUniforms) const DriverUniformMetal *driverUniforms)
{ {
// Create a symbol reference to "gl_Position" // Create a symbol reference to "gl_Position"
const TVariable *position = BuiltInVariable::gl_Position(); const TVariable *position = BuiltInVariable::gl_Position();
@@ -889,7 +887,7 @@ bool TranslatorMetalDirect::transformDepthBeforeCorrection(TIntermBlock *root,
// //
// where z_metal is the depth output of a Metal vertex shader and z_gl is the same for GL. // where z_metal is the depth output of a Metal vertex shader and z_gl is the same for GL.
// This operation is skipped when GL_CLIP_DEPTH_MODE_EXT is set to GL_ZERO_TO_ONE_EXT. // This operation is skipped when GL_CLIP_DEPTH_MODE_EXT is set to GL_ZERO_TO_ONE_EXT.
bool TranslatorMetalDirect::appendVertexShaderDepthCorrectionToMain( bool TranslatorMSL::appendVertexShaderDepthCorrectionToMain(
TIntermBlock *root, TIntermBlock *root,
const DriverUniformMetal *driverUniforms) const DriverUniformMetal *driverUniforms)
{ {
@@ -938,12 +936,12 @@ static inline MetalShaderType metalShaderTypeFromGLSL(sh::GLenum shaderType)
} }
} }
bool TranslatorMetalDirect::translateImpl(TInfoSinkBase &sink, bool TranslatorMSL::translateImpl(TInfoSinkBase &sink,
TIntermBlock *root, TIntermBlock *root,
const ShCompileOptions &compileOptions, const ShCompileOptions &compileOptions,
PerformanceDiagnostics * /*perfDiagnostics*/, PerformanceDiagnostics * /*perfDiagnostics*/,
SpecConst *specConst, SpecConst *specConst,
DriverUniformMetal *driverUniforms) DriverUniformMetal *driverUniforms)
{ {
TSymbolTable &symbolTable = getSymbolTable(); TSymbolTable &symbolTable = getSymbolTable();
IdGen idGen; IdGen idGen;
@@ -1508,16 +1506,16 @@ bool TranslatorMetalDirect::translateImpl(TInfoSinkBase &sink,
return true; return true;
} }
bool TranslatorMetalDirect::translate(TIntermBlock *root, bool TranslatorMSL::translate(TIntermBlock *root,
const ShCompileOptions &compileOptions, const ShCompileOptions &compileOptions,
PerformanceDiagnostics *perfDiagnostics) PerformanceDiagnostics *perfDiagnostics)
{ {
if (!root) if (!root)
{ {
return false; return false;
} }
// TODO: refactor the code in TranslatorMetalDirect to not issue raw function calls. // TODO: refactor the code in TranslatorMSL to not issue raw function calls.
// http://anglebug.com/6059#c2 // http://anglebug.com/6059#c2
mValidateASTOptions.validateNoRawFunctionCalls = false; mValidateASTOptions.validateNoRawFunctionCalls = false;
// A validation error is generated in this backend due to bool uniforms. // A validation error is generated in this backend due to bool uniforms.
@@ -1533,7 +1531,7 @@ bool TranslatorMetalDirect::translate(TIntermBlock *root,
return true; return true;
} }
bool TranslatorMetalDirect::shouldFlattenPragmaStdglInvariantAll() bool TranslatorMSL::shouldFlattenPragmaStdglInvariantAll()
{ {
// Not neccesary for MSL transformation. // Not neccesary for MSL transformation.
return false; return false;

View File

@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_H_ #ifndef COMPILER_TRANSLATOR_MSL_H_
#define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_H_ #define COMPILER_TRANSLATOR_MSL_H_
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
@@ -174,13 +174,13 @@ class TranslatorMetalReflection
uniformBufferBindingMap uniformBufferBindings; uniformBufferBindingMap uniformBufferBindings;
}; };
class TranslatorMetalDirect : public TCompiler class TranslatorMSL : public TCompiler
{ {
public: public:
TranslatorMetalDirect(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output); TranslatorMSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output);
#ifdef ANGLE_ENABLE_METAL #ifdef ANGLE_ENABLE_METAL
TranslatorMetalDirect *getAsTranslatorMetalDirect() override { return this; } TranslatorMSL *getAsTranslatorMSL() override { return this; }
#endif #endif
TranslatorMetalReflection *getTranslatorMetalReflection() { return &translatorMetalReflection; } TranslatorMetalReflection *getTranslatorMetalReflection() { return &translatorMetalReflection; }
@@ -219,4 +219,4 @@ class TranslatorMetalDirect : public TCompiler
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_H_ #endif // COMPILER_TRANSLATOR_MSL_H_

Some files were not shown because too many files have changed in this diff Show More