TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

Reports still coming through of the black screen for AMD. #4333

Closed synchromesh62 closed 7 months ago

synchromesh62 commented 1 year ago

UPDATE: Until the cause has been reproduced, we have a solution for anyone seeing this with their AMD graphics cards. Just follow these instructions to start using GameGuru MAX: https://steamcommunity.com/app/1247290/discussions/0/3764481749069937034/

Reports still coming through of the black screen for AMD. Though some have stated it now works in the editor the Standalone game just goes to a black screen when tested.

plemsoft commented 1 year ago

@LeeBamberTGC Yes please have a look its a strange one , the last version tested 1.5 above ONLY have opaque pass and the tonefilter to fill out the last swapchain image , nothing else no custom shaders or prostprocessing, gg shaders... , even then it fails. If you download the last renderdoc capture : https://drive.google.com/file/d/19_4d2KbJMBqcV0NHw4ZkdIKrm8VsvCpD/view?usp=sharing

And checkout ->present , you will see that the swapchain image is correct , but that is not what is being displayed it only display the imgui stuff and the center is all black ? like this screenshot: https://github.com/TheGameCreators/GameGuruRepo/issues/4333#issuecomment-1510314257

Another thing to note is that at the first frame captured, the swapchain image has changed to what the amd users are seeing, so it looks like ->present change the swapchain image somehow ?

plemsoft commented 1 year ago

@gedgeck @dennimoto Could one of you try this "test 1.6", thanks for your help :)

https://drive.google.com/file/d/1662CQi1Q4SByA9caXF1yGCuZ3UuLO8aD/view?usp=sharing

@LeeBamberTGC FYI: changed imgui to shader model 5, and also removed the outline that was still active in the 1.5 test.

LeeBamberTGC commented 1 year ago

@gedgeck @dennimoto Also included this final tweak to the latest EXP build too in case Preben's test EXE works for you.

gedgeck commented 1 year ago

@plemsoft @LeeBamberTGC Sadly it's still the same meshy black background. renderdoc log is 10 MB (vs 100MB) only now though https://drive.google.com/file/d/1UDm-6FMeAyee6-B4J0Ls4opF1BeC4b8r/view?usp=sharing

dennimoto commented 1 year ago

Same here, GUI is fine, workspace is black. All radeon features (eg enhanced sync etc) disabled.

LeeBamberTGC commented 1 year ago

@gedgeck Can you give me a step by step how to add the DXVK DLLs to the product to get things working on your AMD card? We will continue looking at this, and eventually fix it, but it might be an idea to see if it is possible to redist the DXVK files as a way to help AMD users on release. I am using this link as my starting point reading up on DXVK: https://wccftech.com/directx-vulkan-dxvk-2-0-improves-performance-adds-various-fixes-through-vulkan-1-3-graphics-driver/

gedgeck commented 1 year ago

@LeeBamberTGC @plemsoft There are couple threads at Steam forums, like:

https://steamcommunity.com/app/1247290/discussions/0/5738182472464125380/ https://steamcommunity.com/app/1247290/discussions/0/3764481749069937034/

I believe I used 2nd thread approach and it is compact to follow as steps. I also packed it into ZIP which when unzipped at GGM root directory will put all necessary files at places, will attach this.

If you want to build DXVK yourself I'd recommend to follow it's repo README.md at https://github.com/doitsujin/dxvk

DXVK.zip

plemsoft commented 1 year ago

@gedgeck @dennimoto Version 1.7 , last try for today, Thanks :) https://drive.google.com/file/d/168NQJcJJx222Usv1eotKQQ0oaJZQ_KSw/view?usp=sharing @LeeBamberTGC New swapchain using DXGI_SWAP_EFFECT_FLIP_DISCARD. fingers crossed.

gedgeck commented 1 year ago

@plemsoft Still don't see the difference but maybe you can spot something new at renderdoc

https://drive.google.com/file/d/12tlH1nzF0Gxf1b9La5Vec8nbLSIGTvI7/view?usp=sharing

plemsoft commented 1 year ago

@gedgeck Wonder if any of the imgui rendering is causing this, this version "1.8" will remove all imgui , so you should just see a box. Thanks for the help :)

https://drive.google.com/file/d/16BYZO41LxjaWXKo8xy4UtOM7X6TdEVJm/view?usp=sharing

gedgeck commented 1 year ago

@plemsoft That becomes very weird now. I see all UI as plain red now, editor pane is still meshy black though, no box visible

https://drive.google.com/file/d/1eF6hPXY9RIXQrJA94RR7A3MKbZOpQNrz/view?usp=share_link

plemsoft commented 1 year ago

@gedgeck Yes we need more time to find this issue, Thanks for your help :)

@LeeBamberTGC Last renderdoc , backbuffer clear color is set to red , but still black in the middle, should at least be red everywhere ?

plemsoft commented 1 year ago

@LeeBamberTGC I will make a workaround for now until we figure it out, using DXVK will make a pull later today :)

LeeBamberTGC commented 1 year ago

