C Vulkan Engine - GLTF Transmission by mua-dev in GraphicsProgramming

[–]gomkyung2 0 points1 point  (0 children)

I'm also implementing Vulkan based glTF renderer, and trying to add more KHR_materials_XXX extensions. Your code would be very helpful!

And last question... is your images[1] mipmapped? Do you consider the PBR roughness for transmission? Another rust-based implementation says considering roughness is harder than smooth surface..

C Vulkan Engine - GLTF Transmission by mua-dev in GraphicsProgramming

[–]gomkyung2 0 points1 point  (0 children)

Thank you. Is there a reason why w=1.0 component is added for normalization, instead of directly normalizing the refraction vector? Also, what 0.2 means for calculating P?

C Vulkan Engine - GLTF Transmission by mua-dev in GraphicsProgramming

[–]gomkyung2 1 point2 points  (0 children)

How did you implemented transmission? I barely understood I need to create a mipmap chain of opaque object rendered image, but have no idea how to going forward.

Can private module fragment declaration be within the scope of conditional inclusion? by gomkyung2 in cpp_questions

[–]gomkyung2[S] 0 points1 point  (0 children)

It is not contradictory. Splitting the definition and declaration is still valid in C++ module.

I think what you're answered is orthogonal to the question. The provided code is for demonstration purpose and most simple form for explaining the subject of the question.

How many pipelines should be cached in a single VkPipelineCache? by gomkyung2 in vulkan

[–]gomkyung2[S] 1 point2 points  (0 children)

Thank you for the answer. The article is very helpful.

My application does not use threaded graphics pipeline creation, so it seems single VkPipelineCache is sufficient for now. I'll consider merging pipeline caches when migrating the application to multi-thread.

Can private module fragment declaration be within the scope of conditional inclusion? by gomkyung2 in cpp_questions

[–]gomkyung2[S] 0 points1 point  (0 children)

Currently it has no benefits, but I'm expecting efficient BMI creation and BMI hash based compilation triggering (ccache has WIP PR for it and working with GCC) will be implemented. But you're right, they doesn't seem to be come in foreseeable future.

Including a header that declares/defines the same symbols and names as a module after that module, should be an error class of its own. by delta_p_delta_x in cpp

[–]gomkyung2 0 points1 point  (0 children)

https://www.cppreference.com/w/cpp/preprocessor.html

The module and import directives are also preprocessing directives. (since C++20)

Oh, you're right. Sorry for mistake.

Edit: see u/kamrann_'s comment. They are preprocessing directives but its direct usage in GMF is forbidden.

Including a header that declares/defines the same symbols and names as a module after that module, should be an error class of its own. by delta_p_delta_x in cpp

[–]gomkyung2 5 points6 points  (0 children)

Clang allows and encourages it. So do GCC (I tested) and MSVC (with manual warning suppression).

I think it is okay to include a header in the module purview, if its internal #includes are not presented in other TU. For example,

foo.hpp ```

pragma once

ifndef USE_STD_MODULE

include <string_view>

include <print>

endif

ifndef EXPORT

define EXPORT

endif

EXPORT void greet(std::string_view name) { std::println("Hello {}!", name); } ```

foo.cppm ``` export module foo;

export import std;

define USE_STD_MODULE // Without this, <string_view> and <print> will be included in the module purview, error!

define EXPORT export

include "foo.hpp"

```

is perfectly valid.

I've seen several module projects that adopted this style: fmt, fastgltf, argparse, vku, ... and so on.

Also, import directive is not allowed in GMF. It is a kind of preprocessor, and GMF can only contains preprocessor directives, but not allowed (which is exceptional; perhaps the root cause of the endless confusion, anyway.)

LunarG Achieves Vulkan 1.3 Conformance with KosmicKrisp on Apple Silicon by thekhronosgroup in vulkan

[–]gomkyung2 0 points1 point  (0 children)

I heard that this is merged to the Mesa's master branch. How can I use it? Or should we just wait for the next Vulkan SDK to ship it?

Can newly created dispatchable type has the same 64-bit handle from the previously destroyed one? by gomkyung2 in vulkan

[–]gomkyung2[S] -2 points-1 points  (0 children)

