Skip to content
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

Fix wrong comparison in push constant size validation check #2452

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

daigennki
Copy link
Contributor

@daigennki daigennki commented Jan 11, 2024

VUID-vkCmdPushConstants-size-00371 in the Vulkan spec says:

size must be less than or equal to VkPhysicalDeviceLimits::maxPushConstantsSize minus offset

(bold mine)

However, Vulkano was checking the push constant size as if it can only be less than, and not equal to, maxPushConstantsSize minus offset. This change fixes that.


  1. Update documentation to reflect any user-facing changes - in this repository.

  2. Make sure that the changes are covered by unit-tests.

  3. Run cargo clippy on the changes.

  4. Run cargo +nightly fmt on the changes.

  5. Please put changelog entries in the description of this Pull Request
    if knowledge of this change could be valuable to users. No need to put the
    entries to the changelog directly, they will be transferred to the changelog
    file by maintainers right after the Pull Request merge.

    Please remove any items from the template below that are not applicable.

  6. Describe in common words what is the purpose of this change, related
    Github Issues, and highlight important implementation aspects.

Changelog:

### Bugs fixed
- Fix wrong comparison in push constant size validation check.

@Rua Rua merged commit 90c104c into vulkano-rs:master Jan 11, 2024
5 checks passed
@Rua
Copy link
Contributor

Rua commented Jan 11, 2024

Thanks for the fix!

Rua added a commit that referenced this pull request Jan 11, 2024
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
…rs#2452)

* Fix wrong comparison in push constant size validation check

* Fix incorrectly placed backtick in validation error problem

Oops.
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
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.

2 participants