Skip to content

Conversation

asuessenbach
Copy link
Contributor

Description

Type mapping functionality used in vkb::VulkanResource was moved and renamed from core/vulkan_resource.h into the added header vulkan_type_mapping.h. Using that in with vkb::BuilderBase as well.

Build tested on Win10 with VS2022. Run tested on Win10 with NVidia GPU.

General Checklist:

Please ensure the following points are checked:

  • My code follows the coding style
  • I have reviewed file licenses
  • I have commented any added functions (in line with Doxygen)
  • I have commented any code that could be hard to understand
  • My changes do not add any new compiler warnings
  • My changes do not add any new validation layer errors or warnings
  • I have used existing framework/helper functions where possible
  • My changes do not add any regressions
  • I have tested every sample to ensure everything runs correctly
  • This PR describes the scope and expected impact of the changes I am making

Note: The Samples CI runs a number of checks including:

  • I have updated the header Copyright to reflect the current year (CI build will fail if Copyright is out of date)
  • My changes build on Windows, Linux, macOS and Android. Otherwise I have documented any exceptions

If this PR contains framework changes:

  • I did a full batch run using the batch command line argument to make sure all samples still work properly

Sample Checklist

If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist:

  • I have tested the sample on at least one compliant Vulkan implementation
  • If the sample is vendor-specific, I have tagged it appropriately
  • I have stated on what implementation the sample has been tested so that others can test on different implementations and platforms
  • Any dependent assets have been merged and published in downstream modules
  • For new samples, I have added a paragraph with a summary to the appropriate chapter in the readme of the folder that the sample belongs to e.g. api samples readme
  • For new samples, I have added a tutorial README.md file to guide users through what they need to know to implement code using this feature. For example, see conditional_rendering
  • For new samples, I have added a link to the Antora navigation so that the sample will be listed at the Vulkan documentation site

@asuessenbach asuessenbach requested a review from a team August 28, 2024 11:54
@gary-sweet
Copy link
Contributor

Given that these are framework changes, you really should be confirming that you've run a batch test yourself by filling the checkbox above.

@asuessenbach
Copy link
Contributor Author

asuessenbach commented Aug 29, 2024

Given that these are framework changes, you really should be confirming that you've run a batch test yourself by filling the checkbox above.

Totally agree!
But I get so many validation layer errors that are not related to this PR. I just can't run the batch mode through all the samples.
Note: Some of the VVL issues would be fixed with #1013.

@gary-sweet
Copy link
Contributor

Given that these are framework changes, you really should be confirming that you've run a batch test yourself by filling the checkbox above.

Totally agree! But I get so many validation layer errors that are not related to this PR. I just can't run the batch mode through all the samples. Note: Some of the VVL issues would be fixed with #1013.

Why do VVL errors stop the samples from running? I often run batch mode with the VVL off.

@asuessenbach
Copy link
Contributor Author

Why do VVL errors stop the samples from running? I often run batch mode with the VVL off.

Ok, when just ignoring all VVL errors, and skipping ray_tracing_position_fetch and multithreading_render_passes with crash both, with and without my changes, batch modes runs through... does that count as "I did a full batch run using the batch command line argument to make sure all samples still work properly"?

@gary-sweet
Copy link
Contributor

Why do VVL errors stop the samples from running? I often run batch mode with the VVL off.

Ok, when just ignoring all VVL errors, and skipping ray_tracing_position_fetch and multithreading_render_passes with crash both, with and without my changes, batch modes runs through... does that count as "I did a full batch run using the batch command line argument to make sure all samples still work properly"?

Good enough for me. I don't see any crashes in a batch mode run (though I don't have raytracing support). multithreading_render_passes does look different between each mode in the sample though. Not sure if that's supposed to be the case or not.

@gary-sweet
Copy link
Contributor

multithreading_render_passes does look different between each mode in the sample though. Not sure if that's supposed to be the case or not.

Actually, that seems to be fixed with your latest change in #1143

@jeroenbakker-atmind
Copy link
Collaborator

