Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the use of descriptor set indices in the PAL metadata #497

Commits on Mar 9, 2020

  1. Remove duplicate definitions of Llpc::{InvalidValue,SizeOfVec4}

    There is a second set of definitions in llpcUtil.h, which could cause
    conflicts going forward.
    nhaehnle committed Mar 9, 2020
    Configuration menu
    Copy the full SHA
    d9d9cf5 View commit details
    Browse the repository at this point in the history
  2. Clarify the use of descriptor set indices in the PAL metadata

    The PAL metadata contains a userdata mapping which tells PAL the data to
    load into each loaded userdata SGPR. There are two kinds of values:
    
    1. Indices into the userdata table maintained by the client driver via
       Pal::ICmdBuffer::CmdSetUserData
    2. Special "system" values as listed in Util::Abi::UserDataMapping
    
    Pointers to descriptor sets fall into the first category. The client driver
    tells the compiler which location in the userdata table will contain the
    pointer to each descriptor set (via the ResourceMappingNode part of the
    pipeline build info).
    
    When compiling a partial pipeline, the layout of the userdata table may not
    be known yet. The compiler can already decide which SGPR will hold the
    pointer to the descriptor set (the "key" part of the metadata), but it
    does not yet know the final "value" part of the metadata.
    
    To solve this problem, introduce a new kind of value, the
    VkDescriptorSetIndex, which is emitted as part of the PAL metadata during
    the initial compiler. It is resolved, when linking the different parts of a
    pipeline together.
    
    The emitDescriptorSetIndexInMetadata option instructs the compiler to
    generate these VkDescriptorSetIndex mapping.
    
    Resolving any such mappings during linking happens unconditionally while
    merging the metadata.
    
    This commit integrates the "updating" of the "meta note" into the merging
    of the metadata, as this is conceptually one operation. Some method names
    are updated to better reflect the asymmetry in what they do.
    
    The updateDescInElf option is renamed to emitDescriptorSetIndexInMetadata
    to better reflect the purpose of the option.
    nhaehnle committed Mar 9, 2020
    Configuration menu
    Copy the full SHA
    3c62770 View commit details
    Browse the repository at this point in the history