Skip to content

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

Switch branch/tag
  • glslang
  • Test
  • hlsl.promote.atomic.frag
Find file
BlameHistoryPermalink
  • steve-lunarg's avatar
    HLSL: opcode specific promotion rules for interlocked ops · 05f75142
    steve-lunarg authored Dec 06, 2016
    PR #577 addresses most but not all of the intrinsic promotion problems.
    This PR resolves all known cases in the remainder.
    
    Interlocked ops need special promotion rules because at the time
    of function selection, the first argument has not been converted
    to a buffer object.  It's just an int or uint, but you don't want
    to convert THAT argument, because that implies converting the
    buffer object itself.  Rather, you can convert other arguments,
    but want to stay in the same "family" of functions.  E.g, if
    the first interlocked arg is a uint, use only the uint family,
    never the int family, you can convert the other args as you please.
    
    This PR allows making such opcode and arg specific choices by
    passing the op and arg to the convertible lambda.  The code in
    the new test "hlsl.promote.atomic.frag" would not compile without
    this change, but it must compile.
    
    Also, it provides better handling of downconversions (to "worse"
    types), which are permitted in HLSL.  The existing method of
    selecting upconversions is unchanged, but if that doesn't find
    any valid ones, then it will allow downconversions.  In effect
    this always uses an upconversion if there is one.
    05f75142
hlsl.promote.atomic.frag 433 Bytes
EditWeb IDE
×

Replace hlsl.promote.atomic.frag

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.