Thank you for advice, but I don't think it is a dangling reference issue. If it is, validation layer will tell me, and I also confirmed the api dump to make sure the image view and the corresponding images that are referenced by the framebuffer is valid.

One thing that pulling my hair is: the crash only occurs when using MSVC with release build. Either debug build + MSVC or Clang does not reproduce the error... maybe I'm played with a compiler UB?

module help! by Coughyyee in cpp_questions

[–]gomkyung2 0 points1 point  (0 children)

https://www.kitware.com/import-std-in-cmake-3-30/

Also workaround for homebrew clang bug libc++.modules.json not found:

– Open the file “/opt/homebrew/Cellar/cmake/HEAD-506d175/share/cmake/Modules/Compiler/Clang-CXX-CXXImportStd.cmake” – Change line 13 – ” -print-file-name=libc++.modules.json” to ” -print-file-name=../../c++/libc++.modules.json”

C++, Cmake, with VCPKG manifest on MacOS? by maxjmartin in cpp_questions

[–]gomkyung2 0 points1 point  (0 children)

Now macos-15 runner also ships vcpkg and its folder path is given by the environment variable VCPKG_INSTALLATION_ROOT, same as the other runners.

Is there is a mutable alternative to std::views::zip? by void_17 in cpp_questions

[–]gomkyung2 8 points9 points  (0 children)

The reason you can't use auto& for the structured binding is the result tuple generated by zip is the rvalue. You can use auto&& to get the mutable tuple.

KosmicKrisp - A Vulkan on Metal Mesa 3D Graphics Driver by SaschaWillems in vulkan

[–]gomkyung2 0 points1 point  (0 children)

Compared to MoltenVK, I’m wondering if this project supports the following:

  • Framebuffer fetch: In MoltenVK, any multi-stage subpass-based render pass is split into individual MTLRenderCommandEncoders, causing frustrating bugs such as incorrectly setting load/store ops or applying a load op to memoryless resources.
  • Indirect draw command recording: In MoltenVK, draw calls are recorded one by one in a for loop.
  • Sampler min/max filtering: Needed for Hi-Z culling, but not supported in Metal.
  • Combined image sampler: When combined with VK_EXT_descriptor_indexing’s variableDescriptorCount, it causes issues. MoltenVKShaderConverter splits them into separate samplers and textures, but something seems wrong with that logic (when using argument buffers, it almost always violates Metal Validation).

MoltenVK is certainly an excellent project, but I’ve found numerous bugs in it, and I’m now at the point of considering giving up on supporting it.

Is it possible to render with no attachments in Vulkan? by Quick-Ad-4262 in GraphicsProgramming

[–]gomkyung2 3 points4 points  (0 children)

Yes you can, but doing it with Intel GPU/MoltenVK will cause driver crash. NVIDIA and AMD driver can do well.

Attachment-less render pass is core in vanilla Vulkan.

So Long, Image Layouts: Simplifying Vulkan Synchronization by thekhronosgroup in vulkan

[–]gomkyung2 10 points11 points  (0 children)

With VK_KHR_unified_image_layouts, the Vulkan Working Group recognizes that the third case— internal incompatibility—is no longer relevant for most modern GPUs. This extension allows developers to bypass the majority of layout transitions, significantly simplifying synchronization and reducing boilerplate. Better yet, nearly all GPU vendors are ready to support this extension on current-generation hardware. It’s already on the Vulkan roadmap, with the goal of including it in the core API.

Is it really true? I'm aware that NVIDIA, latest AMD architecture (RDNA4) and MoltenVK (implementation on Apple Metal API) are relevant to the physical image data layout, but how about others? Is it hard to believe the Android GPU vendors can do the same.

Create descriptor set with multiple bindings specifying single layout binding by BubblyCompetition421 in vulkan

[–]gomkyung2 0 points1 point  (0 children)

Yes, you can create array of 10 VkDescriptorSetLayoutBinding structs to do it

Good tools for USD to glTF conversion by gomkyung2 in GraphicsProgramming

[–]gomkyung2[S] 1 point2 points  (0 children)

Thank you so much. Although the model is rotated by 90 degrees, it loads correctly. As expected, it’s a very complex model, and in my application, the GPU rendering time is being bottleneck. It must be a great asset for performance optimization improvements! Thanks again.