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

Use a precompiled header in dxvk and d3d9 subprojects #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Nukem9
Copy link
Member

@Nukem9 Nukem9 commented Jun 5, 2024

Preface: Shoving dxvk_device.h into a precompiled header is my last-ditch effort to get Visual Studio's intellisense working properly. I do not expect this PR to be merged as-is, if at all. These are just my observations since I figured it'd be worth investigating and maybe worth some input.

Pros:

  • In my opinion, intellisense now works to an acceptable degree.
  • Fresh builds using build_dxvk_all_ninja.ps1 are reduced from 11 minutes to roughly 4 minutes (local machine).
  • Fresh release builds using the VS solution are reduced from 4 minutes to roughly 1 minute (local machine).

Cons:

  • Intellisense still occasionally trips up and freezes when opening many files.
  • Virtually no benefits with incremental builds.
  • Implicit includes are fragile in the long run and obfuscate real dependencies. The changes in rtx_ngx_wrapper.cpp are one example of this.
  • Changes to dxvk_device.h and dependent headers are amplified. It's now part of ~200 translation units, up from ~100.

It seems like a combination of transitive USD includes and hundreds of macros/templates in remix cause intellisense to break down. Death by a thousand cuts with no simple fix.

@nsubtil
Copy link
Collaborator

nsubtil commented Jun 6, 2024

Thanks for sending this out. PCH support has been on my list of nice things to do sometime, since we know we're leaving some compile time on the table overall.

I'm not sure I understand the Intellisense problems. Can you clarify what you're running into? Is it just slow, or is it failing to find sources or something like that?

@NV-LL
Copy link

NV-LL commented Jun 6, 2024

REMIX-3140 for tracking

@Nukem9
Copy link
Member Author

Nukem9 commented Jun 6, 2024

I'm not sure I understand the Intellisense problems. Can you clarify what you're running into? Is it just slow, or is it failing to find sources or something like that?

Ah, yeah. Overall intellisense seems to behave correctly. It slows to a crawl and becomes unusable after several minutes of editing/browsing code in remix's VS solution. There's a few symptoms: syntax highlighting and autocompletion lag behind (30s+) or never show up, go to definition never resolves, find symbol never resolves, cl.exe pins one CPU core at 100% in the background. Restarting VS alleviates these for a short time.

I've seen this brought up in RTX Remix Showcase on 2-3 occasions but I don't exactly think it's pervasive.

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.

3 participants