@gedgeck @dennimoto Remove any DXVK files you may have added and try the latest EXP build now on Steam. It adds a workaround that detects specific AMD cards and copies the required DLL files to switch to the DX11->VK solution so users can continue using MAX. It is not ideal, but will do for now.

gedgeck commented 1 year ago

@LeeBamberTGC Bad news, it doesn't work either. I deleted DXVK files already at GGM dir, downloaded latest [experimental] build with Steam, verified files to be sure and yet it still shows [mostly] black screen at new games/demos and no DLLs were automatically placed for me

ok... 2 files (d3d11.dll and dxgi.dll) are added, but they added to 'shaders' directory, why there, why not all 4 to root GGM directory?

LeeBamberTGC commented 1 year ago

@gedgeck Can you quickly copy those two files in "shaders" into the root next to the EXE file, and then test? Just want to make sure that when these files are placed in the correct spot, your issue goes away. Sounds like the issue is that the code did not detect your card type and so did not copy the 2 files from shaders to the root.

plemsoft commented 1 year ago

@LeeBamberTGC Ups yes RX 7900 was not on my list :)

@gedgeck If you run DxDiag press "Display" what does it say exactly under "Name: " ?

gedgeck commented 1 year ago

@LeeBamberTGC Yes, if I manually copy them everything works and the early indication is I see GameGuru splash screen at the app start. I see terrain and objects at editor pane and in-game

gedgeck commented 1 year ago

@plemsoft @LeeBamberTGC It says: AMD Radeon RX 7900 XTX. Keep in mind there is also 7900 XT available and as a placeholder you might add anything like "7xy0 XT[X]", where x = [1..9], y = [0,5]

plemsoft commented 1 year ago

@LeeBamberTGC Might be faster for you just to add "79" to the "amd" , "rx" scan :)

LeeBamberTGC commented 1 year ago

@plemsoft Making a new EXP build now to get a log of the device name, won't be long :)

LeeBamberTGC commented 1 year ago

@gedgeck New EXP build, can you run it and send me a shot when you see the messagebox, thanks!

plemsoft commented 1 year ago

@gedgeck Not sure how many cards actually have this problem, its not all amd cards, this is my current list from Max users:

RX6600m AMD Radeon RX 6600m Radeon RX 6950 XT RX 6900XT AMD 5600 XT AMD RX 6800 AMD Radeon RX 7900 XTX

Do you know of any other cards that have the problem ?

gedgeck commented 1 year ago

@LeeBamberTGC Here you are popup

LeeBamberTGC commented 1 year ago

@gedgeck Thanks for the shot, I will modify the code to detect this and ensure the files copy. Give me 10 minutes :)

gedgeck commented 1 year ago

@gedgeck Not sure how many cards actually have this problem, its not all amd cards, this is my current list from Max users:

RX6600m AMD Radeon RX 6600m Radeon RX 6950 XT RX 6900XT AMD 5600 XT AMD RX 6800 AMD Radeon RX 7900 XTX

Do you know of any other cards that have the problem ?

No, my previous was NVidia GTX 980 4G and I don't have friends interested in GGM. I tried to share GGM with my wife through Steam family library sharing but there was some problem running it and I didn't dig too much. She has AMD RX 6650 XT so if you think it should work while sharing I can try to check if the problem was/is this same one, now that you leave early access.

@LeeBamberTGC @plemsoft Congratulations by the way!

plemsoft commented 1 year ago

@gedgeck AMD RX 66?? is already in the list , so that will work after Lee make the change :)

LeeBamberTGC commented 1 year ago

@plemsoft I have modified the code to capture 79 (and also 89) for the future :)

    /*
    AMD driver bug.
    PE: this is the card i noted had the problem, there might be more :)
    AMD Radeon RX 6600m
    Radeon RX 6950 XT
    RX 6900XT
    AMD 5600 XT
    AMD RX 6800
    AMD Radeon RX 7900
    NOTE: make sure shaders\\d3d11.dll , shaders\\dxgi.dll get copied to the standalone.
    */
    //if (i == 0) strcpy(cDeviceName, "AMD Radeon RX 7900"); //test one
    if (length > 0)
    {
        //pLog = pLog + cDeviceName;
        //pLog = pLog + "|";
        if (pestrcasestr(cDeviceName, "AMD") || pestrcasestr(cDeviceName, "Radeon") )
        {
            //PE: Take all 6900,5600,6800,6600 RX serie if amd.
            if (pestrcasestr(cDeviceName, "RX"))
            {
                if (pestrcasestr(cDeviceName, "89") || pestrcasestr(cDeviceName, "79") || pestrcasestr(cDeviceName, "69") || pestrcasestr(cDeviceName, "68") || pestrcasestr(cDeviceName, "66"))
                {
                    bIsAMDCard = true;
                    break;
                }
            }
            else
            {
                //PE: special case for amd 5600 xt
                if(pestrcasestr(cDeviceName, "5600"))
                {
                    bIsAMDCard = true;
                    break;
                }
            }
        }
gedgeck commented 1 year ago

@gedgeck AMD RX 66?? is already in the list , so that will work after Lee make the change :)

