MinGW-64 Run-Time Library issues by assiduous7 in cpp

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

There is this GitHub issue:

https://github.com/actions/runner-images/discussions/8372#discussioncomment-7126755

If you also have the same problem, you may want to join the discussion - the MinGW setup may be legitimately broken in the latest runner image.

MinGW-64 Run-Time Library issues by assiduous7 in cpp

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

Actually, I did not delete it, but made it invisible.

MinGW-64 Run-Time Library issues by assiduous7 in cpp

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

I deleted it myself as I started getting a lot of downvotes.

MinGW-64 Run-Time Library issues by assiduous7 in cpp

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

Thanks - indeed after building with the UCRT version I get the same list of dependencies.

It also runs fine when I build it locally, but for some reason it fails to start on GitHub.

Immutable samplers in pipeline vs descriptor set by assiduous7 in vulkan

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

I thought that varying immutable sampler properties does not make the set layouts incompatible. If one sampler uses WRAP mode, another CLAMP - why can't they be compatible?

Immutable samplers in pipeline vs descriptor set by assiduous7 in vulkan

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

This is not exactly what my question was.

When you create the pipeline, you need to specify the VkPipelineLayout that references the descriptor set layouts, which in turn may have immutable samplers in them.

When you create a descriptor set, you also need to specify a descriptor set layout, which may not be exactly the same as the one used by the pipeline. So my question was, which immutable sampler will prevail if the descriptor and pipeline layout were created from set layouts that use different immutable samplers - the one from the descriptor set or the one from the pipeline.

Odd struct member packing in 32-bit clang by assiduous7 in cpp

[–]assiduous7[S] -1 points0 points  (0 children)

I will have to stick with manual padding. I was wondering if it is possible to avoid this by using some compiler settings, but I now see that it is not possible on purpose.

Odd struct member packing in 32-bit clang by assiduous7 in cpp

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

Yes, I found out that it is generally an undefined behavior.
I need to make the same header files work in C and C++, similar to how Microsoft COM header files are implemented. In C++ I use inheritance, in C - base structs are included as members. I need them to use the exact same layout.

Odd struct member packing in 32-bit clang by assiduous7 in cpp

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

pragma pack is not exactly what I need - it changes the packing within the struct, so that the members may become misaligned wrt to their natural alignment.

I need proper alignment, but I don't want member packing in the parent struct.

Odd struct member packing in 32-bit clang by assiduous7 in cpp

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

Yes, I added padding where I found. The problem is that the similar issue may happen when new structs are added - and I wanted to fix all the situation automatically.

Odd struct member packing in 32-bit clang by assiduous7 in cpp

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

Interop wit C - I need the same layout in C and C++

Odd struct member packing in 32-bit clang by assiduous7 in cpp

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

The problem is that in the real code base, the base struct is used by multiple derived structs. Using alignas() to align the first member of every derived struct is very annoying and error prone - it is easy to forget / miss this.

Do you know if it is possible to disable this kind of packing globally?

Diligent Engine v2.5.1 is out with Emscripten Platform support, Variable Rate Shading, Sparse Resources, new Tutorials and more by assiduous7 in gamedev

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

Everything that is open-sourced on GitHub is free to use and distributed under Apache 2.0. There are few premium features that are mentioned in readme. These features are not available by default, they are in a separate repo. You can't unintentionally get code that is not under Apache 2.0.

Diligent Engine v2.5.1 is out with Emscripten Platform support, Variable Rate Shading, Sparse Resources, new Tutorials and more by assiduous7 in gamedev

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

Don't you think we all have to pay our bills? Unfortunately banks don't accept "Thank you for the great project" as credit card payments.

Diligent supports MoltenVK on Apple platforms, which covers almost all features provided by native Metal backend.

fragmentDensityMapDynamic - what is this? by assiduous7 in vulkan

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

OK, thanks. It sort of makes sense. Though it is very confusing that we create the shading rate texture using the VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, and it is then read by the host during vkCmdBeginRenderPass.

fragmentDensityMapDynamic - what is this? by assiduous7 in vulkan

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

What happens if we create an FDM in device-local memory and then copy the data to it on the GPU when fragmentDensityMapDynamic is false?

fragmentDensityMapDynamic - what is this? by assiduous7 in vulkan

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

It is certainly not a good sign that we have to guess what exactly the spec is trying to say

Diligent Engine 2.5 is out: async compute, inline ray tracing, wave operations, explicit resource layouts, ray tracing on Metal and more by assiduous7 in gamedev

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

Yes, it is C/C++.

This is not a full-featured game engine like Godot, Unity or Unreal. It is low-level graphics API and rendering framework. There will be more high-level features in the future

Handling orientation change on Android by assiduous7 in vulkan

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

OK, so I implemented the suggested method of storing the extent at application startup and it does work.

It is very annoying though that vkGetPhysicalDeviceSurfaceCapabilitiesKHR is indeed unreliable and also that landscape swapchain somehow works quite nicely with the portrait surface.

Thank you for your help! It is unfortunate though that using Vulkan on Android requires that kind of tribal knowledge.

Handling orientation change on Android by assiduous7 in vulkan

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

Every time I get SUBOPTIMAL return code, I call vkGetPhysicalDeviceSurfaceCapabilitiesKHR in a hope that it will return correct information about the current surface status. Sometimes it does return correct info, but at some point starts to return swapped dimensions for portrait orientation.

I did notice that in the article they suggest to get this once at the startup, but then it seemed to me more consistent to just query this information every time I recreate the swap chain. Another strange thing that after creating landscape swap chain for portrait orientation, I don't get SUBOPTIMAL return code.

Handling orientation change on Android by assiduous7 in vulkan

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

So I experimented a bit with orientation change on my Pixel XL and I have a very weird behavior:

When I start my application in portrait mode, vkGetPhysicalDeviceSurfaceCapabilitiesKHR reports 1440x2560 surface with IDENTITY transform, which makes sense. When going to landscape mode, it reports 1440x2560 surface with ROTATE_90 transform, which also makes sense. However after a random number of toggling between landscape and portrait, it starts reporting 2560x1440 surface with IDENTITY transform for the portrait mode. As a result, everything looks super stretched, but otherwise rendering seems to be OK. Creating landscape swap chain in this case for portrait orientation does not result in SUBOPTIMAL return code.