KhronosGroup / Vulkan-Samples

One stop solution for all Vulkan samples
Apache License 2.0
4.33k stars 647 forks source link

Fixes to iOS render loop and HUD overlay. #1120

Closed billhollings closed 2 months ago

billhollings commented 3 months ago

I created this from a branch on this repo instead of a separate fork, because I was not expecting to need to make a fix.

Fixes #1121 Fixes #1131

General Checklist:

Please ensure the following points are checked:

Sample Checklist

If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist:

asuessenbach commented 3 months ago

You should at least resolve the failing Quality Check.

billhollings commented 2 months ago

You should at least resolve the failing Quality Check.

If tried many times.

  1. For some reason, clang-format works slightly differently on macOS than on other platforms, so running ./scripts/clang_format.py main ends up changing more than expected, and breaks the CI test here.
  2. The CI error messages are incomprehensible to me, so I'm not able to decipher what it's complaining about, in order to simply fix it manually.
gpx1000 commented 2 months ago

https://github.com/KhronosGroup/Vulkan-Samples/actions/runs/10461719961?pr=1120

If you scroll to the bottom you can grab the diff that can be directly run and hopefully fix the issue.

asuessenbach commented 2 months ago

For some reason, clang-format works slightly differently on macOS than on other platforms

Indeed, it should remove white spaces at the end of a line, and it should replace spaces with tabs. This patch shows the difference I would get when running clang-format: 0001-formatting.patch

billhollings commented 2 months ago

@gpx1000 @asuessenbach

Thanks for the help on code formatting. I've got this formatting correctly now.

Plus I've added a couple of other iOS fixes, and updated the title and description above.

billhollings commented 2 months ago

LGTM. Did full batch runs for iOS + macOS and both main_loop_frame() and main_loop() worked correctly. Still need fixes for non-success return codes in iOS viewDidLoad() and renderLoop(), but these can be dealt with in a future PR.

@SRSaunders Would you mind giving this a formal approval, so it can be merged, please?

Once the approvals are in, what is the process for merging? Do I do that? Or is there a designated person responsible for merging?

gpx1000 commented 2 months ago

We usually ask @marty-johnson59 to handle the merging. We usually merge on 3; but Marty, I think this is safe to merge on 2.

SRSaunders commented 2 months ago

@SRSaunders Would you mind giving this a formal approval, so it can be merged, please?

@billhollings I don't have approval rights for this project. I am happy to provide feedback, but I cannot mark the PR as ready for merge. As you see above, @gpx1000 has that ability.

marty-johnson59 commented 2 months ago

Thanks. Given this is Mac (we have limited folks who can test), I'm happy to merge w/ 2. We can revert if needed.