Skip to content

Updated some dx12 code format#2873

Open
zongdu-arm wants to merge 1 commit into
LunarG:devfrom
zongdu-arm:fix_issues_for_dx12
Open

Updated some dx12 code format#2873
zongdu-arm wants to merge 1 commit into
LunarG:devfrom
zongdu-arm:fix_issues_for_dx12

Conversation

@zongdu-arm
Copy link
Copy Markdown
Contributor

@zongdu-arm zongdu-arm commented Apr 15, 2026

Updated some dx12 code with the clang-format, reduce some conflicts in the fork branch.

@zongdu-arm zongdu-arm requested a review from a team as a code owner April 15, 2026 03:30
@zongdu-arm zongdu-arm force-pushed the fix_issues_for_dx12 branch 2 times, most recently from 4b4881f to 2dc58f4 Compare April 16, 2026 05:18
@zongdu-arm zongdu-arm changed the title Updated some code with the clang-format Updated some dx12 code with the clang-format Apr 16, 2026
@zongdu-arm
Copy link
Copy Markdown
Contributor Author

@locke-lunarg

std::pair<UINT, UINT> GetSwapchainDimensions()
{
return {swapchain_width_, swapchain_height_};
}
Copy link
Copy Markdown
Contributor

@locke-lunarg locke-lunarg Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent formatting changes here compared to other changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bradgrantham-lunarg
Copy link
Copy Markdown
Contributor

@zongdu-arm I recommend we don't approve changes that are just cosmetic/formatting. Can you tell me why it's important to make these changes? Thanks!

@zongdu-arm
Copy link
Copy Markdown
Contributor Author

@zongdu-arm I recommend we don't approve changes that are just cosmetic/formatting. Can you tell me why it's important to make these changes? Thanks!

@bradgrantham-lunarg , Because your CI doesn't check code style, the some submitted code is formatted haphazardly.
Can you add code style checks to every pull request? If so, why wasn't this code checked and intercepted?

@bradgrantham-lunarg
Copy link
Copy Markdown
Contributor

@zongdu-arm I recommend we don't approve changes that are just cosmetic/formatting. Can you tell me why it's important to make these changes? Thanks!

@bradgrantham-lunarg , Because your CI doesn't check code style, the some submitted code is formatted haphazardly. Can you add code style checks to every pull request? If so, why wasn't this code checked and intercepted?

Thanks for bringing this up! While responding to you I found inconsistencies and did a deep dive on our GitHub code style check. We do check code style (see .github/workflows/ci_build.yml) but our code check has been in only Ubuntu GCC since its addition 6 years ago before I joined the project! (7dc788f) So our GitHub PR checks weren't checking the DX12 sources. I've added PR 2882 to also check style in the Windows build.

I believe it is still good policy to not merge bare commits whose only change is style. It complicates the git history and adds a step to git bisect with no content. I think it's okay to have format changes piggybacking in a squashed commit for a PR that fixed a bug or added a feature or updated docs.

I think it's helpful to always ask "what substantive change does this commit add that someone reading through the source will take away?" If there is none, then maybe the change should not be committed. Having to read a change and understand that it makes no functional change takes time both in commands (git bisect) and thinking. Pure formatting is one of those, as well as refactoring just to meet an engineer's personal style preference. I apologize that I'm scrutinizing your change; it's possible some formatting-only commits have snuck in over the history and your PR called out more attention because it touches many files. So I'll recommend to the reviewers group that we don't merge this but I'm really grateful you submitted it!

@zongdu-arm zongdu-arm force-pushed the fix_issues_for_dx12 branch from 2dc58f4 to 38ed348 Compare April 22, 2026 06:57
@zongdu-arm zongdu-arm changed the title Updated some dx12 code with the clang-format Updated some dx12 code format Apr 22, 2026
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