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

[bug] Fix flaky mass_spring_game_ggui.py on Mac M1 by setting up default values for VulkanCapabilities #6850

Merged
merged 3 commits into from
Dec 9, 2022

Conversation

jim19930609
Copy link
Contributor

@jim19930609 jim19930609 commented Dec 9, 2022

Mac M1 does not support wide_line with Vulkan. However, device capability was initialized to random values which is why some examples are flaky on M1.

Before this PR:
image

image

@netlify
Copy link

netlify bot commented Dec 9, 2022

Deploy Preview for docsite-preview canceled.

Name Link
🔨 Latest commit fb22282
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/6392fafcedb6800009d3a153

@jim19930609 jim19930609 changed the title [bug] Fix flaky mass_spring_game_ggui.py by setting up default values for VulkanCapabilities [bug] Fix flaky mass_spring_game_ggui.py on Mac M1 by setting up default values for VulkanCapabilities Dec 9, 2022
Copy link
Member

@PENGUINLIONG PENGUINLIONG left a comment

Choose a reason for hiding this comment

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

Thank youuuuu

bool wide_line;
bool surface;
bool present;
uint32_t vk_api_version = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: should use the bracket initializer syntax

uint32_t vk_api_version{0}

@feisuzhu
Copy link
Contributor

feisuzhu commented Dec 9, 2022

Question here: Why compiler didn't report 'use of uninitialized values' for the original code?

@bobcao3
Copy link
Collaborator

bobcao3 commented Dec 9, 2022

Question here: Why compiler didn't report 'use of uninitialized values' for the original code?

I think this is a struct and it's "default initialized" as a struct object, just that the struct did not specify initial values of its members

@ailzhang ailzhang merged commit 46ed67d into taichi-dev:master Dec 9, 2022
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
…ult values for VulkanCapabilities (taichi-dev#6850)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

5 participants