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

Conversation

gpx1000
Copy link
Collaborator

@gpx1000 gpx1000 commented Aug 17, 2023

Description

This fixes the remaining issues in the newly accepted/merged VK_EXT_shader_object PR.

Coleman Jonas and others added 9 commits August 15, 2023 10:26
…yer, and it's not found, continue to load the application instead of erroring out.

Fix the validation layer discovered issues in shader object.  The render_pass gets created twice (once in the super class prepare and once after the child class recreates the frame buffer.  Destroying the first created renderpass will solve this.).  Also the heightmap_texture and terrain_array_texture both get their sampler's default created and then explicitly recreated.  So adding the destroy sampler just before recreation solves the second and third validation issue.
…it can be downloaded after the run and applied as a patch.
@SaschaWillems SaschaWillems self-requested a review August 18, 2023 16:16
SaschaWillems
SaschaWillems previously approved these changes Aug 18, 2023
Copy link
Collaborator

@SaschaWillems SaschaWillems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@asuessenbach asuessenbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR works.
But instead of improving the somewhat hacky usage of VulkanSample::get_validation_layers, I would completely remove that function, and instead introduce some VulkanSample::add_instance_layer (or maybe just VulkanSample::add_layer, as there's nothing like a device layer), similar to VulkanSample::add_instance_extension, and handle it analogously.

.github/workflows/check.yml Outdated Show resolved Hide resolved
gpx1000 added 2 commits May 15, 2024 17:55
…_shader_object_optional_layer

# Conflicts:
#	framework/core/hpp_instance.h
#	framework/core/instance.h
#	framework/hpp_vulkan_sample.cpp
#	framework/hpp_vulkan_sample.h
#	framework/vulkan_sample.cpp
#	samples/extensions/shader_object/README.adoc
#	third_party/volk
#	third_party/vulkan
Related functions and variables have been updated to accommodate the change. This ensures consistency and optimizes the performance for layer searches and validations.
SaschaWillems
SaschaWillems previously approved these changes May 28, 2024
framework/core/hpp_instance.cpp Outdated Show resolved Hide resolved
framework/core/hpp_instance.cpp Outdated Show resolved Hide resolved
framework/core/hpp_instance.cpp Show resolved Hide resolved
framework/core/hpp_instance.cpp Outdated Show resolved Hide resolved
framework/core/instance.cpp Show resolved Hide resolved
samples/extensions/shader_object/README.adoc Outdated Show resolved Hide resolved
samples/extensions/shader_object/README.adoc Show resolved Hide resolved
// destroy created sampler before re-creating
vkDestroySampler(get_device().get_handle(), heightmap_texture.sampler, nullptr);
vkDestroySampler(get_device().get_handle(), terrain_array_textures.sampler, nullptr);

// Setup a mirroring sampler for the height map
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the calling load_assets multiple times bug has been fixed.

Updated validation layer mechanisms to use `unordered_map` for better clarity and flexibility in distinguishing required and optional layers. Adjusted related structures, methods, and logging to align with the new approach. Simplifies enabling and validation of layers across the framework and samples.
Aligned indentation and formatting in multiple files to maintain code consistency. Changes include correcting spacing, adjusting alignment in function signatures, and fixing misplaced inline elements where necessary.
Introduce the get_validation_layers() method in ShaderObject to return validation layer information. Additionally, make a minor formatting adjustment to vk::DynamicLoader initialization for readability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants