Home | History | Annotate | Download | only in pixelflinger2
      1 /*
      2  * Copyright (C) 2010 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef _PIXELFLINGER2_CONSTANTS_H_
     18 #define _PIXELFLINGER2_CONSTANTS_H_
     19 
     20 #define GGL_MAXVERTEXATTRIBS 8
     21 #define GGL_MAXVERTEXUNIFORMVECTORS 128
     22 #define GGL_MAXVARYINGVECTORS 8
     23 #define GGL_MAXVERTEXTEXTUREIMAGEUNITS 8
     24 #define GGL_MAXCOMBINEDTEXTUREIMAGEUNITS 16 /* samplers used in vertex + fragment */
     25 #define GGL_MAXTEXTUREIMAGEUNITS 8 /* samplers used in fragment only */
     26 #define GGL_MAXFRAGMENTUNIFORMVECTORS 16
     27 #define GGL_MAXDRAWBUFFERS 2
     28 
     29 // these describe the layout of VertexOut when fed to fs,
     30 // it must NOT change and match VertexOut in pixelflinger_2.h
     31 #define GGL_VS_OUTPUT_OFFSET            0
     32 #define GGL_VS_OUTPUT_POSITION_INDEX    1
     33 
     34 #define GGL_FS_INPUT_OFFSET             1 // vector4 index of first fs input in VertexOut
     35 #define GGL_FS_INPUT_FRAGCOORD_INDEX    0
     36 #define GGL_FS_INPUT_VARYINGS_INDEX     (GGL_FS_INPUT_FRAGCOORD_INDEX + 1)
     37 #define GGL_FS_INPUT_FRONTFACINGPOINTCOORD_INDEX (GGL_FS_INPUT_VARYINGS_INDEX + GGL_MAXVARYINGVECTORS)
     38 
     39 #define GGL_FS_OUTPUT_OFFSET            (GGL_FS_INPUT_OFFSET + GGL_FS_INPUT_FRONTFACINGPOINTCOORD_INDEX + 1)
     40 #define GGL_FS_OUTPUT_FRAGCOLOR_INDEX   0
     41 
     42 #define GGL_MAX_VIEWPORT_DIMS           4096
     43 
     44 #endif // _PIXELFLINGER2_CONSTANTS_H_
     45