Skip to content

Fix data race in mutable command buffer simultaneous execution test #2434

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
Aug 5, 2025

Conversation

Nuullll
Copy link
Contributor

@Nuullll Nuullll commented Jul 3, 2025

Prior to this change, both clEnqueueReadBuffer calls before and after updating the command buffer were writing to the same output_buffer, causing a data race condition and the first call's result to be overwritten. This commit introduces separate destination vectors (output_buffer and updated_output_buffer) for these operations and verifies both results independently to ensure test integrity.

@Nuullll Nuullll changed the title Fix race condition in simultaneous mutable dispatch test Verify output buffers before updating command buffer Jul 8, 2025
@Nuullll Nuullll changed the title Verify output buffers before updating command buffer Fix data race in mutable command buffer simultaneous execution test Jul 8, 2025
@Nuullll Nuullll requested a review from EwanC July 8, 2025 03:08
Copy link
Contributor

@EwanC EwanC left a comment

Choose a reason for hiding this comment

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

LGTM!

@bashbaug
Copy link
Contributor

bashbaug commented Aug 5, 2025

Merging as discussed in the August 5th teleconference.

@bashbaug bashbaug merged commit e7e753f into KhronosGroup:main Aug 5, 2025
7 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