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
  • RemoveInvariantDeclaration.cpp
Find file
BlameHistoryPermalink
  • Qiankun Miao's avatar
    Remove invariant qualifier for input in fragment shader · d842a6b2
    Qiankun Miao authored Aug 29, 2016
    ESSL and GLSL are not consistent on invariant matching in vertex shader
    and fragment shader. See the following rules:
    ESSL 1.00 - input and output must match
    ESSL 3.00 - only output, inputs cannot be declared as invariant.
    
    GLSL 1.10.59 - does not exist
    GLSL 1.20.8  - input and output must match
    GLSL 1.30.10 - input and output must match
    GLSL 1.40.8  - input and output must match
    GLSL 1.50.11 - input and output must match
    GLSL 3.30.6  - input and output must match
    GLSL 4.00.9  - input and output must match
    GLSL 4.10.6  - input and output must match
    GLSL 4.20.11 - input can omit invariant
    GLSL 4.30.8  - input can omit invariant
    GLSL 4.40.9  - input can omit invariant
    GLSL 4.50.5  - input can omit invariant
    
    Since GLSL 4.20, invariant qualifier description were changed to:
    "
    Only variables output from a shader (including those that are then input
    to a subsequent shader) can be candidates for invariance. This includes
    user-defined output variables and the built-in output variables. As only
    outputs need be declared with invariant, an output from one shader stage
    will still match an input of a subsequent stage without the input being
    declared as invariant.
    "
    It's not very clear if input in fragment can be declared as invariant.
    Mesa driver disallows use of input declared as invariant in fragment
    shader, while other drivers may allow it.
    
    In ESSL 3.00, inputs cannot be declared as invariant. ANGLE should
    follow this rule for GLSL >= 4.20.
    
    BUG=chromium:639760
    
    Change-Id: I7f7a07401381ac970488b69752f6d50d4f19d31f
    Reviewed-on: https://chromium-review.googlesource.com/400005Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org>
    Commit-Queue: Corentin Wallez <cwallez@chromium.org>
    d842a6b2
RemoveInvariantDeclaration.cpp 1.18 KB
EditWeb IDE
×

Replace RemoveInvariantDeclaration.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.