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
  • vulkan
  • RendererVk.cpp
Find file
BlameHistoryPermalink
  • Shahbaz Youssefi's avatar
    Vulkan: Emulate subgroup ops in seamful cubemap emulation · 5a2553a7
    Shahbaz Youssefi authored Aug 07, 2019
    Where subgroup ops are not available, they are emulated as such:
    
    Code with subgroup ops:
    
        float lH = subgroupQuadSwapHorizontal(layer);
        float lV = subgroupQuadSwapVertical(layer);
        float lD = subgroupQuadSwapDiagonal(layer);
    
        bool isHelperH = subgroupQuadSwapHorizontal(gl_HelperInvocation);
        bool isHelperV = subgroupQuadSwapVertical(gl_HelperInvocation);
    
        if (gl_HelperInvocation)
        {
            layer = !isHelperH ? lH : !isHelperV ? lV : lD;
        }
    
    Emulated code:
    
        float nonHelperLayer = gl_HelperInvocation ? 0.0 : layer;
        float lH = abs(dFdxFine(nonHelperLayer));
        float lV = abs(dFdyFine(nonHelperLayer));
        float lD = abs(dFdxFine(lV));
    
        float isHelperDiffH = abs(dFdxFine(float(gl_HelperInvocation)));
        bool isNonHelperH = isHelperDiffH > 0.5;
    
        float isHelperDiffV = abs(dFdyFine(float(gl_HelperInvocation)));
        bool isNonHelperV = isHelperDiffV > 0.5;
    
        if (gl_HelperInvocation)
        {
            layer = isNonHelperH ? lH : isNonHelperV ? lV : lD;
        }
    
    Both paths are supported as on nvidia devices the emulated code
    misbehaves.  This change therefore effectively only enables seamful cube
    map emulation on Android where subgroup operations are not supported.
    
    Bug: angleproject:3243
    Bug: angleproject:3732
    Change-Id: I9664d9760756758748183eb121c626f176789f3a
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1742222Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
    Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    5a2553a7
RendererVk.cpp 60.1 KB
EditWeb IDE
×

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