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.shift.per-set.frag
Find file
BlameHistoryPermalink
  • LoopDawg's avatar
    Add per-descriptor-set IO mapping shift values. · 08a14422
    LoopDawg authored Oct 17, 2017
    This PR adds the ability to provide per-descriptor-set IO mapping shift
    values.  If a particular binding does not land into a per-set value,
    then it falls back to the prior behavior (global shifts per resource class).
    
    Because there were already 6 copies of many different methods and internal
    variables and functions, and this PR would have added 6 more, a new API is
    introduced to cut down on replication and present a cleaner interface.
    For the global (non-set-specific) API, the old entry points still exist
    for backward compatibility, but are phrased internally in terms of the
    following.
    
        // Resource type for IO resolver
        enum TResourceType {
            EResSampler,
            EResTexture,
            EResImage,
            EResUbo,
            EResSsbo,
            EResUav,
            EResCount
        };
    
    Methods on TShader:
    
        void setShiftBinding(TResourceType res, unsigned int base);
        void setShiftBindingForSet(TResourceType res, unsigned int set, unsigned int base);
    
    The first method replaces the 6 prior entry points of various spellings, which
    exist now in depreciated form.  The second provides per-resource-set functionality.
    Both accept an enum from the list above.
    
    From the command line, the existing options can accept either a single shift value as
    before, or a series of 1 or more [set offset] pairs.  Both can be provided, as in:
    
        ... --stb 20 --stb 2 25 3 30 ...
    
    which will use the offset 20 for anything except descriptor set 2 (which uses 25) and
    3 (which uses 30).
    08a14422
hlsl.shift.per-set.frag 1.13 KB
EditWeb IDE
×

Replace hlsl.shift.per-set.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.