Skip to content
  • Vanessa Karolek's avatar
    [#7] add new context functionalities · 47fe8a97
    Vanessa Karolek authored
    The validation layers are only enabled, if in debug mode in the IDE.
    If enabled, it will be checked, if validation layers are supported.
    
    Extensions for both the instance and the physical device can be added via the Context::create() function.
    Per default, the instanceExtensions and deviceExtensions are empty.
    Thus, the user is not forced to add any extension.
    
    Queues are now supported!
    The user can determine the amount of queues (default: 1, but we can change that...) and their purpose e.g. COMPUTE or TRANSFER etc.
    If their amount and purpose is specified it is checked, if the picked physical device has enough of them.
    The queues are chosen in a way that the maximal amount of available queues of specified purpose are picked,
    Example 1: If we choose 20 queues with purpose COMPUTE and we have 16 of them available, we pick 16 of them.
    Example 2: If we choose 30 queues with no specified purpose, we choose as many queues as we have available.
    
    If the computer has more than one physical device available (e.g. an integrated and an dedicated GPU or several dedicated GPUs), then it will be checked, which of all available devices is the optimal one.
    The choice is based on a scoring system.
    The choice criteria are: the abilities of the available queues, the VRAM and the GPU type (discrete vs. integrated vs. other)
    47fe8a97