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

Vk ext shader object optional layer #780

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
89d6fe8
Add VK_EXT_shader_object sample
Apr 17, 2023
c76194e
add an ability to have optional vulkan layers. If it's an optional l…
gpx1000 Aug 17, 2023
2b0356d
Merge remote-tracking branch 'upstream/main'
gpx1000 Aug 17, 2023
53482ab
Merge branch 'main' into VK_EXT_shader_object_optional_layer
gpx1000 Aug 17, 2023
a86f7d2
fix the formatting and copyright breaks.
gpx1000 Aug 17, 2023
fb01dcf
get full_screen_exclusive to build.
gpx1000 Aug 17, 2023
33bdc15
clang format locally wants it formatted differently than CI.
gpx1000 Aug 17, 2023
ad8e78c
if there's an error in clang-format then save off the diff output so …
gpx1000 Aug 17, 2023
9290b5f
attempt to fix clang-format
gpx1000 Aug 17, 2023
d1cb82d
Merge remote-tracking branch 'refs/remotes/upstream/main' into VK_EXT…
gpx1000 May 16, 2024
892f289
Refactor validation layers to use vector instead of map
gpx1000 May 16, 2024
48d8b14
revert the change in check.yml
gpx1000 May 16, 2024
e92bdb0
fix the copyright and formating and doxygen problems.
gpx1000 May 16, 2024
3b73db8
revert vulkan and volk submodule changes.
gpx1000 May 17, 2024
d2b132c
clang format
gpx1000 May 17, 2024
27e35ba
update the clang-format
gpx1000 May 17, 2024
709d7de
revert full_screen_exclusive.cpp and hello_triangle.cpp
gpx1000 May 17, 2024
898da21
Merge branch 'main' into VK_EXT_shader_object_optional_layer
gpx1000 Dec 18, 2024
e7e78b1
Refactor layer validation handling for consistency.
gpx1000 Dec 21, 2024
1579864
Fix inconsistent indentation and formatting across files
gpx1000 Dec 21, 2024
90802bf
Add get_validation_layers() method and formatting adjustment
gpx1000 Dec 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix the copyright and formating and doxygen problems.
  • Loading branch information
gpx1000 committed May 16, 2024
commit e92bdb07b5bb436b26174816c6d2cbd3af3874ee
16 changes: 8 additions & 8 deletions framework/core/hpp_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ std::vector<const char *> get_optimal_validation_layers(const std::vector<vk::La

// Otherwise we attempt to enable the individual layers that compose the LunarG meta layer since it doesn't exist
{
"VK_LAYER_GOOGLE_threading",
"VK_LAYER_LUNARG_parameter_validation",
"VK_LAYER_LUNARG_object_tracker",
"VK_LAYER_LUNARG_core_validation",
"VK_LAYER_GOOGLE_unique_objects",
"VK_LAYER_GOOGLE_threading",
"VK_LAYER_LUNARG_parameter_validation",
"VK_LAYER_LUNARG_object_tracker",
"VK_LAYER_LUNARG_core_validation",
"VK_LAYER_GOOGLE_unique_objects",
},

// Otherwise as a last resort we fallback to attempting to enable the LunarG core layer
Expand Down Expand Up @@ -220,7 +220,7 @@ bool enable_all_extensions(const std::vector<const char *> required_

HPPInstance::HPPInstance(const std::string &application_name,
const std::unordered_map<const char *, bool> &required_extensions,
const std::vector<const char *> &required_validation_layers,
const std::vector<const char *> &required_validation_layers,
const std::unordered_map<const char *, bool> &requested_layers,
bool headless,
uint32_t api_version)
Expand Down Expand Up @@ -335,8 +335,8 @@ HPPInstance::HPPInstance(const std::string &applicati
throw std::runtime_error("Required validation layers are missing.");
}

std::unordered_map<const char*, bool> layers = (std::unordered_map<const char*, bool>)(requested_layers);
if(validate_layers(layers, supported_validation_layers))
std::unordered_map<const char *, bool> layers = (std::unordered_map<const char *, bool>) (requested_layers);
gpx1000 marked this conversation as resolved.
Show resolved Hide resolved
if (validate_layers(layers, supported_validation_layers))
{
LOGI("Enabled Validation Layers:")
for (const auto &layer : layers)
Expand Down
3 changes: 2 additions & 1 deletion framework/core/hpp_instance.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
/* Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -53,6 +53,7 @@ class HPPInstance
* @param application_name The name of the application
* @param required_extensions The extensions requested to be enabled
* @param required_validation_layers The validation layers to be enabled
* @param requested_layers The layers that are requested to be enabled (second parameter in unordered map is if required).
* @param headless Whether the application is requesting a headless setup or not
* @param api_version The Vulkan API version that the instance will be using
* @throws runtime_error if the required extensions and validation layers are not found
Expand Down
1 change: 1 addition & 0 deletions framework/core/instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Instance
* @param application_name The name of the application
* @param required_extensions The extensions requested to be enabled
* @param required_validation_layers The validation layers to be enabled
* @param requested_layers The layers that are requested to be enabled (second parameter in unordered map is if required).
* @param headless Whether the application is requesting a headless setup or not
* @param api_version The Vulkan API version that the instance will be using
* @throws runtime_error if the required extensions and validation layers are not found
Expand Down
2 changes: 1 addition & 1 deletion samples/extensions/shader_object/README.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
////
- Copyright 2023 Nintendo
- Copyright 2024 Nintendo
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
Expand Down
Loading