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

Initialize all fields to null or default values in all structs in .hpp files #83

Open
QDanteQ opened this issue Jul 25, 2024 · 0 comments

Comments

@QDanteQ
Copy link

QDanteQ commented Jul 25, 2024

Hello, can you please initialize all fields in structs to null or default value in constructor, otherwise we need to do it on client side and it complicates the code. That's only a case for structs in .hpp files, for structs in .h we can use initializer list.
For example if we need to disable frame generation, typically we need to initialize only ffx::ConfigureDescFrameGeneration.swapChain field. Other fields should be 0 or false. But it's not the case, and we end up having trash in all fields.

  ffx::ConfigureDescFrameGeneration config{};
  config.swapChain = swapchain.GetSwapchain();
  ffx::Configure(m_FGContext, config);

struct ConfigureDescFrameGeneration : public InitHelper<ffxConfigureDescFrameGeneration> {};

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

No branches or pull requests

1 participant