modules/gles2/functional/es2fShaderDiscardTests.cpp \
modules/gles2/functional/es2fShaderExecuteTest.cpp \
modules/gles2/functional/es2fShaderFragDataTests.cpp \
+ modules/gles2/functional/es2fShaderFunctionTests.cpp \
modules/gles2/functional/es2fShaderIndexingTests.cpp \
modules/gles2/functional/es2fShaderInvarianceTests.cpp \
modules/gles2/functional/es2fShaderLoopTests.cpp \
modules/gles3/functional/es3fShaderDerivateTests.cpp \
modules/gles3/functional/es3fShaderDiscardTests.cpp \
modules/gles3/functional/es3fShaderFragDataTests.cpp \
+ modules/gles3/functional/es3fShaderFunctionTests.cpp \
modules/gles3/functional/es3fShaderIndexingTests.cpp \
modules/gles3/functional/es3fShaderInvarianceTests.cpp \
modules/gles3/functional/es3fShaderLoopTests.cpp \
-
+dEQP-GLES2.functional.shaders.function.local_variable_aliasing_vertex
+dEQP-GLES2.functional.shaders.function.local_variable_aliasing_fragment
+dEQP-GLES2.functional.shaders.function.global_variable_aliasing_vertex
+dEQP-GLES2.functional.shaders.function.global_variable_aliasing_fragment
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.geometric.normalize_vec3_fragment
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.geometric.normalize_vec4_vertex
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.geometric.normalize_vec4_fragment
+dEQP-GLES2.functional.shaders.function.local_variable_aliasing_vertex
+dEQP-GLES2.functional.shaders.function.local_variable_aliasing_fragment
+dEQP-GLES2.functional.shaders.function.global_variable_aliasing_vertex
+dEQP-GLES2.functional.shaders.function.global_variable_aliasing_fragment
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.0
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.1
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.2
dEQP-GLES3.functional.shaders.keywords.allowed_keywords.image1DArrayShadow_fragment
dEQP-GLES3.functional.shaders.keywords.allowed_keywords.image2DArrayShadow_vertex
dEQP-GLES3.functional.shaders.keywords.allowed_keywords.image2DArrayShadow_fragment
+dEQP-GLES3.functional.shaders.function.local_variable_aliasing_vertex
+dEQP-GLES3.functional.shaders.function.local_variable_aliasing_fragment
+dEQP-GLES3.functional.shaders.function.global_variable_aliasing_vertex
+dEQP-GLES3.functional.shaders.function.global_variable_aliasing_fragment
dEQP-GLES3.functional.shaders.switch.default_only_static_vertex
dEQP-GLES3.functional.shaders.switch.default_only_static_fragment
dEQP-GLES3.functional.shaders.switch.default_only_uniform_vertex
dEQP-GLES3.functional.shaders.discard.function_static_loop_uniform
dEQP-GLES3.functional.shaders.discard.function_static_loop_dynamic
dEQP-GLES3.functional.shaders.discard.function_static_loop_texture
+dEQP-GLES3.functional.shaders.function.local_variable_aliasing_vertex
+dEQP-GLES3.functional.shaders.function.local_variable_aliasing_fragment
+dEQP-GLES3.functional.shaders.function.global_variable_aliasing_vertex
+dEQP-GLES3.functional.shaders.function.global_variable_aliasing_fragment
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_static_read
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_dynamic_read
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_static_loop_read
KHR-GL33.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL33.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL33.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL33.shaders.function.local_variable_aliasing_vertex
+KHR-GL33.shaders.function.local_variable_aliasing_fragment
+KHR-GL33.shaders.function.global_variable_aliasing_vertex
+KHR-GL33.shaders.function.global_variable_aliasing_fragment
KHR-GL33.shaders.struct.local.basic_vertex
KHR-GL33.shaders.struct.local.basic_fragment
KHR-GL33.shaders.struct.local.nested_vertex
KHR-GL40.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL40.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL40.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL40.shaders.function.local_variable_aliasing_vertex
+KHR-GL40.shaders.function.local_variable_aliasing_fragment
+KHR-GL40.shaders.function.global_variable_aliasing_vertex
+KHR-GL40.shaders.function.global_variable_aliasing_fragment
KHR-GL40.shaders.struct.local.basic_vertex
KHR-GL40.shaders.struct.local.basic_fragment
KHR-GL40.shaders.struct.local.nested_vertex
KHR-GL41.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL41.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL41.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL41.shaders.function.local_variable_aliasing_vertex
+KHR-GL41.shaders.function.local_variable_aliasing_fragment
+KHR-GL41.shaders.function.global_variable_aliasing_vertex
+KHR-GL41.shaders.function.global_variable_aliasing_fragment
KHR-GL41.shaders.struct.local.basic_vertex
KHR-GL41.shaders.struct.local.basic_fragment
KHR-GL41.shaders.struct.local.nested_vertex
KHR-GL42.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL42.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL42.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL42.shaders.function.local_variable_aliasing_vertex
+KHR-GL42.shaders.function.local_variable_aliasing_fragment
+KHR-GL42.shaders.function.global_variable_aliasing_vertex
+KHR-GL42.shaders.function.global_variable_aliasing_fragment
KHR-GL42.shaders.struct.local.basic_vertex
KHR-GL42.shaders.struct.local.basic_fragment
KHR-GL42.shaders.struct.local.nested_vertex
KHR-GL43.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL43.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL43.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL43.shaders.function.local_variable_aliasing_vertex
+KHR-GL43.shaders.function.local_variable_aliasing_fragment
+KHR-GL43.shaders.function.global_variable_aliasing_vertex
+KHR-GL43.shaders.function.global_variable_aliasing_fragment
KHR-GL43.shaders.struct.local.basic_vertex
KHR-GL43.shaders.struct.local.basic_fragment
KHR-GL43.shaders.struct.local.nested_vertex
KHR-GL44.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL44.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL44.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL44.shaders.function.local_variable_aliasing_vertex
+KHR-GL44.shaders.function.local_variable_aliasing_fragment
+KHR-GL44.shaders.function.global_variable_aliasing_vertex
+KHR-GL44.shaders.function.global_variable_aliasing_fragment
KHR-GL44.shaders.struct.local.basic_vertex
KHR-GL44.shaders.struct.local.basic_fragment
KHR-GL44.shaders.struct.local.nested_vertex
KHR-GL45.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL45.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL45.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL45.shaders.function.local_variable_aliasing_vertex
+KHR-GL45.shaders.function.local_variable_aliasing_fragment
+KHR-GL45.shaders.function.global_variable_aliasing_vertex
+KHR-GL45.shaders.function.global_variable_aliasing_fragment
KHR-GL45.shaders.struct.local.basic_vertex
KHR-GL45.shaders.struct.local.basic_fragment
KHR-GL45.shaders.struct.local.nested_vertex
KHR-GL46.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL46.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL46.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL46.shaders.function.local_variable_aliasing_vertex
+KHR-GL46.shaders.function.local_variable_aliasing_fragment
+KHR-GL46.shaders.function.global_variable_aliasing_vertex
+KHR-GL46.shaders.function.global_variable_aliasing_fragment
KHR-GL46.shaders.struct.local.basic_vertex
KHR-GL46.shaders.struct.local.basic_fragment
KHR-GL46.shaders.struct.local.nested_vertex
KHR-GL33.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL33.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL33.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL33.shaders.function.local_variable_aliasing_vertex
+KHR-GL33.shaders.function.local_variable_aliasing_fragment
+KHR-GL33.shaders.function.global_variable_aliasing_vertex
+KHR-GL33.shaders.function.global_variable_aliasing_fragment
KHR-GL33.shaders.struct.local.basic_vertex
KHR-GL33.shaders.struct.local.basic_fragment
KHR-GL33.shaders.struct.local.nested_vertex
KHR-GL40.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL40.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL40.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL40.shaders.function.local_variable_aliasing_vertex
+KHR-GL40.shaders.function.local_variable_aliasing_fragment
+KHR-GL40.shaders.function.global_variable_aliasing_vertex
+KHR-GL40.shaders.function.global_variable_aliasing_fragment
KHR-GL40.shaders.struct.local.basic_vertex
KHR-GL40.shaders.struct.local.basic_fragment
KHR-GL40.shaders.struct.local.nested_vertex
KHR-GL41.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL41.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL41.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL41.shaders.function.local_variable_aliasing_vertex
+KHR-GL41.shaders.function.local_variable_aliasing_fragment
+KHR-GL41.shaders.function.global_variable_aliasing_vertex
+KHR-GL41.shaders.function.global_variable_aliasing_fragment
KHR-GL41.shaders.struct.local.basic_vertex
KHR-GL41.shaders.struct.local.basic_fragment
KHR-GL41.shaders.struct.local.nested_vertex
KHR-GL42.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL42.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL42.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL42.shaders.function.local_variable_aliasing_vertex
+KHR-GL42.shaders.function.local_variable_aliasing_fragment
+KHR-GL42.shaders.function.global_variable_aliasing_vertex
+KHR-GL42.shaders.function.global_variable_aliasing_fragment
KHR-GL42.shaders.struct.local.basic_vertex
KHR-GL42.shaders.struct.local.basic_fragment
KHR-GL42.shaders.struct.local.nested_vertex
KHR-GL43.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL43.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL43.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL43.shaders.function.local_variable_aliasing_vertex
+KHR-GL43.shaders.function.local_variable_aliasing_fragment
+KHR-GL43.shaders.function.global_variable_aliasing_vertex
+KHR-GL43.shaders.function.global_variable_aliasing_fragment
KHR-GL43.shaders.struct.local.basic_vertex
KHR-GL43.shaders.struct.local.basic_fragment
KHR-GL43.shaders.struct.local.nested_vertex
KHR-GL44.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL44.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL44.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL44.shaders.function.local_variable_aliasing_vertex
+KHR-GL44.shaders.function.local_variable_aliasing_fragment
+KHR-GL44.shaders.function.global_variable_aliasing_vertex
+KHR-GL44.shaders.function.global_variable_aliasing_fragment
KHR-GL44.shaders.struct.local.basic_vertex
KHR-GL44.shaders.struct.local.basic_fragment
KHR-GL44.shaders.struct.local.nested_vertex
KHR-GL45.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL45.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL45.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL45.shaders.function.local_variable_aliasing_vertex
+KHR-GL45.shaders.function.local_variable_aliasing_fragment
+KHR-GL45.shaders.function.global_variable_aliasing_vertex
+KHR-GL45.shaders.function.global_variable_aliasing_fragment
KHR-GL45.shaders.struct.local.basic_vertex
KHR-GL45.shaders.struct.local.basic_fragment
KHR-GL45.shaders.struct.local.nested_vertex
KHR-GL46.shaders.preprocessor.operator_precedence.logical_and_vs_bitwise_and_fragment
KHR-GL46.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_vertex
KHR-GL46.shaders.preprocessor.operator_precedence.logical_or_vs_logical_and_fragment
+KHR-GL46.shaders.function.local_variable_aliasing_vertex
+KHR-GL46.shaders.function.local_variable_aliasing_fragment
+KHR-GL46.shaders.function.global_variable_aliasing_vertex
+KHR-GL46.shaders.function.global_variable_aliasing_fragment
KHR-GL46.shaders.struct.local.basic_vertex
KHR-GL46.shaders.struct.local.basic_fragment
KHR-GL46.shaders.struct.local.nested_vertex
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.vector_relational.not_bvec3_fragment
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.vector_relational.not_bvec4_vertex
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.vector_relational.not_bvec4_fragment
+dEQP-GLES2.functional.shaders.function.local_variable_aliasing_vertex
+dEQP-GLES2.functional.shaders.function.local_variable_aliasing_fragment
+dEQP-GLES2.functional.shaders.function.global_variable_aliasing_vertex
+dEQP-GLES2.functional.shaders.function.global_variable_aliasing_fragment
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.0
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.1
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.2
dEQP-GLES3.functional.shaders.discard.function_static_loop_uniform
dEQP-GLES3.functional.shaders.discard.function_static_loop_dynamic
dEQP-GLES3.functional.shaders.discard.function_static_loop_texture
+dEQP-GLES3.functional.shaders.function.local_variable_aliasing_vertex
+dEQP-GLES3.functional.shaders.function.local_variable_aliasing_fragment
+dEQP-GLES3.functional.shaders.function.global_variable_aliasing_vertex
+dEQP-GLES3.functional.shaders.function.global_variable_aliasing_fragment
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_static_read
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_dynamic_read
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_static_loop_read
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.vector_relational.not_bvec3_fragment
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.vector_relational.not_bvec4_vertex
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.vector_relational.not_bvec4_fragment
+dEQP-GLES2.functional.shaders.function.local_variable_aliasing_vertex
+dEQP-GLES2.functional.shaders.function.local_variable_aliasing_fragment
+dEQP-GLES2.functional.shaders.function.global_variable_aliasing_vertex
+dEQP-GLES2.functional.shaders.function.global_variable_aliasing_fragment
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.0
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.1
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.2
dEQP-GLES3.functional.shaders.discard.function_static_loop_uniform
dEQP-GLES3.functional.shaders.discard.function_static_loop_dynamic
dEQP-GLES3.functional.shaders.discard.function_static_loop_texture
+dEQP-GLES3.functional.shaders.function.local_variable_aliasing_vertex
+dEQP-GLES3.functional.shaders.function.local_variable_aliasing_fragment
+dEQP-GLES3.functional.shaders.function.global_variable_aliasing_vertex
+dEQP-GLES3.functional.shaders.function.global_variable_aliasing_fragment
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_static_read
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_dynamic_read
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_static_loop_read
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.vector_relational.not_bvec3_fragment
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.vector_relational.not_bvec4_vertex
dEQP-GLES2.functional.shaders.constant_expressions.builtin_functions.vector_relational.not_bvec4_fragment
+dEQP-GLES2.functional.shaders.function.local_variable_aliasing_vertex
+dEQP-GLES2.functional.shaders.function.local_variable_aliasing_fragment
+dEQP-GLES2.functional.shaders.function.global_variable_aliasing_vertex
+dEQP-GLES2.functional.shaders.function.global_variable_aliasing_fragment
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.0
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.1
dEQP-GLES2.functional.shaders.random.basic_expression.vertex.2
dEQP-GLES3.functional.shaders.discard.function_static_loop_uniform
dEQP-GLES3.functional.shaders.discard.function_static_loop_dynamic
dEQP-GLES3.functional.shaders.discard.function_static_loop_texture
+dEQP-GLES3.functional.shaders.function.local_variable_aliasing_vertex
+dEQP-GLES3.functional.shaders.function.local_variable_aliasing_fragment
+dEQP-GLES3.functional.shaders.function.global_variable_aliasing_vertex
+dEQP-GLES3.functional.shaders.function.global_variable_aliasing_fragment
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_static_read
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_dynamic_read
dEQP-GLES3.functional.shaders.indexing.varying_array.float_static_write_static_loop_read
KHR-GLES3.shaders.fragdepth.compare.dynamic_conditional_write
KHR-GLES3.shaders.fragdepth.compare.uniform_loop_write
KHR-GLES3.shaders.fragdepth.compare.write_in_function
+KHR-GLES3.shaders.function.local_variable_aliasing_vertex
+KHR-GLES3.shaders.function.local_variable_aliasing_fragment
+KHR-GLES3.shaders.function.global_variable_aliasing_vertex
+KHR-GLES3.shaders.function.global_variable_aliasing_fragment
KHR-GLES3.shaders.indexing.varying_array.float_static_write_dynamic_read
KHR-GLES3.shaders.indexing.varying_array.float_static_write_static_loop_read
KHR-GLES3.shaders.indexing.varying_array.float_static_write_dynamic_loop_read
KHR-GLES32.info.shading_language_version
KHR-GLES32.info.extensions
KHR-GLES32.info.render_target
+KHR-GLES32.shaders.function.local_variable_aliasing_vertex
+KHR-GLES32.shaders.function.local_variable_aliasing_fragment
+KHR-GLES32.shaders.function.global_variable_aliasing_vertex
+KHR-GLES32.shaders.function.global_variable_aliasing_fragment
KHR-GLES32.shaders.shader_integer_mix.define
KHR-GLES32.shaders.shader_integer_mix.prototypes-extension
KHR-GLES32.shaders.shader_integer_mix.prototypes
KHR-GLES3.shaders.fragdepth.compare.dynamic_conditional_write
KHR-GLES3.shaders.fragdepth.compare.uniform_loop_write
KHR-GLES3.shaders.fragdepth.compare.write_in_function
+KHR-GLES3.shaders.function.local_variable_aliasing_vertex
+KHR-GLES3.shaders.function.local_variable_aliasing_fragment
+KHR-GLES3.shaders.function.global_variable_aliasing_vertex
+KHR-GLES3.shaders.function.global_variable_aliasing_fragment
KHR-GLES3.shaders.indexing.varying_array.float_static_write_dynamic_read
KHR-GLES3.shaders.indexing.varying_array.float_static_write_static_loop_read
KHR-GLES3.shaders.indexing.varying_array.float_static_write_dynamic_loop_read
KHR-GLES32.info.shading_language_version
KHR-GLES32.info.extensions
KHR-GLES32.info.render_target
+KHR-GLES32.shaders.function.local_variable_aliasing_vertex
+KHR-GLES32.shaders.function.local_variable_aliasing_fragment
+KHR-GLES32.shaders.function.global_variable_aliasing_vertex
+KHR-GLES32.shaders.function.global_variable_aliasing_fragment
KHR-GLES32.shaders.shader_integer_mix.define
KHR-GLES32.shaders.shader_integer_mix.prototypes-extension
KHR-GLES32.shaders.shader_integer_mix.prototypes
KHR-GLES3.shaders.fragdepth.compare.dynamic_conditional_write
KHR-GLES3.shaders.fragdepth.compare.uniform_loop_write
KHR-GLES3.shaders.fragdepth.compare.write_in_function
+KHR-GLES3.shaders.function.local_variable_aliasing_vertex
+KHR-GLES3.shaders.function.local_variable_aliasing_fragment
+KHR-GLES3.shaders.function.global_variable_aliasing_vertex
+KHR-GLES3.shaders.function.global_variable_aliasing_fragment
KHR-GLES3.shaders.indexing.varying_array.float_static_write_dynamic_read
KHR-GLES3.shaders.indexing.varying_array.float_static_write_static_loop_read
KHR-GLES3.shaders.indexing.varying_array.float_static_write_dynamic_loop_read
KHR-GLES32.info.shading_language_version
KHR-GLES32.info.extensions
KHR-GLES32.info.render_target
+KHR-GLES32.shaders.function.local_variable_aliasing_vertex
+KHR-GLES32.shaders.function.local_variable_aliasing_fragment
+KHR-GLES32.shaders.function.global_variable_aliasing_vertex
+KHR-GLES32.shaders.function.global_variable_aliasing_fragment
KHR-GLES32.shaders.shader_integer_mix.define
KHR-GLES32.shaders.shader_integer_mix.prototypes-extension
KHR-GLES32.shaders.shader_integer_mix.prototypes
glcSeparableProgramsTransformFeedbackTests.hpp
glcShaderConstExprTests.hpp
glcShaderConstExprTests.cpp
+ glcShaderFunctionTests.cpp
+ glcShaderFunctionTests.hpp
glcShaderGroupVoteTests.cpp
glcShaderGroupVoteTests.hpp
glcShaderIndexingTests.cpp
--- /dev/null
+/*-------------------------------------------------------------------------
+ * OpenGL Conformance Test Suite
+ * -----------------------------
+ *
+ * Copyright (c) 2016 Google Inc.
+ * Copyright (c) 2016 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ /*!
+ * \file
+ * \brief Shader struct tests.
+ */ /*-------------------------------------------------------------------*/
+
+#include "glcShaderFunctionTests.hpp"
+#include "glcShaderRenderCase.hpp"
+#include "gluTexture.hpp"
+#include "tcuStringTemplate.hpp"
+#include "tcuTextureUtil.hpp"
+
+using namespace glu;
+
+namespace deqp
+{
+
+typedef void (*SetupUniformsFunc)(const glw::Functions& gl, deUint32 programID, const tcu::Vec4& constCoords);
+
+class ShaderFunctionCase : public ShaderRenderCase
+{
+public:
+ ShaderFunctionCase(Context& context, const char* name, const char* description, bool isVertexCase, bool usesTextures,
+ ShaderEvalFunc evalFunc, SetupUniformsFunc setupUniformsFunc, const char* vertShaderSource,
+ const char* fragShaderSource);
+ ~ShaderFunctionCase(void);
+
+ void init(void);
+ void deinit(void);
+
+ virtual void setupUniforms(deUint32 programID, const tcu::Vec4& constCoords);
+
+private:
+ ShaderFunctionCase(const ShaderFunctionCase&);
+ ShaderFunctionCase& operator=(const ShaderFunctionCase&);
+
+ SetupUniformsFunc m_setupUniforms;
+ bool m_usesTexture;
+
+ glu::Texture2D* m_gradientTexture;
+};
+
+ShaderFunctionCase::ShaderFunctionCase(Context& context, const char* name, const char* description, bool isVertexCase,
+ bool usesTextures, ShaderEvalFunc evalFunc, SetupUniformsFunc setupUniformsFunc,
+ const char* vertShaderSource, const char* fragShaderSource)
+ : ShaderRenderCase(context.getTestContext(), context.getRenderContext(), context.getContextInfo(), name,
+ description, isVertexCase, evalFunc)
+ , m_setupUniforms(setupUniformsFunc)
+ , m_usesTexture(usesTextures)
+ , m_gradientTexture(DE_NULL)
+{
+ m_vertShaderSource = vertShaderSource;
+ m_fragShaderSource = fragShaderSource;
+}
+
+ShaderFunctionCase::~ShaderFunctionCase(void)
+{
+}
+
+void ShaderFunctionCase::init(void)
+{
+ if (m_usesTexture)
+ {
+ m_gradientTexture = new glu::Texture2D(m_renderCtx, GL_RGBA8, 128, 128);
+
+ m_gradientTexture->getRefTexture().allocLevel(0);
+ tcu::fillWithComponentGradients(m_gradientTexture->getRefTexture().getLevel(0), tcu::Vec4(0.0f),
+ tcu::Vec4(1.0f));
+ m_gradientTexture->upload();
+
+ m_textures.push_back(TextureBinding(
+ m_gradientTexture, tcu::Sampler(tcu::Sampler::CLAMP_TO_EDGE, tcu::Sampler::CLAMP_TO_EDGE,
+ tcu::Sampler::CLAMP_TO_EDGE, tcu::Sampler::LINEAR, tcu::Sampler::LINEAR)));
+ DE_ASSERT(m_textures.size() == 1);
+ }
+ ShaderRenderCase::init();
+}
+
+void ShaderFunctionCase::deinit(void)
+{
+ if (m_usesTexture)
+ {
+ delete m_gradientTexture;
+ }
+ ShaderRenderCase::deinit();
+}
+
+void ShaderFunctionCase::setupUniforms(deUint32 programID, const tcu::Vec4& constCoords)
+{
+ ShaderRenderCase::setupUniforms(programID, constCoords);
+ if (m_setupUniforms)
+ m_setupUniforms(m_renderCtx.getFunctions(), programID, constCoords);
+}
+
+static ShaderFunctionCase* createStructCase(Context& context, const char* name, const char* description,
+ glu::GLSLVersion glslVersion, bool isVertexCase, bool usesTextures,
+ ShaderEvalFunc evalFunc, SetupUniformsFunc setupUniforms,
+ const LineStream& shaderSrc)
+{
+ const std::string versionDecl = glu::getGLSLVersionDeclaration(glslVersion);
+
+ const std::string defaultVertSrc = versionDecl + "\n"
+ "in highp vec4 a_position;\n"
+ "in highp vec4 a_coords;\n"
+ "out mediump vec4 v_coords;\n\n"
+ "void main (void)\n"
+ "{\n"
+ " v_coords = a_coords;\n"
+ " gl_Position = a_position;\n"
+ "}\n";
+ const std::string defaultFragSrc = versionDecl + "\n"
+ "in mediump vec4 v_color;\n"
+ "layout(location = 0) out mediump vec4 o_color;\n\n"
+ "void main (void)\n"
+ "{\n"
+ " o_color = v_color;\n"
+ "}\n";
+
+ // Fill in specialization parameters.
+ std::map<std::string, std::string> spParams;
+ if (isVertexCase)
+ {
+ spParams["HEADER"] = versionDecl + "\n"
+ "in highp vec4 a_position;\n"
+ "in highp vec4 a_coords;\n"
+ "out mediump vec4 v_color;";
+ spParams["COORDS"] = "a_coords";
+ spParams["DST"] = "v_color";
+ spParams["ASSIGN_POS"] = "gl_Position = a_position;";
+ }
+ else
+ {
+ spParams["HEADER"] = versionDecl + "\n"
+ "#ifdef GL_ES\n"
+ " precision mediump float;\n"
+ "#endif\n"
+ "\n"
+ "in mediump vec4 v_coords;\n"
+ "layout(location = 0) out mediump vec4 o_color;";
+ spParams["COORDS"] = "v_coords";
+ spParams["DST"] = "o_color";
+ spParams["ASSIGN_POS"] = "";
+ }
+
+ if (isVertexCase)
+ return new ShaderFunctionCase(context, name, description, isVertexCase, usesTextures, evalFunc, setupUniforms,
+ tcu::StringTemplate(shaderSrc.str()).specialize(spParams).c_str(),
+ defaultFragSrc.c_str());
+ else
+ return new ShaderFunctionCase(context, name, description, isVertexCase, usesTextures, evalFunc, setupUniforms,
+ defaultVertSrc.c_str(),
+ tcu::StringTemplate(shaderSrc.str()).specialize(spParams).c_str());
+}
+
+ShaderFunctionTests::ShaderFunctionTests(Context& context, glu::GLSLVersion glslVersion)
+ : TestCaseGroup(context, "function", "Function Tests"), m_glslVersion(glslVersion)
+{
+}
+
+ShaderFunctionTests::~ShaderFunctionTests(void)
+{
+}
+
+void ShaderFunctionTests::init(void)
+{
+#define FUNCTION_CASE(NAME, DESCRIPTION, SHADER_SRC, EVAL_FUNC_BODY) \
+ do \
+ { \
+ struct Eval_##NAME \
+ { \
+ static void eval(ShaderEvalContext& c) EVAL_FUNC_BODY \
+ }; \
+ addChild(createStructCase(m_context, #NAME "_vertex", DESCRIPTION, m_glslVersion, true, false, \
+ &Eval_##NAME::eval, DE_NULL, SHADER_SRC)); \
+ addChild(createStructCase(m_context, #NAME "_fragment", DESCRIPTION, m_glslVersion, false, false, \
+ &Eval_##NAME::eval, DE_NULL, SHADER_SRC)); \
+ } while (deGetFalse())
+
+ FUNCTION_CASE(local_variable_aliasing, "Function out parameter aliases local variable",
+ LineStream() << "${HEADER}"
+ << ""
+ << "bool out_params_are_distinct(float x, out float y) {"
+ << " y = 2.;"
+ << " return x == 1. && y == 2.;"
+ << "}"
+ << ""
+ << "void main (void)"
+ << "{"
+ << " float x = 1.;"
+ << " ${DST} = out_params_are_distinct(x, x) ? vec4(0.,1.,0.,1.) : vec4(1.,0.,0.,1.);"
+ << " ${ASSIGN_POS}"
+ << "}",
+ { c.color.xyz() = tcu::Vec3(0.0f, 1.0f, 0.0f); });
+
+ FUNCTION_CASE(global_variable_aliasing, "Function out parameter aliases global variable",
+ LineStream() << "${HEADER}"
+ << ""
+ << "float x = 1.;"
+ << "bool out_params_are_distinct_from_global(out float y) {"
+ << " y = 2.;"
+ << " return x == 1. && y == 2.;"
+ << "}"
+ << ""
+ << "void main (void)"
+ << "{"
+ << " ${DST} = out_params_are_distinct_from_global(x) ? vec4(0.,1.,0.,1.) : vec4(1.,0.,0.,1.);"
+ << " ${ASSIGN_POS}"
+ << "}",
+ { c.color.xyz() = tcu::Vec3(0.0f, 1.0f, 0.0f); });
+}
+
+} // deqp
--- /dev/null
+#ifndef _GLCSHADERFUNCTIONTESTS_HPP
+#define _GLCSHADERFUNCTIONTESTS_HPP
+/*-------------------------------------------------------------------------
+ * OpenGL Conformance Test Suite
+ * -----------------------------
+ *
+ * Copyright (c) 2016 Google Inc.
+ * Copyright (c) 2016 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ /*!
+ * \file
+ * \brief Shader struct tests.
+ */ /*-------------------------------------------------------------------*/
+
+#include "glcTestCase.hpp"
+#include "gluShaderUtil.hpp"
+
+namespace deqp
+{
+
+class ShaderFunctionTests : public TestCaseGroup
+{
+public:
+ ShaderFunctionTests(Context& context, glu::GLSLVersion glslVersion);
+ virtual ~ShaderFunctionTests(void);
+
+ virtual void init(void);
+
+private:
+ ShaderFunctionTests(const ShaderFunctionTests&); // not allowed!
+ ShaderFunctionTests& operator=(const ShaderFunctionTests&); // not allowed!
+
+ glu::GLSLVersion m_glslVersion;
+};
+
+} // deqp
+
+#endif // _GLCSHADERFUNCTIONTESTS_HPP
#include "glcInfoTests.hpp"
#include "glcPackedDepthStencilTests.hpp"
#include "glcPackedPixelsTests.hpp"
+#include "glcShaderFunctionTests.hpp"
#include "glcShaderIndexingTests.hpp"
#include "glcShaderIntegerMixTests.hpp"
#include "glcShaderLibrary.hpp"
addChild(new deqp::ShaderLoopTests(m_context, glu::GLSL_VERSION_330));
addChild(
new deqp::ShaderLibraryGroup(m_context, "preprocessor", "Preprocessor Tests", "gl33/preprocessor.test"));
+ addChild(new deqp::ShaderFunctionTests(m_context, glu::GLSL_VERSION_330));
addChild(new deqp::ShaderStructTests(m_context, glu::GLSL_VERSION_330));
addChild(new deqp::UniformBlockTests(m_context, glu::GLSL_VERSION_330));
addChild(new deqp::ShaderIntegerMixTests(m_context, glu::GLSL_VERSION_330));
#include "glcPackedPixelsTests.hpp"
#include "glcParallelShaderCompileTests.hpp"
#include "glcShaderConstExprTests.hpp"
+#include "glcShaderFunctionTests.hpp"
#include "glcShaderIndexingTests.hpp"
#include "glcShaderIntegerMixTests.hpp"
#include "glcShaderLibrary.hpp"
{
addChild(new deqp::ShaderLibraryGroup(m_context, "declarations", "Declaration Tests", "declarations.test"));
addChild(new deqp::FragDepthTests(m_context, glu::GLSL_VERSION_300_ES));
+ addChild(new deqp::ShaderFunctionTests(m_context, glu::GLSL_VERSION_300_ES));
addChild(new deqp::ShaderIndexingTests(m_context, glu::GLSL_VERSION_300_ES));
addChild(new deqp::ShaderLoopTests(m_context, glu::GLSL_VERSION_300_ES));
addChild(new deqp::ShaderLibraryGroup(m_context, "preprocessor", "Preprocessor Tests", "preprocessor.test"));
#include "glcInternalformatTests.hpp"
#include "glcSeparableProgramsTransformFeedbackTests.hpp"
#include "glcShaderConstExprTests.hpp"
+#include "glcShaderFunctionTests.hpp"
#include "glcShaderIndexingTests.hpp"
#include "glcShaderIntegerMixTests.hpp"
#include "glcShaderLibrary.hpp"
addChild(new deqp::InfoTests(getContext()));
tcu::TestCaseGroup* shadersGroup = new tcu::TestCaseGroup(getTestContext(), "shaders", "");
+ shadersGroup->addChild(new deqp::ShaderFunctionTests(getContext(), glu::GLSL_VERSION_320_ES));
shadersGroup->addChild(new deqp::ShaderIntegerMixTests(getContext(), glu::GLSL_VERSION_320_ES));
shadersGroup->addChild(new deqp::ShaderNegativeTests(getContext(), glu::GLSL_VERSION_320_ES));
shadersGroup->addChild(new deqp::ShaderStructTests(getContext(), glu::GLSL_VERSION_320_ES));
es2fShaderDiscardTests.hpp
es2fShaderExecuteTest.cpp
es2fShaderExecuteTest.hpp
+ es2fShaderFunctionTests.cpp
+ es2fShaderFunctionTests.hpp
es2fShaderIndexingTests.cpp
es2fShaderIndexingTests.hpp
es2fShaderLoopTests.cpp
#include "es2fShaderBuiltinVarTests.hpp"
#include "es2fShaderConstExprTests.hpp"
#include "es2fShaderDiscardTests.hpp"
+#include "es2fShaderFunctionTests.hpp"
#include "es2fShaderIndexingTests.hpp"
#include "es2fShaderLoopTests.hpp"
#include "es2fShaderOperatorTests.hpp"
addChild(new ShaderFragDataTests (m_context));
addChild(new ShaderAlgorithmTests (m_context));
addChild(new ShaderConstExprTests (m_context));
+ addChild(new ShaderFunctionTests (m_context));
addChild(new RandomShaderTests(m_context));
}
--- /dev/null
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program OpenGL ES 2.0 Module
+ * -------------------------------------------------
+ *
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief Shader struct tests.
+ *//*--------------------------------------------------------------------*/
+
+#include "es2fShaderFunctionTests.hpp"
+#include "glsShaderRenderCase.hpp"
+#include "gluTexture.hpp"
+#include "tcuStringTemplate.hpp"
+#include "tcuTextureUtil.hpp"
+
+using namespace deqp::gls;
+
+namespace deqp
+{
+namespace gles2
+{
+namespace Functional
+{
+
+typedef void (*SetupUniformsFunc) (const glw::Functions& gl, deUint32 programID, const tcu::Vec4& constCoords);
+
+class ShaderFunctionCase : public ShaderRenderCase
+{
+public:
+ ShaderFunctionCase (Context& context, const char* name, const char* description, bool isVertexCase, ShaderEvalFunc evalFunc, SetupUniformsFunc setupUniformsFunc, const char* vertShaderSource, const char* fragShaderSource);
+ ~ShaderFunctionCase (void);
+
+ void init (void);
+ void deinit (void);
+
+ virtual void setupUniforms (int programID, const tcu::Vec4& constCoords);
+
+private:
+ ShaderFunctionCase (const ShaderFunctionCase&);
+ ShaderFunctionCase& operator= (const ShaderFunctionCase&);
+
+ const SetupUniformsFunc m_setupUniforms;
+
+ glu::Texture2D* m_brickTexture;
+};
+
+ShaderFunctionCase::ShaderFunctionCase (Context& context, const char* name, const char* description, bool isVertexCase, ShaderEvalFunc evalFunc, SetupUniformsFunc setupUniformsFunc, const char* vertShaderSource, const char* fragShaderSource)
+ : ShaderRenderCase (context.getTestContext(), context.getRenderContext(), context.getContextInfo(), name, description, isVertexCase, evalFunc)
+ , m_setupUniforms (setupUniformsFunc)
+ , m_brickTexture (DE_NULL)
+{
+ m_vertShaderSource = vertShaderSource;
+ m_fragShaderSource = fragShaderSource;
+}
+
+ShaderFunctionCase::~ShaderFunctionCase (void)
+{
+ delete m_brickTexture;
+}
+
+void ShaderFunctionCase::init (void)
+{
+ gls::ShaderRenderCase::init();
+}
+
+void ShaderFunctionCase::deinit (void)
+{
+ gls::ShaderRenderCase::deinit();
+ delete m_brickTexture;
+ m_brickTexture = DE_NULL;
+}
+
+void ShaderFunctionCase::setupUniforms (int programID, const tcu::Vec4& constCoords)
+{
+ ShaderRenderCase::setupUniforms(programID, constCoords);
+ if (m_setupUniforms)
+ m_setupUniforms(m_renderCtx.getFunctions(), programID, constCoords);
+}
+
+static ShaderFunctionCase* createStructCase (Context& context, const char* name, const char* description, bool isVertexCase, ShaderEvalFunc evalFunc, SetupUniformsFunc setupUniforms, const LineStream& shaderSrc, const std::map<std::string, std::string>* additionalParams)
+{
+ static const char* defaultVertSrc =
+ "attribute highp vec4 a_position;\n"
+ "attribute highp vec4 a_coords;\n"
+ "varying mediump vec4 v_coords;\n\n"
+ "void main (void)\n"
+ "{\n"
+ " v_coords = a_coords;\n"
+ " gl_Position = a_position;\n"
+ "}\n";
+ static const char* defaultFragSrc =
+ "varying mediump vec4 v_color;\n\n"
+ "void main (void)\n"
+ "{\n"
+ " gl_FragColor = v_color;\n"
+ "}\n";
+
+ // Fill in specialization parameters.
+ std::map<std::string, std::string> spParams;
+ if (isVertexCase)
+ {
+ spParams["DECLARATIONS"] =
+ "attribute highp vec4 a_position;\n"
+ "attribute highp vec4 a_coords;\n"
+ "varying mediump vec4 v_color;";
+ spParams["COORDS"] = "a_coords";
+ spParams["DST"] = "v_color";
+ spParams["ASSIGN_POS"] = "gl_Position = a_position;";
+ }
+ else
+ {
+ spParams["DECLARATIONS"] =
+ "precision highp float;\n"
+ "varying mediump vec4 v_coords;";
+ spParams["COORDS"] = "v_coords";
+ spParams["DST"] = "gl_FragColor";
+ spParams["ASSIGN_POS"] = "";
+ }
+ if (additionalParams)
+ spParams.insert(additionalParams->begin(), additionalParams->end());
+
+ if (isVertexCase)
+ return new ShaderFunctionCase(context, name, description, isVertexCase, evalFunc, setupUniforms, tcu::StringTemplate(shaderSrc.str()).specialize(spParams).c_str(), defaultFragSrc);
+ else
+ return new ShaderFunctionCase(context, name, description, isVertexCase, evalFunc, setupUniforms, defaultVertSrc, tcu::StringTemplate(shaderSrc.str()).specialize(spParams).c_str());
+}
+
+ShaderFunctionTests::ShaderFunctionTests (Context& context)
+ : TestCaseGroup(context, "function", "Function Tests")
+{
+}
+
+ShaderFunctionTests::~ShaderFunctionTests (void)
+{
+}
+
+void ShaderFunctionTests::init (void)
+{
+ #define FUNCTION_CASE_PARAMETERIZED(NAME, DESCRIPTION, SHADER_SRC, EVAL_FUNC_BODY, PARAMS) \
+ do { \
+ struct Eval_##NAME { static void eval (ShaderEvalContext& c) EVAL_FUNC_BODY }; /* NOLINT(EVAL_FUNC_BODY) */ \
+ addChild(createStructCase(m_context, #NAME "_vertex", DESCRIPTION, true, &Eval_##NAME::eval, DE_NULL, SHADER_SRC, PARAMS)); \
+ addChild(createStructCase(m_context, #NAME "_fragment", DESCRIPTION, false, &Eval_##NAME::eval, DE_NULL, SHADER_SRC, PARAMS));\
+ } while (deGetFalse())
+
+ #define FUNCTION_CASE(NAME, DESCRIPTION, SHADER_SRC, EVAL_FUNC_BODY) \
+ FUNCTION_CASE_PARAMETERIZED(NAME, DESCRIPTION, SHADER_SRC, EVAL_FUNC_BODY, DE_NULL)
+
+ FUNCTION_CASE(local_variable_aliasing, "Function out parameter aliases local variable",
+ LineStream()
+ << "${DECLARATIONS}"
+ << ""
+ << "bool out_params_are_distinct(float x, out float y)"
+ << "{"
+ << " y = 2.;"
+ << " return x == 1. && y == 2.;"
+ << "}"
+ << ""
+ << "void main (void)"
+ << "{"
+ << " float x = 1.;"
+ << " ${DST} = out_params_are_distinct(x, x) ? vec4(0.,1.,0.,1.) : vec4(1.,0.,0.,1.);"
+ << " ${ASSIGN_POS}"
+ << "}",
+ { c.color.xyz() = tcu::Vec3(0.0f, 1.0f, 0.0f); });
+
+ FUNCTION_CASE(global_variable_aliasing, "Function out parameter aliases global variable",
+ LineStream()
+ << "${DECLARATIONS}"
+ << ""
+ << ""
+ << "float x = 1.;"
+ << "bool out_params_are_distinct_from_global(out float y) {"
+ << " y = 2.;"
+ << " return x == 1. && y == 2.;"
+ << "}"
+ << ""
+ << "void main (void)"
+ << "{"
+ << " ${DST} = out_params_are_distinct_from_global(x) ? vec4(0.,1.,0.,1.) : vec4(1.,0.,0.,1.);"
+ << " ${ASSIGN_POS}"
+ << "}",
+ { c.color.xyz() = tcu::Vec3(0.0f, 1.0f, 0.0f); });
+}
+
+} // Functional
+} // gles2
+} // deqp
--- /dev/null
+#ifndef _ES2FSHADERFUNCTIONTESTS_HPP
+#define _ES2FSHADERFUNCTIONTESTS_HPP
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program OpenGL ES 2.0 Module
+ * -------------------------------------------------
+ *
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief Shader struct tests.
+ *//*--------------------------------------------------------------------*/
+
+#include "tes2TestCase.hpp"
+
+namespace deqp
+{
+namespace gles2
+{
+namespace Functional
+{
+
+class ShaderFunctionTests : public TestCaseGroup
+{
+public:
+ ShaderFunctionTests (Context& context);
+ virtual ~ShaderFunctionTests (void);
+
+ virtual void init (void);
+
+private:
+ ShaderFunctionTests (const ShaderFunctionTests&); // not allowed!
+ ShaderFunctionTests& operator= (const ShaderFunctionTests&); // not allowed!
+};
+
+} // Functional
+} // gles2
+} // deqp
+
+#endif // _ES2FSHADERFUNCTIONTESTS_HPP
es3fShaderConstExprTests.hpp
es3fShaderDiscardTests.cpp
es3fShaderDiscardTests.hpp
+ es3fShaderFunctionTests.cpp
+ es3fShaderFunctionTests.hpp
es3fShaderIndexingTests.cpp
es3fShaderIndexingTests.hpp
es3fShaderLoopTests.cpp
#include "es3fShaderApiTests.hpp"
#include "es3fShaderConstExprTests.hpp"
#include "es3fShaderDiscardTests.hpp"
+#include "es3fShaderFunctionTests.hpp"
#include "es3fShaderIndexingTests.hpp"
#include "es3fShaderLoopTests.hpp"
#include "es3fShaderMatrixTests.hpp"
addChild(new ShaderLibraryTest (m_context, "invalid_implicit_conversions", "Invalid Implicit Conversions"));
addChild(new ShaderDiscardTests (m_context));
+ addChild(new ShaderFunctionTests (m_context));
addChild(new ShaderIndexingTests (m_context));
addChild(new ShaderLoopTests (m_context));
addChild(new ShaderOperatorTests (m_context));
--- /dev/null
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program OpenGL ES 3.0 Module
+ * -------------------------------------------------
+ *
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief Shader struct tests.
+ *//*--------------------------------------------------------------------*/
+
+#include "es3fShaderFunctionTests.hpp"
+#include "glsShaderRenderCase.hpp"
+#include "gluTexture.hpp"
+#include "tcuStringTemplate.hpp"
+#include "tcuTextureUtil.hpp"
+
+using namespace deqp::gls;
+
+namespace deqp
+{
+namespace gles3
+{
+namespace Functional
+{
+
+typedef void (*SetupUniformsFunc) (const glw::Functions& gl, deUint32 programID, const tcu::Vec4& constCoords);
+
+class ShaderFunctionCase : public ShaderRenderCase
+{
+public:
+ ShaderFunctionCase (Context& context, const char* name, const char* description, bool isVertexCase, bool usesTextures, ShaderEvalFunc evalFunc, SetupUniformsFunc setupUniformsFunc, const char* vertShaderSource, const char* fragShaderSource);
+ ~ShaderFunctionCase (void);
+
+ void init (void);
+ void deinit (void);
+
+ virtual void setupUniforms (int programID, const tcu::Vec4& constCoords);
+
+private:
+ ShaderFunctionCase (const ShaderFunctionCase&);
+ ShaderFunctionCase& operator= (const ShaderFunctionCase&);
+
+ SetupUniformsFunc m_setupUniforms;
+ bool m_usesTexture;
+
+ glu::Texture2D* m_brickTexture;
+};
+
+ShaderFunctionCase::ShaderFunctionCase (Context& context, const char* name, const char* description, bool isVertexCase, bool usesTextures, ShaderEvalFunc evalFunc, SetupUniformsFunc setupUniformsFunc, const char* vertShaderSource, const char* fragShaderSource)
+ : ShaderRenderCase (context.getTestContext(), context.getRenderContext(), context.getContextInfo(), name, description, isVertexCase, evalFunc)
+ , m_setupUniforms (setupUniformsFunc)
+ , m_usesTexture (usesTextures)
+ , m_brickTexture (DE_NULL)
+{
+ m_vertShaderSource = vertShaderSource;
+ m_fragShaderSource = fragShaderSource;
+}
+
+ShaderFunctionCase::~ShaderFunctionCase (void)
+{
+ delete m_brickTexture;
+}
+
+void ShaderFunctionCase::init (void)
+{
+ if (m_usesTexture)
+ {
+ m_brickTexture = glu::Texture2D::create(m_renderCtx, m_ctxInfo, m_testCtx.getArchive(), "data/brick.png");
+ m_textures.push_back(TextureBinding(m_brickTexture, tcu::Sampler(tcu::Sampler::CLAMP_TO_EDGE, tcu::Sampler::CLAMP_TO_EDGE, tcu::Sampler::CLAMP_TO_EDGE,
+ tcu::Sampler::LINEAR, tcu::Sampler::LINEAR)));
+ DE_ASSERT(m_textures.size() == 1);
+ }
+ gls::ShaderRenderCase::init();
+}
+
+void ShaderFunctionCase::deinit (void)
+{
+ gls::ShaderRenderCase::deinit();
+ delete m_brickTexture;
+ m_brickTexture = DE_NULL;
+}
+
+void ShaderFunctionCase::setupUniforms (int programID, const tcu::Vec4& constCoords)
+{
+ ShaderRenderCase::setupUniforms(programID, constCoords);
+ if (m_setupUniforms)
+ m_setupUniforms(m_renderCtx.getFunctions(), programID, constCoords);
+}
+
+static ShaderFunctionCase* createStructCase (Context& context, const char* name, const char* description, bool isVertexCase, bool usesTextures, ShaderEvalFunc evalFunc, SetupUniformsFunc setupUniforms, const LineStream& shaderSrc, const std::map<std::string, std::string>* additionalParams)
+{
+ static const char* defaultVertSrc =
+ "#version 300 es\n"
+ "in highp vec4 a_position;\n"
+ "in highp vec4 a_coords;\n"
+ "out mediump vec4 v_coords;\n\n"
+ "void main (void)\n"
+ "{\n"
+ " v_coords = a_coords;\n"
+ " gl_Position = a_position;\n"
+ "}\n";
+ static const char* defaultFragSrc =
+ "#version 300 es\n"
+ "in mediump vec4 v_color;\n"
+ "layout(location = 0) out mediump vec4 o_color;\n\n"
+ "void main (void)\n"
+ "{\n"
+ " o_color = v_color;\n"
+ "}\n";
+
+ // Fill in specialization parameters.
+ std::map<std::string, std::string> spParams;
+ if (isVertexCase)
+ {
+ spParams["HEADER"] =
+ "#version 300 es\n"
+ "in highp vec4 a_position;\n"
+ "in highp vec4 a_coords;\n"
+ "out mediump vec4 v_color;";
+ spParams["COORDS"] = "a_coords";
+ spParams["DST"] = "v_color";
+ spParams["ASSIGN_POS"] = "gl_Position = a_position;";
+ }
+ else
+ {
+ spParams["HEADER"] =
+ "#version 300 es\n"
+ "precision mediump float;\n"
+ "in mediump vec4 v_coords;\n"
+ "layout(location = 0) out mediump vec4 o_color;";
+ spParams["COORDS"] = "v_coords";
+ spParams["DST"] = "o_color";
+ spParams["ASSIGN_POS"] = "";
+ }
+ if (additionalParams)
+ spParams.insert(additionalParams->begin(), additionalParams->end());
+
+ if (isVertexCase)
+ return new ShaderFunctionCase(context, name, description, isVertexCase, usesTextures, evalFunc, setupUniforms, tcu::StringTemplate(shaderSrc.str()).specialize(spParams).c_str(), defaultFragSrc);
+ else
+ return new ShaderFunctionCase(context, name, description, isVertexCase, usesTextures, evalFunc, setupUniforms, defaultVertSrc, tcu::StringTemplate(shaderSrc.str()).specialize(spParams).c_str());
+}
+
+ShaderFunctionTests::ShaderFunctionTests (Context& context)
+ : TestCaseGroup(context, "function", "Function Tests")
+{
+}
+
+ShaderFunctionTests::~ShaderFunctionTests (void)
+{
+}
+
+void ShaderFunctionTests::init (void)
+{
+ #define FUNCTION_CASE_PARAMETERIZED(NAME, DESCRIPTION, SHADER_SRC, EVAL_FUNC_BODY, PARAMS) \
+ do { \
+ struct Eval_##NAME { static void eval (ShaderEvalContext& c) EVAL_FUNC_BODY }; /* NOLINT(EVAL_FUNC_BODY) */ \
+ addChild(createStructCase(m_context, #NAME "_vertex", DESCRIPTION, true, false, &Eval_##NAME::eval, DE_NULL, SHADER_SRC, PARAMS)); \
+ addChild(createStructCase(m_context, #NAME "_fragment", DESCRIPTION, false, false,&Eval_##NAME::eval, DE_NULL, SHADER_SRC, PARAMS));\
+ } while (deGetFalse())
+
+ #define FUNCTION_CASE(NAME, DESCRIPTION, SHADER_SRC, EVAL_FUNC_BODY) \
+ FUNCTION_CASE_PARAMETERIZED(NAME, DESCRIPTION, SHADER_SRC, EVAL_FUNC_BODY, DE_NULL)
+
+ FUNCTION_CASE(local_variable_aliasing, "Function out parameter aliases local variable",
+ LineStream()
+ << "${HEADER}"
+ << ""
+ << "bool out_params_are_distinct(float x, out float y) {"
+ << " y = 2.;"
+ << " return x == 1. && y == 2.;"
+ << "}"
+ << ""
+ << "void main (void)"
+ << "{"
+ << " float x = 1.;"
+ << " ${DST} = out_params_are_distinct(x, x) ? vec4(0.,1.,0.,1.) : vec4(1.,0.,0.,1.);"
+ << " ${ASSIGN_POS}"
+ << "}",
+ { c.color.xyz() = tcu::Vec3(0.0f, 1.0f, 0.0f); });
+
+ FUNCTION_CASE(global_variable_aliasing, "Function out parameter aliases global variable",
+ LineStream()
+ << "${HEADER}"
+ << ""
+ << ""
+ << "float x = 1.;"
+ << "bool out_params_are_distinct_from_global(out float y) {"
+ << " y = 2.;"
+ << " return x == 1. && y == 2.;"
+ << "}"
+ << ""
+ << "void main (void)"
+ << "{"
+ << " ${DST} = out_params_are_distinct_from_global(x) ? vec4(0.,1.,0.,1.) : vec4(1.,0.,0.,1.);"
+ << " ${ASSIGN_POS}"
+ << "}",
+ { c.color.xyz() = tcu::Vec3(0.0f, 1.0f, 0.0f); });
+}
+
+} // Functional
+} // gles3
+} // deqp
--- /dev/null
+#ifndef _ES3FSHADERFUNCTIONTESTS_HPP
+#define _ES3FSHADERFUNCTIONTESTS_HPP
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program OpenGL ES 3.0 Module
+ * -------------------------------------------------
+ *
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief Shader struct tests.
+ *//*--------------------------------------------------------------------*/
+
+#include "tes3TestCase.hpp"
+
+namespace deqp
+{
+namespace gles3
+{
+namespace Functional
+{
+
+class ShaderFunctionTests : public TestCaseGroup
+{
+public:
+ ShaderFunctionTests (Context& context);
+ virtual ~ShaderFunctionTests (void);
+
+ virtual void init (void);
+
+private:
+ ShaderFunctionTests (const ShaderFunctionTests&); // not allowed!
+ ShaderFunctionTests& operator= (const ShaderFunctionTests&); // not allowed!
+};
+
+} // Functional
+} // gles3
+} // deqp
+
+#endif // _ES3FSHADERFUNCTIONTESTS_HPP