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
  • TranslatorESSL.cpp
Find file
BlameHistoryPermalink
  • Qiankun Miao's avatar
    Reland "Remove invariant qualifier for input in fragment shader" · 705a9194
    Qiankun Miao authored Aug 29, 2016
    This relands https://chromium-review.googlesource.com/#/c/400005/.
    
    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. This CL removes invariant
    declaration for input in fragment shader except AMD driver in Linux.
    AMD's driver obviously contradicts the spec by forcing invariance to
    match between vertex and fragment shaders.
    
    BUG=chromium:639760, chromium:659326
    TEST=conformance/glsl/misc/shaders-with-invariance.html and
    conformance/glsl/bugs/invariant-does-not-leak-across-shaders.html
    
    Change-Id: I0aa9be14f0cee7a11a249c91fba27c570c52ca1b
    Reviewed-on: https://chromium-review.googlesource.com/404228Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
    705a9194
TranslatorESSL.cpp 3.93 KB
EditWeb IDE
×

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