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
  • compiler
  • translator
  • FlagStd140Structs.cpp
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Fix writing uniform block maps to HLSL output · 2ef23e2d
    Olli Etuaho authored Nov 01, 2017
    HLSL output maps structs in std140 uniform blocks to a different
    layout in order to eliminate padding. The padding may have been
    inserted to comply with std140 packing rules.
    
    There used to be two issues in writing the maps: Sometimes the same
    map could be written multiple times, and the maps were not being
    written for uniform blocks with instance names.
    
    Rewrite how the uniform buffer struct maps get generated so that
    the code works correctly. Instead of flagging accesses, structs inside
    uniform blocks are gathered from uniform block declarations. When
    accesses to structs in uniform blocks are written out in OutputHLSL,
    it's checked whether a mapped struct needs to be used instead of the
    original one.
    
    This code could still be optimized further by limiting mapped structs
    generation to those ones that really need to be used. This is left to
    be done later.
    
    BUG=angleproject:2084
    TEST=angle_end2end_tests
    
    Change-Id: Iee24b3ef15847d2af64554ac74b8e4be5060d18c
    Reviewed-on: https://chromium-review.googlesource.com/751506Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    2ef23e2d
FlagStd140Structs.cpp 2.11 KB
EditWeb IDE
×

Replace FlagStd140Structs.cpp

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.