Windows 95ãšPentium IIã®æ代ã«ã¯ãã³ã³ãã¥ãŒã¿ãŒãé ããªãã°ãªãã»ã©ïŒãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®åäœãããããç解ã§ããããã«ïŒããŠã£ã³ããŠèŠçŽ ãæç»ãããé çªãèçŒã§èŠãããšãã§ãããšãããžã§ãŒã¯ããããã€ãã³ããåŠçãããŸããã çŸåšããã®ãããªç®çã®ããã®DirectXçšã®åå¥ã®ããŒã«ããããŸã-åãã¬ãŒã ã®åãã¯ã»ã«ãã©ã®ããã«æç»ãããããDirectXãšã³ãžã³ãå®è¡ããæäœã䜿çšãããªãœãŒã¹ãè¿ éãã€æ£ç¢ºã«ãã¹ãŠãæ©èœããæ¹æ³ãç解ã§ããã°ã©ãã£ã«ã«ãããã¬ãŒã§ãã ãã®ãããªããŒã«ã®1ã€-ä»æ¥æ€èšããCrytekã®RenderDoc ã ãŸããäŸãšããŠãäžèšã®æ°ããGoogle Chromeã¬ã³ãã©ãŒãèŠãŠã¿ãŸãããã
ãŸãããªãRenderDocã«ã€ããŠè©±ããŠããã®ã§ããïŒ åæ§ã®ããŒã«ãå€æ°ãããŸãã
- ããã¯ã¹
- Intelã°ã©ãã£ãã¯ããã©ãŒãã³ã¹ã¢ãã©ã€ã¶ãŒ
- AMD GPU PerfStudio 2
- NVIDIA Nsightéçºãã©ãããã©ãŒã
- Visual Studioã°ã©ãã£ãã¯ã¹èšºæããŒã«
ãããã¯ãã¹ãŠéåžžã«åªããŠããŸãã ãããïŒ
- PIX-ãã§ã«æ代é ãã§ãææ°ã®OSã§ã¯éçºãåäœãããŸãã
- Intel \ AMD \ Nvidiaã®ããŒã«-ããããã®ãŠãŒãã£ãªãã£ã¯ãããªã«ãŒãã§DirectXãããã«çŽ æŽãããã¯ãŒã«ã§é«éãã確èªã§ããããšãã粟ç¥ã§äœãããŠããŸãããäžéšã®ã¢ããªã±ãŒã·ã§ã³ããããã®ã«ãŒãã³ãããã°ã¿ã¹ã¯ã¯ããŸã䟿å©ã§ã¯ãããŸãã
- Visual Studio-ä»äººã®åæã§ã¯ãªãããã®ãœãããŠã§ã¢ã®éçºå°çšã«èª¿æŽ
RenderDocã«ã€ããŠã¯ã次ã®ãšããã§ãã
- ãªãŒãã³ãœãŒã¹ ãç©æ¥µçã«éçºäž
- Windowsããã³DirectX11ã®ææ°ããŒãžã§ã³ã§åŒ·å
- 3Déçºã®å°é家ããã®è£œå-ãã¹ãŠã®ä»éããã¹ãã©ããã§CryEngineãšã³ãžã³ãäœæããäŒç€Ÿ
- éçºãšãããã°ãžã®å®çšçãªã¢ãããŒãã§é£œåããŠãã-ãããããè¯ã説æããæ¹æ³ãããããªãããããšãã°ããããŒãããã®åŒã³åºãã§ãã®æ å ±ããã®ãããªåœ¢ã§èŠãã®ãããã ããããšæããšãçªç¶å€æããRenderDocã¯ããã®ç¹å®ã®åŒã³åºãã§æ£ãã圢åŒã§ããã®æ å ±ãæ£ç¢ºã«è¡šç€ºããŸãã ãã®åšå ·ã¯Crytekã®æã§ç£šããã磚ãããŠããããšãããããŸãã
- äžè¬çã«ãç§ãæ°ã¥ããå¯äžã®è£œåã¯ãã°ã©ãã£ãã¯ã¹ããŸã£ãããªã芪ããèµ·åãããChromeåããã»ã¹ã§ã°ã©ãã£ãã¯ã¹ã¬ã³ããªã³ã°ããããã°ããããšã§ãã ã©ã³ãã£ãŒã¯å€ãã®ã²ãŒã ã§äœ¿çšãããŠããæãåçŽãªãã®ã®ããã«æããŸããããããã¬ãŒã§ã©ã³ãã£ãŒããµããŒãããå¿ èŠãããã®ã¯RenderDocã ãã§ãã
ãããã£ãŠã RenderDocãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããŸãã éå§ãããšãã¡ã€ã³ãŠã£ã³ããŠã衚瀺ãããŸãã [ããŒã«]ã¡ãã¥ãŒã®[ãªãã·ã§ã³]ãéããäžæãã¡ã€ã«ïŒãã³ãïŒãè¿œå ãããã©ã«ããŒãæå®ããŸãã
ããã§ãRenderDocãããã¬ãŒã§ãããã°ããã¢ããªã±ãŒã·ã§ã³ãå®è¡ããå¿ èŠããããŸãã ãããè¡ãã«ã¯ãã Capture Executable ãã¿ãã§ãäœæ¥ãã©ã«ããŒã§ããChromeãžã®ãã¹ãå ¥åããŸãã ããã«ã¯èå³æ·±ãç¹ãããã€ããããŸãã Chromeã®ã°ã©ãã£ãã¯ã¹ã¯å¥ã®åããã»ã¹ã§æç»ãããŸããProcessHackerãå®è¡ããå®è¡äžã®ãã¹ãŠã®chrome.exe ããã»ã¹ã®äžãããã³ãã³ãã©ã€ã³ãã©ã¡ãŒã¿ãŒã«ãã©ã°--type = gpu-processãå«ãŸããããã»ã¹ãèŠã€ããããšã§å€æã§ããŸãã
ãã®ããã»ã¹ãçŽæ¥éå§ããããšã¯ã§ããªããããRenderDocã§ãåããã»ã¹éïŒãã§ãã¯ããã¯ã¹Hook Into Childrenãå«ãïŒãå«ãDirectXé¢æ°ã®åŒã³åºãã远跡ããããšã瀺ãã¡ã€ã³ã®Chromeããã»ã¹ãéå§ããå¿ èŠããããŸãã
ããã©ã«ãã§ã¯ãChromeã®åããã»ã¹ã¯ãµã³ãããã¯ã¹å ã§ãã©ã€ããã§ãããIntegrity Levelãäœãããããã¡ã€ã«ã·ã¹ãã ãä»ã®ããã»ã¹ãããã³OSå ±æãªãœãŒã¹ãšå¯Ÿè©±ã§ããŸããã ãããã£ãŠãChromeãå®è¡ããã ãã§ã¯ãRenderDocã¯ã°ã©ãã£ãã¯ã¹ãæç»ãããããã»ã¹ãšå¯Ÿè©±ã§ããªããªããŸãã ããã«ã¯ããã¯ããããŸã-Chromeã¯ç¹å¥ãªãã©ã°--no-sandboxã§èµ·åããå¿ èŠããããŸããããã¯Chromeã®ãµã³ãããã¯ã¹ãç¡å¹ã«ããŸãã
ã°ã©ãã£ãã¯ã®æç»äžã«çºçãããã¹ãŠã®ããšã«èå³ããããããããã«äŸ¿å©ãªãã§ãã¯ããŒã¯ãè¿œå ããŸãã ãã£ããã£ãããã¬ãŒã ãããã«ç€ºãããšãã§ããŸãïŒããã«ã¯ã ãã¬ãŒã ã®ãã¥ãŒãã£ããã£ïŒãã§ãã¯ããŒã¯ããããŸã ïŒãã¢ããªã±ãŒã·ã§ã³ã®PrintScreenãã¿ã³ãã¯ãªãã¯ããŠãçŸåšã®ãã¬ãŒã ã®ãã³ããäœæã§ããŸãã
ãã®çµæãCapture Executableã¿ãã¯æ¬¡ã®ããã«ãªããŸãã
[ãã£ããã£]ãã¿ã³ãã¯ãªãã¯ãããšãChromeãèµ·åããŸãã
ãŠã£ã³ããŠã®äžéšã«ã¯ãå°ãªããšãããã€ãã®ããšãäŒããäœããã®ãããã°æ å ±ã衚瀺ãããŸãã
- Chromeã¯å®éã«DirectX11ã䜿çšããŠãŠã£ã³ããŠïŒããã³ãŠã£ã³ããŠå šäœïŒã¿ã€ãã«ãããŒã«ããŒãããŒãžã³ã³ãã³ãïŒãæç»ããŸã
- RenderDocãChromeã«æ£åžžã«ãããã¯ãããŸãã
ããã§ãChromeã§äœããéããPrintScreenãã¯ãªãã¯ã§ããŸãã æ®åœ±ããã¹ã¯ãªãŒã³ã·ã§ããã«é¢ããç¢æãChromeãŠã£ã³ããŠã®äžéšã«è¡šç€ºãããŸãã ãã¹ãŠãChromeãéããããšãã§ããèšå®ã§æå®ãããã©ã«ããŒã«æ¡åŒµåãrdcã®ãã¡ã€ã«ã衚瀺ãããŸãã ããããã³ãã§ãã ã ãã¡ã€ã«->ãã°ãéããã§éããšã次ã®ãããªãã®ã衚瀺ãããŸãã
ãŠã£ã³ããŠã®äžéšã«ã¯ãã¿ã€ã ã©ã€ã³ãããããŸããããã¯ããã®ãã¬ãŒã ãæã段éãããŒã¯ãããŠããã¿ã€ã ã©ã€ã³ã§ãã æ°ååãŸã§è¡šç€ºã§ããŸãïŒè¡šç€ºãããªãå Žåã¯ããã¿ã€ã ã©ã€ã³ããŠã£ã³ããŠã®å·Šäžé ã«ãããã©ã¹èšå·ãã¯ãªãã¯ããŸãïŒã åãæé ã¯ããŠã£ã³ããŠã®å·ŠåŽã®ã ã€ãã³ããã©ãŠã¶ ãããã«ã§ããŒã¯ãããŠããŸãã ãã€ãã³ããã©ãŠã¶ãã§ã¿ã€ã ã©ã€ã³ãŸãã¯ã€ãã³ããã¯ãªãã¯ããããšã«ããããã¬ãŒã ã®æç»äžã«ããŸããŸãªãã€ã³ãã«ç§»åã§ããŸãã
ã€ãã³ãããªãŒã®ã«ãŒãããŒãã¯ã ãã¬ãŒã #N ããšåŒã°ããã¢ããªã±ãŒã·ã§ã³ã§DirectXãåæåããããšãã®ãã¬ãŒã ã瀺ããŸãã ãã®åŸã«ããã®ãã¬ãŒã ã®æç»ãéå§ãããç¬éã瀺ãã ãã¬ãŒã éå§ ãã¡ã¿ããŒããç¶ããŸãïŒDirectXã¡ãœãããžã®å®éã®åŒã³åºãã¯ã¢ã¿ãããããŠããŸããïŒã 次ã«ãã Color PassïŒ1ïŒ1 TargetsïŒ ããã DrawïŒ4ïŒ ããããã³ã PresentïŒïŒ ãã®3ã€ã®ããŒãã衚瀺ãããŸãã ãããããã¯ãã ãŠã£ã³ããŠã®ã³ã³ãã³ãã®æç»ã¯ãã¹ãŠããã€ãã®æ®µéã§è¡ãããããšãããããŸãã
- ãŸãããã¹ãŠãäžçš®ã®äžéãã¯ã¹ãã£ã«æç»ãããŸãïŒã¹ããŒãžã ã«ã©ãŒãã¹ïŒ1ïŒ1ã¿ãŒã²ããïŒ ãïŒ
- 次ã«ãã DrawïŒ4ïŒ ãã¡ãœãããåŒã³åºããšããã®ãã¯ã¹ãã£ã®ã³ã³ãã³ããã¹ã¯ãããã§ãŒã³ããã¯ãããã¡ã«è»¢éãããŸã
- æåŸã«ã Presentã¡ãœããã«ãããããã¯ãããã¡ãŒãç»é¢ã«è¡šç€ºãããŸãã
ã芧ã®ãšãããããªãŒã®äžéãã¯ã¹ãã£ã«æç»ãã段éãéãããšãã§ããChromeãŠã£ã³ããŠã®åã ã®èŠçŽ ãæç»ããç¬éãèŠãããšãã§ããŸãã
æåã«ããã¯ã¹ãã£ãã¯ãªã¢ãããŸãïŒ ClearRenderTargetViewãåŒã³åºããŸã ïŒã ãã®åŸã«ãã DrawIndexedïŒ6ïŒ ããšåŒã°ããå€ãã®ã¹ããããç¶ããŸãã 6ã¯ããã®æ®µéã§æç»ãããé åã®å¢çãšãªããã€ã³ãã®æ°ã§ãã ãããã6ã€ãããšããäºå®ã¯ãããããé·æ¹åœ¢ãæ§æãã2ã€ã®äžè§åœ¢ã§ãããšããèãã瀺åããŠããŸãã ã¹ããŒãžã DrawIndexedïŒ6ïŒ ãã®ããããïŒæåã§ã¯ãªãæåŸã§ã¯ãªãïŒãéžæããŠã詳ããèŠãŠã¿ãŸãããã
[ ãã€ãã©ã€ã³ã®ç¶æ ]ã¿ãããå§ããŸããã
ãåç¥ãããããŸããããDirectX11ã¯ã ãã€ãã©ã€ã³ ãã®æŠå¿µã䜿çšããŸããããã¯ãæçµãã¬ãŒã ã圢æããããã«èšèšãããããã€ãã®é 次æäœã®ã»ããã§ãã ãã€ãã©ã€ã³ã¯ã Input Assemblerã¹ããŒãžããå§ãŸããŸããããã§ã¯ãé ç¹ãã€ã³ããã¯ã¹ãããã³å®æ°ãããã¡ãŒã«å¿ èŠãªãã¹ãŠã®å ¥åããŒã¿ãæäŸããŸãããããã¯ãäœãã©ãã§æç»ããããèšç®ããããã«å°æ¥å¿ èŠã«ãªãå ŽåããããŸãã 以äžã¯ãããŸããŸãªã¿ã€ãã®ã·ã§ãŒããŒã§å ¥åããŒã¿ãåŠçãã段éãšãæåŸã®ãã§ãŒãºã§ããåºåããŒãžã§ããããã§ã¯ãã°ã©ãã£ãã¯ã¹ãã³ã³ãã€ã«ãããåºåãããã¹ãå Žæã«è¡šç€ºãããŸãã
[ ãã€ãã©ã€ã³ã®ç¶æ ]ãŠã£ã³ããŠã§ããã€ãã©ã€ã³ã®ä»»æã®ã¹ããŒãžãã¯ãªãã¯ããŠã以äžã確èªã§ããŸãã
- å ¥åã¹ããŒãžã«æ¥ããã®ïŒãããã¡ãŒãã·ã§ãŒããŒããã¯ã¹ãã£ïŒããã®ãªããžã§ã¯ãã«é¢ããäžè¬æ å ±
- å ¥åãã©ã¡ãŒã¿ã®å³åŽã«ããç·è²ã®ç¢å°ãã¯ãªãã¯ãããšãããå®å šãªæ å ±ãå«ããŠã£ã³ããŠãéãããšãã§ããŸãã ãããã¡ã®å Žåãããã¯ãã®å®å šãªã³ã³ãã³ãããã¯ã¹ãã£ã®å Žåã¯ãã®ã€ã¡ãŒãžãã·ã§ãŒããŒã®å Žåã¯ãã®ã³ã³ãã€ã«ããããã€ãã³ãŒãã§ãã
- Input Assemblerã¹ããŒãžã§ã¯ã倧ããªã Mesh ããã¿ã³ãã¯ãªãã¯ããŠããã®ã¹ããŒãžã§æç»ãããé åãæ§æãããã€ã³ãã®åº§æšã確èªããããšãã§ããŸãã ããã§ããåè§åœ¢ãæ£ç¢ºã«æç»ããŠããããšã確èªã§ããŸãã
ãã¯ã¹ãã£ãŠã£ã³ããŠã«ç§»åãããšããã®ãã¬ãŒã ã®æç»ã«äœ¿çšããããã¯ã¹ãã£ã確èªã§ããŸãã
ããŒã«ããŒã PS Resources ãã«ã¯ããã®æ®µéã§æç»ããããã¯ã¹ãã£ã衚瀺ãããããŒã«ããŒã OM Targets ãã«ã¯ãæç»ãè¡ããããã¯ã¹ãã£ã衚瀺ãããŸãã ãã¯ã¹ãã£ãŠã£ã³ããŠã®ãŸãŸã§ãäžãŸãã¯å·Šããæç»ã¹ããŒãžãã¯ãªãã¯ã§ããŸããChromeããŠã£ã³ããŠã256x256ãã¯ã»ã«ã®ãã¯ã¹ãã£ã§æç»ããããšãããããŸãã 圌ã¯ãŠã£ã³ããŠã®äžéšããéå§ãããµã€ããšããžãæç»ããŠãããããŒã«ããŒã䜿çšããŠãŠã£ã³ããŠã®ã¿ã€ãã«ããŒãæç»ããŸãã ãã®åŸãChromeã¯ã¿ãã®ã³ã³ãã³ãïŒåã³ã256x256ãã¯ã»ã«ã®æçïŒã®æç»ãéå§ããŸãã 次ã«ãã³ã³ãã³ãã®ãäžãã«ãããªããžã§ã¯ãïŒãããªãFlashãããŒãããŒã«ãããïŒãæç»ãããŸãã æåŸã®æ®µéã§ã¯ãã¹ã¯ããŒã«ããŒãšãã®ã¹ã©ã€ããŒãæç»ãããŸãã ããã§ããã¯ã¹ãã£ã¯ããã¯ãããã¡ã«æç»ããæºåãã§ããŸããã
RenderDocã§ã§ããããš
ã¬ã³ããªã³ã°ã®å段éã§åŒã³åºãããDirectXã¡ãœããã®APIã衚瀺ãã
ä¿¡ããããªãã»ã©äŸ¿å©ãªãã®ã ãããŠãã¡ãœããã®ååã ãã§ãªãããããã®ãã©ã¡ãŒã¿ãŒãèŠããããšãèãããšãããã¯äžè¬ã«çŸããã§ãã
kolstokã衚瀺ããïŒã³ãŒãå ã®thisãŸãã¯ãã®DirectXã¡ãœãããåŒã³åºãããå ŽæããïŒ
確ãã«ããã®ããã«ã¯ãããã°ã©ã ãpdbãã¡ã€ã«ã«ã¹ãªããããå¿ èŠããããŸãïŒããã¯ãèªåããããã°ãããã³ãŒãã®äœæè ã§ããå Žåã«ã®ã¿å¿ èŠã§ãïŒã ããã°ã©ã ã®ãããã°ã«éåžžã«äŸ¿å©ã§ãèŠç¥ãã¬äººã®åæã«ã¯ãŸã£ãã圹ã«ç«ã¡ãŸããã
ã·ã§ãŒããŒã®ãã£ããŒã¹
é ç¹ã·ã§ãŒããŒã®å Žåãç®çã®é ç¹ãå³ã¯ãªãã¯ãããšã ã¡ãã·ã¥åºåãŠã£ã³ããŠã§ãããã°ãéå§ãããŸãã
ãã¯ã»ã«ã®å Žå-ç®çã®ãã¯ã»ã«ãå³ã¯ãªãã¯ããã ãã¯ã»ã«ã³ã³ãã³ã ãããŒã«ããŒã®ã ãã®ãã¯ã»ã«ããããã° ããã¿ã³ãã¯ãªãã¯ããå¿ èŠããããã¯ã¹ãã£ãŠã£ã³ããŠå
ãã®ãããªäŸ¿å©ãªRenderDocããŒã«ã次ã«ç€ºããŸãã
ã°ã©ãã£ãã¯ããããã°ããŠãã ããã