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.identifier.sample.frag
Find file
BlameHistoryPermalink
  • steve-lunarg's avatar
    HLSL: allow "sample" in expressions. · a64ed3eb
    steve-lunarg authored Dec 18, 2016
    Unlike other qualifiers, HLSL allows "sample" to be either a qualifier keyword or an
    identifier (e.g, a variable or function name).
    
    A fix to allow this was made a while ago, but that fix was insufficient when 'sample'
    was used in an expression.  The problem was around the initial ambiguity between:
    
       sample float a; // "sample" is part of a fully specified type
    and
       sample.xyz;     // sample is a keyword in a dot expression
    
    Both start the same.  The "sample" was being accepted as a qualifier before enough
    further parsing was done to determine we were not a declaration after all.  This
    consumed the token, causing it to fail for its real purpose.
    
    Now, when accepting a fully specified type, the token is pushed back onto the stack if
    the thing is not a fully specified type.  This leaves it available for subsequent
    purposes.
    
    Changed the "hlsl.identifier.sample.frag" test to exercise this situation, distilled
    down from a production shaders.
    a64ed3eb
hlsl.identifier.sample.frag 478 Bytes
EditWeb IDE
×

Replace hlsl.identifier.sample.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.