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

Make MiniStatsExample WebGPU compatible #5916

Merged

Conversation

erikdubbelboer
Copy link
Contributor

But don't make WebGPU the default as it's super slow on WebGPU.

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

But don't make WebGPU the default as it's super slow on WebGPU.
if (!app.graphicsDevice.isWebGPU) {
// @ts-ignore engine-tsd
app.graphicsDevice.setTexture(texture, 0);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This call doesn't work on WebGPU but I don't think it's needed to cause the allocations?

@erikdubbelboer
Copy link
Contributor Author

After this the MiniStatsExample can be used to profile for possible optimizations in the WebGPU rendered.

Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

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

Nice, thanks for doing this, looks good.

@mvaligursky mvaligursky merged commit e7d5b1b into playcanvas:main Jan 8, 2024
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.

2 participants