You have 6600m, that's laptop variation I believe. Maybe incode check is aware and matches both, that I can't know. Just mentioned so you are aware

LeeBamberTGC commented 1 year ago

@gedgeck Try the new EXP build just uploaded. PLease confirm the fix. It will now detect your specific card and ANY 79xx or 89xx cards for the foreseeable. This entire problem goes away naturally if we move to the latest Wicked Engine (DX12/Vulkan) but for now this solution should at least get users up and running with the minimum of fuss :) Thanks all for your helps!

plemsoft commented 1 year ago

You have 6600m, that's laptop variation I believe. Maybe incode check is aware and matches both, that I can't know. Just mentioned so you are aware

It already also include "m" version of the series , so should be fine, Thanks for your help with this :)

gedgeck commented 1 year ago

@LeeBamberTGC Yes, I can confirm it works for me now. Spent some time to prepare clean environment (removed already placed DLLs and log files, restarted Steam, ...) before verifying app data again. I don't see 66xx[m] [EDITED: Had to scroll horizontally to see it :) ] check at that code snippet, btw, but maybe it's just outside of it. @dennimoto Can you, please, confirm if issue is gone on your machine with latest experimental build too?

plemsoft commented 1 year ago

I don't see 66xx[m] check at that code snippet

Any card including "amd" or "radeon" that also include "RX" and "66" is included, so "AMD RX 6650 XT" and "AMD Radeon RX 6600m" match this :)

LeeBamberTGC commented 1 year ago

@gedgeck Thanks for confirming. I am confident to move this to the public build and respond to Steam users who experienced AMD issues, hopefully, they will respond :) @dennimoto If you can also confirm I can close this and mark the last of the pre-V1 HIGH issues fixed to hit that wonderful ZERO COUNT on RC bugs :)

synchromesh62 commented 1 year ago

Hopefully not interfering here if so then apologies but just a side note that the although the DXVK does work for most with the issue to get the editor up running standalones may still be a problem unless the export is somehow patched for detection.

plemsoft commented 1 year ago

@synchromesh62 It will also works in standalone :)

LeeBamberTGC commented 1 year ago

@synchromesh62 Good call, and you are right. Looks like I need to add some more code, at least to copy the files over :)

synchromesh62 commented 1 year ago

@synchromesh62 It will also works in standalone :)

Awesome .. Sorry had to ask just in case.

plemsoft commented 1 year ago

@LeeBamberTGC They already get over, everything inside shaders is included in standalone :)

LeeBamberTGC commented 1 year ago

@plemsoft Well that was an easy fix ;) Thanks again Preben, you're the master!!

synchromesh62 commented 1 year ago

Congrats guys .. That one was really nasty.

dennimoto commented 1 year ago

@LeeBamberTGC Experimental build is working for me now. The only exception is when running an exported standalone, the first time it is run, gameplay is black screen after the menus. Any thing after the first run is okay. I exported two different demo levels to verify.

plemsoft commented 1 year ago

the first time it is run, gameplay is black screen after the menus. Any thing after the first run is okay.

@LeeBamberTGC I think this is defender checking the files the first time they get copied over, we try to load them directly after copy so they could be blocked, try to Sleep(2000) after the copy if they dont already exists :)

synchromesh62 commented 1 year ago

@plemsoft @LeeBamberTGC Just a little bit of additional info i have been able to dig up. Apparently for the AMD Radeon RX 6500 XT... Max will work perfectly using the older 22.5.1 driver Any driver above this would give the black screen issue. The current driver is 23.4.3 so its quite an old one.

dennimoto commented 1 year ago

I wonder if it would help if a team member could share which version of wicked engine is being used to see if we can run a wicked only demo without any MAX code, the see whether its a "wicked+AMD" issue or a "MAX+AMD" issue???

LeeBamberTGC commented 1 year ago

@dennimoto The version we are using is from around a year and a half ago, and has changed a LOT since then, basically rewritten to drop DX11 and go full-on DX12. Not sure if the Wicked repo can step back that far but worth a try if it is there!

dennimoto commented 1 year ago

I tried version 0.56.32 released June 13, 2021. The editor opened to a black screen, so I'm guessing the issue is in wicked engine.

synchromesh62 commented 1 year ago

I tried version 0.56.32 released June 13, 2021. The editor opened to a black screen, so I'm guessing the issue is in wicked engine.

Hmm the fact that all versions of Max will work perfectly ( apparently ) using the older 22.5.1 driver for the RX 6500 XT screams driver to me .. Possibly a bit of both engine and driver ?

dennimoto commented 1 year ago

Hmm the fact that all versions of Max will work perfectly ( apparently ) using the older 22.5.1 driver for the RX 6500 XT screams driver to me .. Possibly a bit of both engine and driver ?

Maybe, but I've not encountered any other dx11 game or app with a problem with the new drivers.

plemsoft commented 1 year ago

@LeeBamberTGC Added Radeon RX 6700 XT , AMD Radeon RX 6500 XT to the list and Building Editor, made a pull :)