1# ------------------------------------------------- 2# drawElements Quality Program OpenGL ES 3.2 Module 3# ------------------------------------------------- 4# 5# Copyright 2016 The Android Open Source Project 6# 7# Licensed under the Apache License, Version 2.0 (the "License"); 8# you may not use this file except in compliance with the License. 9# You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, software 14# distributed under the License is distributed on an "AS IS" BASIS, 15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16# See the License for the specific language governing permissions and 17# limitations under the License. 18 19 20group overloading "Function Overloading" 21 22 case arrays_of_arrays_size 23 version 320 es 24 values 25 { 26 output float out0 = [ 1.0 ]; 27 } 28 29 both "" 30 #version 320 es 31 precision mediump float; 32 ${DECLARATIONS} 33 34 float func (float f[4][3]) 35 { 36 return f[0][0]; 37 } 38 39 float func (float f[4][4]) 40 { 41 return f[1][1]; 42 } 43 44 void main () 45 { 46 ${SETUP} 47 float[4][4] x = float[4][4] ( float[4] (0.0, 0.0, -1.0, 1.0), 48 float[4] (-1.0, 1.0, 0.0, 0.0), 49 float[4] (0.0, 0.0, -1.0, 1.0), 50 float[4] (-1.0, 1.0, 0.0, 0.0) ); 51 out0 = func(x); 52 ${OUTPUT} 53 } 54 "" 55 end 56 57end # overloading 58