jeroenbakker-atmind commented Sep 24, 2024

Didn't find any issue when running batch mode using the next GPUs:

  • Linux/Intel(R) Arc(tm) A750 Graphics (DG2)
  • Linux/Quadro RTX 6000
  • Linux/AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO)
  • Linux/llvmpipe (LLVM 17.0.6, 256 bits)
  • Apple/Apple M1 Ultra

During compilation on linux there were 4 warnings not be related to this PR. Main also outputs these warnings.

In file included from /usr/include/c++/13/bits/stl_tree.h:63,
                 from /usr/include/c++/13/map:62,
                 from /home/jeroen/vulkan-git/Vulkan-Samples/framework/common/vk_common.h:23,
                 from /home/jeroen/vulkan-git/Vulkan-Samples/framework/builder_base.h:21,
                 from /home/jeroen/vulkan-git/Vulkan-Samples/framework/core/buffer.h:21,
                 from /home/jeroen/vulkan-git/Vulkan-Samples/framework/buffer_pool.h:21,
                 from /home/jeroen/vulkan-git/Vulkan-Samples/samples/performance/specialization_constants/specialization_constants.h:20,
                 from /home/jeroen/vulkan-git/Vulkan-Samples/samples/performance/specialization_constants/specialization_constants.cpp:18:
In static member function ‘static _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = vkb::rendering::Light; _Up = vkb::rendering::Light; bool _IsMove = false]’,
    inlined from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = vkb::rendering::Light*; _OI = vkb::rendering::Light*]’ at /usr/include/c++/13/bits/stl_algobase.h:506:30,
    inlined from ‘_OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = vkb::rendering::Light*; _OI = vkb::rendering::Light*]’ at /usr/include/c++/13/bits/stl_algobase.h:533:42,
    inlined from ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = __gnu_cxx::__normal_iterator<vkb::rendering::Light*, vector<vkb::rendering::Light> >; _OI = vkb::rendering::Light*]’ at /usr/include/c++/13/bits/stl_algobase.h:540:31,
    inlined from ‘_OI std::copy(_II, _II, _OI) [with _II = __gnu_cxx::__normal_iterator<vkb::rendering::Light*, vector<vkb::rendering::Light> >; _OI = vkb::rendering::Light*]’ at /usr/include/c++/13/bits/stl_algobase.h:633:7,
    inlined from ‘vkb::BufferAllocationC SpecializationConstants::ForwardSubpassCustomLights::allocate_custom_lights(vkb::CommandBuffer&, const std::vector<vkb::sg::Light*>&, size_t) [with T = CustomForwardLights]’ at /home/jeroen/vulkan-git/Vulkan-Samples/samples/performance/specialization_constants/specialization_constants.h:96:13,
    inlined from ‘virtual void SpecializationConstants::ForwardSubpassCustomLights::draw(vkb::CommandBuffer&)’ at /home/jeroen/vulkan-git/Vulkan-Samples/samples/performance/specialization_constants/specialization_constants.cpp:142:66:
/usr/include/c++/13/bits/stl_algobase.h:437:30: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ writing between 65 and 9223372036854775807 bytes into a region of size 64 overflows the destination [-Wstringop-overflow=]
  437 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jeroen/vulkan-git/Vulkan-Samples/samples/performance/specialization_constants/specialization_constants.h: In member function ‘virtual void SpecializationConstants::ForwardSubpassCustomLights::draw(vkb::CommandBuffer&)’:
/home/jeroen/vulkan-git/Vulkan-Samples/samples/performance/specialization_constants/specialization_constants.h:76:27: note: at offset 16 into destination object ‘light_info’ of size 80
   76 |                         T light_info;
      |                           ^~~~~~~~~~

@marty-johnson59
Copy link
Contributor

Merging - 3 approvals. Thanks everyone!

@marty-johnson59 marty-johnson59 merged commit 537eb57 into KhronosGroup:main Sep 24, 2024
1 check passed
@asuessenbach asuessenbach deleted the unify_Builder branch September 24, 2024 15:00
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.

5 participants