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

Slow PCF shader performance with dxc vs. fxc #607

Closed
TheRealMJP opened this Issue Aug 30, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@TheRealMJP
Copy link

TheRealMJP commented Aug 30, 2017

Hello,

Now that I have the shader from issue #604 compiling, I've noticed that the performance of the DXIL version is much worse than when the same shader is compiled to DXBC. When testing with the experimental branch of this project, I'm getting about 20.40 milliseconds to complete the forward path, vs about 3.20ms when running the DXBC version. This was measured on an Nvidia GTX 1070 running driver 384.94.

You can compile and run the project yourself if you'd like, or if you'd like to look at the compiler output I've attached the pre-processed code, compiled DXBC, and compiled DXIL for the main pixel shader:

Mesh_PP.txt
Mesh_DXBC.txt
Mesh_DXIL.txt

I had a quick look myself through the DXIL, and I didn't see anything immediately bad. I was initially concerned that perhaps the looks in the PCF kernel hadn't been unrolled, but it looks like that was handled properly.

Thanks in advance, and please let me know if I can provide any additional information (such as PIX captures, or pre-compiled binaries).

@python3kgae

This comment has been minimized.

Copy link
Contributor

python3kgae commented Aug 30, 2017

Thanks for the feedback.
We'll look into this.

@python3kgae

This comment has been minimized.

Copy link
Contributor

python3kgae commented Aug 31, 2017

Looks like some dynamic indexing failed to propagate to cbuffer indexing.
Trying to find fix for it.

@python3kgae

This comment has been minimized.

Copy link
Contributor

python3kgae commented Sep 1, 2017

Could you try #611?
It removed some dynamic indexing, but not all of them.

Thanks
Xiang

@TheRealMJP

This comment has been minimized.

Copy link
Author

TheRealMJP commented Sep 1, 2017

Hi Xiang,

Thank you for looking into this! With your change + the latest Nvidia driver (385.41), I'm now seeing the DXIL version take 3.12ms, while the DXBC version takes 3.05ms. On an unrelated node, dxc also compiles the shader much more quickly than fxc, which is great!

Thank you again for the assistance!

-Matt

@python3kgae

This comment has been minimized.

Copy link
Contributor

python3kgae commented Sep 5, 2017

You're welcome. Your feedback is very important to making dxc better.

Xiang

@hekota hekota added the performance label May 16, 2018

@hekota hekota closed this May 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment