Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Rework attribute binding (again) #9433

Merged
merged 13 commits into from
Jul 12, 2017
Merged

[core] Rework attribute binding (again) #9433

merged 13 commits into from
Jul 12, 2017

Commits on Jul 12, 2017

  1. Configuration menu
    Copy the full SHA
    fbbc8f2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8fb212d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fedfaa2 View commit details
    Browse the repository at this point in the history
  4. [core] Rework attribute binding (again)

    These changes are necessary for programs whose set of active attributes is not fixed at compile time by a template parameter pack, but rather varies based on the generated shader text at runtime. In such cases, the attribute location of a given named attribute may vary between instances of the same Program.
    
    Previously, attribute bindings were implicitly associated with a location based on template parameter order, and -1 was used to indicate an inactive attribute. This left us unable to disable the appropriate attribute when it went from active to inactive. Now, the state tracker for bindings explicitly associates locations and state, and an empty optional is used to indicate an inactive attribute.
    
    In addition, a gl::VertexArray class is now exposed, allowing more flexibility in the relationship between Programs, Segments, and attribute bindings. In this commit, that relationship does not change, but the subsequent commit adjusts it to match gl-js, reduce rebinds, and work around buggy VAO implementations.
    
    VertexArray uses a pimpl idiom in order to support implementations that lack the VAO extension. In that case, all VertexArrays share global binding state, reflecting the platform reality in the absence of VAOs, while still providing a uniform API.
    jfirebaugh committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    c61041b View commit details
    Browse the repository at this point in the history
  5. [core] Per-segment-per-layer vertex arrays

    Reduces rebinding, matches gl-js, and works around the buggy VAO implementation on PowerVR SGX544 GPUs.
    jfirebaugh committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    358b030 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    01aff01 View commit details
    Browse the repository at this point in the history
  7. [core] Remove segment.cpp

    jfirebaugh committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    49726cd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4c42132 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2691fe1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    86ee821 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c0d6a07 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1176ead View commit details
    Browse the repository at this point in the history
  13. Update mapbox-gl-js

    jfirebaugh committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    11952db View commit details
    Browse the repository at this point in the history