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
  • renderer
  • glslang_wrapper_utils.cpp
Find file
BlameHistoryPermalink
  • Shahbaz Youssefi's avatar
    Vulkan: Fix precision transformation for geometry shaders · fcb6b5a5
    Shahbaz Youssefi authored Nov 25, 2020
    When a varying precision mismatch is present between two stages, the
    SPIR-V transformer transforms the following:
    
        in precision1 type1 inVar;
        out precision2 type2 outVar;
    
        void main()
        {
            f(inVar);
            outVar = g();
        }
    
    to:
    
        in precision3 type1 inVarModified;
        out precision4 type2 outVarModified;
        precision1 type1 inVarTurnedPrivate;
        precision2 type2 outVarTurnedPrivate;
    
        void main()
        {
            // Input preamble
            inVarTurnedPrivate = inVarModified;
    
            f(inVarTurnedPrivate);
            outVarTurnedPrivate = g();
    
            // Output preamble
            outVarModified = outVarTurnedPrivate;
        }
    
    This doesn't work for geometry shaders as they take the varying outputs
    on EmitVertex() as opposed to return from main.  This change simply
    places the output preamble before every EmitVertex() instead of at the
    end of the shader, if it's a geometry shader.
    
    Bug: angleproject:5403
    Change-Id: Ie395a3270c6903c54b49f64a26bc5297044cbaeb
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2561939
    Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    fcb6b5a5
glslang_wrapper_utils.cpp 140 KB
EditWeb IDE
×

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