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

[spv-out] Add support for vector with vector multiplication #287

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

Timo-DK
Copy link
Collaborator

@Timo-DK Timo-DK commented Nov 18, 2020

I went through the Bevy shader thread (#210) and a requirement for a shader to work was vector with vector multiplication. I have used the same strategy as we came up with the normal multiplication: if it is not a float vector times float vector, we will default to an ivec/`uvec multiplication.

There are however two other vector types in GLSL at least: bvec and dvec, but I don't think they are that commonly used, but that is just an assumption?

@Timo-DK Timo-DK requested a review from kvark November 18, 2020 16:14
@kvark
Copy link
Member

kvark commented Nov 18, 2020

We should support dvec eventually, but multiplying bvec seems like an invalid op.

src/back/spv/writer.rs Outdated Show resolved Hide resolved
src/back/spv/writer.rs Outdated Show resolved Hide resolved
@Timo-DK Timo-DK force-pushed the spv-out-vector-multiply branch from ad6c1a0 to f896308 Compare November 18, 2020 16:19
Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

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

Thank you!

@Timo-DK Timo-DK force-pushed the spv-out-vector-multiply branch from f896308 to 19428f3 Compare November 18, 2020 16:23
@Timo-DK Timo-DK merged commit 929e07f into gfx-rs:master Nov 18, 2020
@Timo-DK Timo-DK deleted the spv-out-vector-multiply branch November 18, 2020 16:37
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