Commit 8f9e17d5 by Mohan Maiya Committed by Commit Bot

Add EXT_clip_cull_distance extension autogen code

Addition of shader autogen code for EXT_clip_cull_distance extension. Bug: angleproject:5458 Change-Id: I299528957c0e747fd84987c420588c314f54aae0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2590989 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent 46eaba7f
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
// Version number for shader translation API. // Version number for shader translation API.
// It is incremented every time the API changes. // It is incremented every time the API changes.
#define ANGLE_SH_VERSION 246 #define ANGLE_SH_VERSION 247
enum ShShaderSpec enum ShShaderSpec
{ {
...@@ -420,6 +420,7 @@ struct ShBuiltInResources ...@@ -420,6 +420,7 @@ struct ShBuiltInResources
int OES_texture_buffer; int OES_texture_buffer;
int EXT_texture_buffer; int EXT_texture_buffer;
int OES_sample_variables; int OES_sample_variables;
int EXT_clip_cull_distance;
// Set to 1 to enable replacing GL_EXT_draw_buffers #extension directives // Set to 1 to enable replacing GL_EXT_draw_buffers #extension directives
// with GL_NV_draw_buffers in ESSL output. This flag can be used to emulate // with GL_NV_draw_buffers in ESSL output. This flag can be used to emulate
...@@ -590,6 +591,8 @@ struct ShBuiltInResources ...@@ -590,6 +591,8 @@ struct ShBuiltInResources
// APPLE_clip_distance/EXT_clip_cull_distance constant // APPLE_clip_distance/EXT_clip_cull_distance constant
int MaxClipDistances; int MaxClipDistances;
int MaxCullDistances;
int MaxCombinedClipAndCullDistances;
}; };
// //
......
{ {
"src/compiler/translator/ImmutableString_ESSL_autogen.cpp": "src/compiler/translator/ImmutableString_ESSL_autogen.cpp":
"5025e7c320251e6a26d90821fcc772e8", "fde39e0f48a46f22745815601f8c73aa",
"src/compiler/translator/ImmutableString_autogen.cpp": "src/compiler/translator/ImmutableString_autogen.cpp":
"cef9deaeda180601c944321790132dc9", "5c77d1341ef8f3d506aa918c646a90af",
"src/compiler/translator/ParseContext_ESSL_autogen.h": "src/compiler/translator/ParseContext_ESSL_autogen.h":
"4b152c08a8780d6984718f84c6b6a679", "6da863c0ec89166d10a148ddb6178dd1",
"src/compiler/translator/ParseContext_complete_autogen.h": "src/compiler/translator/ParseContext_complete_autogen.h":
"2db8d7d0efd13afdd4b971c89f785f7e", "2db8d7d0efd13afdd4b971c89f785f7e",
"src/compiler/translator/SymbolTable_ESSL_autogen.cpp": "src/compiler/translator/SymbolTable_ESSL_autogen.cpp":
"b7fde97581b6a3fa1cb95b429d2aafdc", "53cd516345cded422cf61c16c2f4a19a",
"src/compiler/translator/SymbolTable_autogen.cpp": "src/compiler/translator/SymbolTable_autogen.cpp":
"aea6b8a5b0e8a55e0a517edcae520905", "4767d8c23e4db437fa2ab98666bfa535",
"src/compiler/translator/SymbolTable_autogen.h": "src/compiler/translator/SymbolTable_autogen.h":
"91e1a9486d6a44fd4207a6afd48696cc", "f76260fe28587e720590adcedcb65928",
"src/compiler/translator/builtin_function_declarations.txt": "src/compiler/translator/builtin_function_declarations.txt":
"29ab2d428cf0079127d22eda430deb36", "29ab2d428cf0079127d22eda430deb36",
"src/compiler/translator/builtin_variables.json": "src/compiler/translator/builtin_variables.json":
"105ae21385f1ea600069a5fa7861a7f5", "5c2641aae409184a249d6ad57f93a502",
"src/compiler/translator/gen_builtin_symbols.py": "src/compiler/translator/gen_builtin_symbols.py":
"12f20fb93de0634ca9de5532185e0244", "12f20fb93de0634ca9de5532185e0244",
"src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h": "src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h":
"e147336998cb27bacf6c387511a0037a", "63eb495054fa3a28fd0c10981cd77961",
"src/compiler/translator/tree_util/BuiltIn_complete_autogen.h": "src/compiler/translator/tree_util/BuiltIn_complete_autogen.h":
"a3f295b6530a351e166e1cff8ee8fed2", "b3e5c368ccdf96bf564f32bbf19e5f69",
"src/tests/compiler_tests/ImmutableString_test_ESSL_autogen.cpp": "src/tests/compiler_tests/ImmutableString_test_ESSL_autogen.cpp":
"f4ad9e8fc0339692a5968332f6ee1af2", "b0ce4e0905740d612471ca1ad68cfaba",
"src/tests/compiler_tests/ImmutableString_test_autogen.cpp": "src/tests/compiler_tests/ImmutableString_test_autogen.cpp":
"4f7e284bdbe6fce78e60fc957a987ab3" "0f9030c08262caae7b45a3ad38d3417f"
} }
\ No newline at end of file
...@@ -967,6 +967,7 @@ enum TQualifier ...@@ -967,6 +967,7 @@ enum TQualifier
EvqViewportIndex, // gl_ViewportIndex EvqViewportIndex, // gl_ViewportIndex
EvqClipDistance, // APPLE_clip_distance/EXT_clip_cull_distance EvqClipDistance, // APPLE_clip_distance/EXT_clip_cull_distance
EvqCullDistance, // EXT_clip_cull_distance
// built-ins written by the shader_framebuffer_fetch extension(s) // built-ins written by the shader_framebuffer_fetch extension(s)
EvqLastFragColor, EvqLastFragColor,
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
OP(ARB_texture_rectangle) \ OP(ARB_texture_rectangle) \
OP(ARM_shader_framebuffer_fetch) \ OP(ARM_shader_framebuffer_fetch) \
OP(EXT_blend_func_extended) \ OP(EXT_blend_func_extended) \
OP(EXT_clip_cull_distance) \
OP(EXT_draw_buffers) \ OP(EXT_draw_buffers) \
OP(EXT_frag_depth) \ OP(EXT_frag_depth) \
OP(EXT_geometry_shader) \ OP(EXT_geometry_shader) \
......
...@@ -26,6 +26,7 @@ enum class TExtension : uint8_t ...@@ -26,6 +26,7 @@ enum class TExtension : uint8_t
ARB_texture_rectangle, ARB_texture_rectangle,
ARM_shader_framebuffer_fetch, ARM_shader_framebuffer_fetch,
EXT_blend_func_extended, EXT_blend_func_extended,
EXT_clip_cull_distance,
EXT_draw_buffers, EXT_draw_buffers,
EXT_frag_depth, EXT_frag_depth,
EXT_geometry_shader, EXT_geometry_shader,
......
...@@ -21,77 +21,77 @@ namespace BuiltInGroup ...@@ -21,77 +21,77 @@ namespace BuiltInGroup
bool isTextureOffsetNoBias(const TFunction *func) bool isTextureOffsetNoBias(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3724 && id <= 3793; return id >= 3729 && id <= 3798;
} }
bool isTextureOffsetBias(const TFunction *func) bool isTextureOffsetBias(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3794 && id <= 3813; return id >= 3799 && id <= 3818;
} }
bool isTextureGatherOffsetsComp(const TFunction *func) bool isTextureGatherOffsetsComp(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3851 && id <= 3863; return id >= 3856 && id <= 3868;
} }
bool isTextureGatherOffsetsNoComp(const TFunction *func) bool isTextureGatherOffsetsNoComp(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3864 && id <= 3879; return id >= 3869 && id <= 3884;
} }
bool isTextureGatherOffsets(const TFunction *func) bool isTextureGatherOffsets(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3851 && id <= 3879; return id >= 3856 && id <= 3884;
} }
bool isTextureGatherOffsetComp(const TFunction *func) bool isTextureGatherOffsetComp(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3880 && id <= 3885; return id >= 3885 && id <= 3890;
} }
bool isTextureGatherOffsetNoComp(const TFunction *func) bool isTextureGatherOffsetNoComp(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3886 && id <= 3893; return id >= 3891 && id <= 3898;
} }
bool isTextureGatherOffset(const TFunction *func) bool isTextureGatherOffset(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3880 && id <= 3893; return id >= 3885 && id <= 3898;
} }
bool isTextureGather(const TFunction *func) bool isTextureGather(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3827 && id <= 3893; return id >= 3832 && id <= 3898;
} }
bool isInterpolationFS(const TFunction *func) bool isInterpolationFS(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3906 && id <= 3929; return id >= 3911 && id <= 3934;
} }
bool isAtomicMemory(const TFunction *func) bool isAtomicMemory(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3934 && id <= 3951; return id >= 3939 && id <= 3956;
} }
bool isImageLoad(const TFunction *func) bool isImageLoad(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3988 && id <= 4005; return id >= 3993 && id <= 4010;
} }
bool isImageAtomic(const TFunction *func) bool isImageAtomic(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 4006 && id <= 4581; return id >= 4011 && id <= 4586;
} }
bool isImageStore(const TFunction *func) bool isImageStore(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 4582 && id <= 4599; return id >= 4587 && id <= 4604;
} }
bool isImage(const TFunction *func) bool isImage(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3952 && id <= 4599; return id >= 3957 && id <= 4604;
} }
} // namespace BuiltInGroup } // namespace BuiltInGroup
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -82,6 +82,9 @@ class TSymbolTableBase ...@@ -82,6 +82,9 @@ class TSymbolTableBase
TSymbol *m_gl_MaxTessEvaluationAtomicCounters = nullptr; TSymbol *m_gl_MaxTessEvaluationAtomicCounters = nullptr;
TSymbol *m_gl_MaxTessEvaluationAtomicCounterBuffers = nullptr; TSymbol *m_gl_MaxTessEvaluationAtomicCounterBuffers = nullptr;
TSymbol *m_gl_MaxSamples = nullptr; TSymbol *m_gl_MaxSamples = nullptr;
TSymbol *m_gl_MaxClipDistancesAPPLE = nullptr;
TSymbol *m_gl_MaxCullDistancesEXT = nullptr;
TSymbol *m_gl_MaxCombinedClipAndCullDistancesEXT = nullptr;
TSymbol *m_gl_FragData = nullptr; TSymbol *m_gl_FragData = nullptr;
TSymbol *m_gl_SecondaryFragDataEXT = nullptr; TSymbol *m_gl_SecondaryFragDataEXT = nullptr;
TSymbol *m_gl_FragDepthEXT = nullptr; TSymbol *m_gl_FragDepthEXT = nullptr;
...@@ -89,8 +92,10 @@ class TSymbolTableBase ...@@ -89,8 +92,10 @@ class TSymbolTableBase
TSymbol *m_gl_LastFragDataNV = nullptr; TSymbol *m_gl_LastFragDataNV = nullptr;
TSymbol *m_gl_SampleMaskIn = nullptr; TSymbol *m_gl_SampleMaskIn = nullptr;
TSymbol *m_gl_SampleMask = nullptr; TSymbol *m_gl_SampleMask = nullptr;
TSymbol *m_gl_CullDistance = nullptr;
TSymbol *m_gl_ClipDistance = nullptr; TSymbol *m_gl_ClipDistance = nullptr;
TSymbol *m_gl_MaxClipDistances = nullptr; TSymbol *m_gl_ClipDistanceAPPLE = nullptr;
TSymbol *m_gl_CullDistanceEXT = nullptr;
TSymbol *m_gl_PerVertex = nullptr; TSymbol *m_gl_PerVertex = nullptr;
TSymbol *m_gl_in = nullptr; TSymbol *m_gl_in = nullptr;
TSymbol *m_gl_PositionGS = nullptr; TSymbol *m_gl_PositionGS = nullptr;
......
...@@ -675,6 +675,47 @@ ...@@ -675,6 +675,47 @@
"value":"resources" "value":"resources"
} }
} }
},
"APPLEClipDistance":{
"variables":{
"gl_MaxClipDistances":{
"essl_level":"COMMON_BUILTINS",
"type":{
"basic":"Int",
"precision":"Medium",
"qualifier":"Const"
},
"essl_extension":"APPLE_clip_distance",
"value":"resources",
"suffix": "APPLE"
}
}
},
"EXTClipCullDistance":{
"variables":{
"gl_MaxCullDistances":{
"essl_level":"ESSL3_BUILTINS",
"type":{
"basic":"Int",
"precision":"Medium",
"qualifier":"Const"
},
"essl_extension":"EXT_clip_cull_distance",
"value":"resources",
"suffix": "EXT"
},
"gl_MaxCombinedClipAndCullDistances":{
"essl_level":"ESSL3_BUILTINS",
"type":{
"basic":"Int",
"precision":"Medium",
"qualifier":"Const"
},
"essl_extension":"EXT_clip_cull_distance",
"value":"resources",
"suffix": "EXT"
}
}
} }
} }
}, },
...@@ -861,6 +902,20 @@ ...@@ -861,6 +902,20 @@
"initDynamicType":"TType *{type_name} = new TType(EbtInt, EbpHigh, EvqSampleMask, 1); {type_name}->makeArray((resources.MaxSamples+31)/32);" "initDynamicType":"TType *{type_name} = new TType(EbtInt, EbpHigh, EvqSampleMask, 1); {type_name}->makeArray((resources.MaxSamples+31)/32);"
} }
} }
},
"EXTClipCullDistance":{
"variables":{
"gl_CullDistance":{
"essl_level":"ESSL3_BUILTINS",
"essl_extension":"EXT_clip_cull_distance",
"initDynamicType":"TType *{type_name} = new TType(EbtFloat, EbpHigh, EvqCullDistance, 1); {type_name}->makeArray(resources.MaxCullDistances);"
},
"gl_ClipDistance":{
"essl_level":"ESSL3_BUILTINS",
"essl_extension":"EXT_clip_cull_distance",
"initDynamicType":"TType *{type_name} = new TType(EbtFloat, EbpHigh, EvqClipDistance, 1); {type_name}->makeArray(resources.MaxClipDistances);"
}
}
} }
} }
}, },
...@@ -1005,17 +1060,18 @@ ...@@ -1005,17 +1060,18 @@
"gl_ClipDistance":{ "gl_ClipDistance":{
"essl_level":"COMMON_BUILTINS", "essl_level":"COMMON_BUILTINS",
"essl_extension":"APPLE_clip_distance", "essl_extension":"APPLE_clip_distance",
"initDynamicType":"TType *{type_name} = new TType(EbtFloat, EbpHigh, EvqClipDistance, 1); {type_name}->makeArray(resources.MaxClipDistances);" "initDynamicType":"TType *{type_name} = new TType(EbtFloat, EbpHigh, EvqClipDistance, 1); {type_name}->makeArray(resources.MaxClipDistances);",
}, "suffix": "APPLE"
"gl_MaxClipDistances":{ }
"essl_level":"COMMON_BUILTINS", }
"type":{ },
"basic":"Int", "EXTClipCullDistance":{
"precision":"Medium", "variables":{
"qualifier":"Const" "gl_CullDistance":{
}, "essl_level":"ESSL3_BUILTINS",
"essl_extension":"APPLE_clip_distance", "essl_extension":"EXT_clip_cull_distance",
"value":"resources" "initDynamicType":"TType *{type_name} = new TType(EbtFloat, EbpHigh, EvqCullDistance, 1); {type_name}->makeArray(resources.MaxCullDistances);",
"suffix": "EXT"
} }
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment