Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • libANGLE
  • angletypes.h
Find file
BlameHistoryPermalink
  • Qin Jiajia's avatar
    ES31: Implement DrawArraysIndirect D3D part · fbe49a8f
    Qin Jiajia authored Dec 19, 2016
    There are four buffer types for vertex attribute storage in D3D11:
      DIRECT
      STATIC
      DYNAMIC
      CURRENT_VALUE
    
    When drawing, it will call applyVertexBuffer to bind the right type
    buffers in D3D11.
    
    DIRECT uses the gl buffer directly without any translation.
    
    CURRENT_VALUE uses a single value for the attribute.
    
    STATIC translates the whole vertex buffer once. So it doesn't need the
    first, count and instance informations since it always translates the
    whole buffer.
    
    DYNAMIC translates the data every frame. To improve the performance,
    in implementation, it only translates 'count' vertexes from 'first'
    location in vertex buffer with one drawing for non-instanced vertices.
    'first' and 'count' are got from draw parameter list. And for the
    translated vertex buffer, when drawing, the first vertex location is 0.
    
    From above analysis, we can see that if all attribute storages are
    non-dynamic, we can directly use the indirect buffer to draw. But for
    dynamic storages, we have to calculate the first, count, and instances
    from indirect buffer and apply them to translate the dynamic type
    buffers. Meanwhile, we have to set the first to 0 (see above
    description)when drawing.
    
    DrawArrysIndirect implementation is like below:
    1. Check whether all vertex attributes are non-dynamic
    2. If yes, applyVertexBuffer and DrawInstancedIndirect
    3. If no, 1) calculate first, count, and instances from indirect buffer.
              2) applyVertexBuffer with these parameters.
              4) Use DrawInstanced instead of DrawInstancedIndirect.
    
    BUG=angleproject:1595
    TEST=dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect*
    
    Change-Id: I36431f416443279d51de523b07ce60727914cbbf
    Reviewed-on: https://chromium-review.googlesource.com/446690
    Commit-Queue: Jamie Madill <jmadill@chromium.org>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
    fbe49a8f
angletypes.h 8.83 KB
EditWeb IDE
×

Replace angletypes.h

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.