microsoft / microsoft/DirectX-Graphics-Samples

Big VMEM stall in FXAA

Open
#519 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

miniengine question
Dominant language
C++
Stars
6.8k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

Hi,

Sorry to disturb you guys. I'm new in rendering field. I tried to migrate your optimization for FXAA to my engine recently. But it turned out that I got a really big VMEM stall when dispatching the first step of FXAA CS. And it caused by texture sampling.

At first, I thought it could be because I was using color texture as input to calculate luminance, which needed to be sampled twice per thread. And the sampling addresses are not so coherent, which may cost a lot of time in TA. So I tried with Gather a prepared luma texture like you did. But the issue was still there. You can refer to the screenshot of my profiling result.

alu instructions
shader instruction trace

Have you ever met this kind of issue? What could be the reason? Any sugguestions are really appreciated.

Thanks a lot.

Yan

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the FXAA compute-shader first-step dispatch and the texture-sampling behavior described in the issue. Use the attached profiling screenshots to investigate the reported VMEM stall, then compare the color-texture sampling and prepared-luma Gather approaches. Done means identifying a likely cause and documenting actionable guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
22/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.