Skip to content
  • Paul Berry's avatar
    mesa: replace ctx->Const.{Vertex,Fragment,Geomtery}Program with an array. · 84732a98
    Paul Berry authored
    
    
    These are replaced with
    ctx->Const.Program[MESA_SHADER_{VERTEX,FRAGMENT,GEOMETRY}].  In
    patches to follow, this will allow us to replace a lot of ad-hoc logic
    with a variable index into the array.
    
    With the exception of the changes to mtypes.h, this patch was
    generated entirely by the command:
    
        find src -type f '(' -iname '*.c' -o -iname '*.cpp' -o -iname '*.py' \
        -o -iname '*.y' ')' -print0 | xargs -0 sed -i \
        -e 's/Const\.VertexProgram/Const.Program[MESA_SHADER_VERTEX]/g' \
        -e 's/Const\.GeometryProgram/Const.Program[MESA_SHADER_GEOMETRY]/g' \
        -e 's/Const\.FragmentProgram/Const.Program[MESA_SHADER_FRAGMENT]/g'
    
    Suggested-by: default avatarBrian Paul <brianp@vmware.com>
    Reviewed-by: default avatarBrian Paul <brianp@vmware.com>
    Reviewed-by: default avatarKenneth Graunke <kenneth@whitecape.org>
    84732a98