Edit

kc3-lang/angle/src/libANGLE/Constants.h

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2017-06-28 14:53:52
    Hash : 3244736a
    Message : Use MemoryProgramCache. Add the member functions for saving and loading from the binary cache, and hook them into the Program class. Requires that the Renderer supports the program binary extension. BUG=angleproject:1897 Change-Id: I2dc8d21b02da705ded58c5cd1943562c9c97c49b Reviewed-on: https://chromium-review.googlesource.com/522874 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>

  • src/libANGLE/Constants.h
  • //
    // Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    // Contants.h: Defines some implementation specific and gl constants
    
    #ifndef LIBANGLE_CONSTANTS_H_
    #define LIBANGLE_CONSTANTS_H_
    
    #include "common/platform.h"
    
    namespace gl
    {
    
    // The size to set for the program cache for default and low-end device cases.
    #if !defined(ANGLE_PLATFORM_ANDROID)
    const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024;
    #else
    const size_t kDefaultMaxProgramCacheMemoryBytes = 2 * 1024 * 1024;
    const size_t kLowEndMaxProgramCacheMemoryBytes  = 512 * 1024;
    #endif
    
    enum
    {
        MAX_VERTEX_ATTRIBS         = 16,
        MAX_VERTEX_ATTRIB_BINDINGS = 16,
    
        // Implementation upper limits, real maximums depend on the hardware
        IMPLEMENTATION_MAX_VARYING_VECTORS = 32,
        IMPLEMENTATION_MAX_DRAW_BUFFERS    = 8,
        IMPLEMENTATION_MAX_FRAMEBUFFER_ATTACHMENTS =
            IMPLEMENTATION_MAX_DRAW_BUFFERS + 2,  // 2 extra for depth and/or stencil buffers
    
        IMPLEMENTATION_MAX_VERTEX_SHADER_UNIFORM_BUFFERS   = 16,
        IMPLEMENTATION_MAX_FRAGMENT_SHADER_UNIFORM_BUFFERS = 16,
        IMPLEMENTATION_MAX_COMBINED_SHADER_UNIFORM_BUFFERS =
            IMPLEMENTATION_MAX_VERTEX_SHADER_UNIFORM_BUFFERS +
            IMPLEMENTATION_MAX_FRAGMENT_SHADER_UNIFORM_BUFFERS,
    
        IMPLEMENTATION_MAX_TRANSFORM_FEEDBACK_BUFFERS = 4,
    
        // These are the maximums the implementation can support
        // The actual GL caps are limited by the device caps
        // and should be queried from the Context
        IMPLEMENTATION_MAX_2D_TEXTURE_SIZE         = 16384,
        IMPLEMENTATION_MAX_CUBE_MAP_TEXTURE_SIZE   = 16384,
        IMPLEMENTATION_MAX_3D_TEXTURE_SIZE         = 2048,
        IMPLEMENTATION_MAX_2D_ARRAY_TEXTURE_LAYERS = 2048,
    
        IMPLEMENTATION_MAX_TEXTURE_LEVELS = 15  // 1+log2 of MAX_TEXTURE_SIZE
    };
    }
    
    #endif // LIBANGLE_CONSTANTS_H_