Skip to content

Modified ShaderDesc type for aggregate initialization: #70

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

siukosev
Copy link
Contributor

  • Removed user-declared constructors
  • Removed these constructors usages

 - Removed user-declared constructors
 - Removed these constructors usages
@apanteleev
Copy link
Collaborator

Thanks, but the benefits of this change are not clear to me. Does it allow something that was not allowed before?

@manuelk
Copy link

manuelk commented Apr 18, 2025

Aggregate initialization is the current guidelines recommendation
https://en.cppreference.com/w/cpp/language/aggregate_initialization

Designated initializers are probably the largest benefit, but nuking a bunch of redundant crud is also always a good thing (tm).

We can argue about performance, but IMHO this is irrelevant here.

@siukosev
Copy link
Contributor Author

In the end, there's nothing new except designated initializers. However, most NVRHI structures are aggregate, and it seems convenient for ShaderDesc to be one as well.

@apanteleev apanteleev merged commit 136682f into NVIDIA-RTX:main Apr 25, 2025
4 checks passed
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.

3 participants