Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/o3dePublic
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Ensure for-each loops with AZ::RPI::Pass::m_attachmentBindings use the correct attachment binding count#18749

Conversation

mprettner-huawei
Copy link
Contributor

What does this PR do?

This PR introduces a newPassAttachmentBindingList class which is used instead of the (int m_attachmentBindingsSize,AZStd::deque<PassAttachmentBinding> m_attachmentBindings)-pair to store pass attachment bindings with the same guarantees about pointer validity as before.

I introduced this class since the original approach does not guard against iteration overm_attachmentBindings, which is not allowed since it contains only valid entries in the range [0..m_attachmentBindingsSize]. In the originalPR18673 some instances of this iteration were missed, which were fixed inPR18698; and now I found some more instances where such illegal iterations are still present (eg. inRenderPass::InitializeInternal()), which lead to errors when rebuilding passes in some cases.

Therefore, I introduced this class, which does not require usages ofm_attachmentBindings in derived pass classes to be updated, which eliminates the potential for this error entirely.

How was this PR tested?

The errors when rebuilding passes (from asserts in RenderPass::InitializeInternal()) no longer occur with this PR.
Run the editor with some small test scenes, test some samples in AtomSampleViewer.

…e correct attachment binding countSigned-off-by: Markus Prettner <markus.prettner@huawei.com>
Copy link
Contributor

@jhmueller-huaweijhmueller-huawei left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this properly!

mprettner-huawei reacted with thumbs up emoji
@byrcolinbyrcolin added the sig/graphics-audioCategorizes an issue or PR as relevant to SIG graphics-audio. labelMar 18, 2025
@jhmueller-huaweijhmueller-huawei merged commit679aa39 intoo3de:developmentMar 19, 2025
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jhmueller-huaweijhmueller-huaweijhmueller-huawei approved these changes

Assignees
No one assigned
Labels
sig/graphics-audioCategorizes an issue or PR as relevant to SIG graphics-audio.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mprettner-huawei@jhmueller-huawei@byrcolin

[8]ページ先頭

©2009-2025 Movatter.jp