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

ICB matrix optimization #4718

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

ICB matrix optimization #4718

wants to merge 2 commits into from

Conversation

doitsujin
Copy link
Owner

tl;dr FXC often emits immediate a 4x4 identity or scaling matrix as an immediate constant buffer, this experimentally transforms that to a vec4 constant and implements indexing by doing a component-wise index == n ? value : 0.

The theory here is that this should be more efficient because we replace a memory load with a few ALU ops, in practice however this seems to be worse (at least on RADV) because we're replacing one memory load that the driver will try its best to optimize with a whole bunch of VALU ops that are redundantly spammed everywhere because CSE apparently doesn't want to help us out.

Leaving this open for perf test / discussion for now, but unfortunately this appears to be a bit of a dud.

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.

1 participant