Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
S
swiftshader
  • 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
  • swiftshader
  • Repository

Switch branch/tag
  • swiftshader
  • src
  • Pipeline
  • PixelProgram.cpp
Find file
BlameHistoryPermalink
  • Sean Risser's avatar
    Make fragDepth clamping conditional · 024bf325
    Sean Risser authored May 18, 2021
    Per the spec:
    
      If VkPipelineRasterizationStateCreateInfo::depthClampEnable is
      enabled, before the sample’s zf is compared to za, zf is clamped to
      [min(n,f),max(n,f)], where n and f are the minDepth and maxDepth depth
      range values of the viewport used by this fragment, respectively.
    
    So when we read oDepth back from a shader that sets fragDepth, it should
    only be clamped when depth clamping is enabled, and it should be clamped
    to the viewport depth clamp values, not [0, 1].
    
    Bug: b/184063472
    Change-Id: I92e99b80f3929b8b8030f41f6a3afbfebda4e737
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54408Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
    Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
    Presubmit-Ready: Alexis Hétu <sugoi@google.com>
    Commit-Queue: Sean Risser <srisser@google.com>
    Tested-by: 's avatarSean Risser <srisser@google.com>
    024bf325
PixelProgram.cpp 15.1 KB
EditWeb IDE
×

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