SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
Moderator: Graf Zahl
-
- Posts: 152
- Joined: Tue Oct 25, 2011 13:05
SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
tested wad: http://www.mediafire.com/download/erllm ... eport8.pk3
Hardware Teste:
Intel Core I7 3635QM, 8GB RAM
Windows 10 64BITS
INTEL HD4000
AMD HD8870m
example vídeo Iuse: screen goes black, but can be viewed when you're looking at menu, console or map info, also it's viewed when some message is showed on screen or when you can see the log.
how to reproduce the error:
WARNING: test this in windowed mode, because if tested in fullscreen, your vídeo driver will crash.
step 1: test the wad file.
step 2: use your status bar with size 12 (it makes invisible)
step 3: wait for some time (there's going to have a interpolation error caused by the câmera)
now you'll see a black screen, if you view the menu or consle, you'll notice that the screen is back and you can see everything,
NOTE: This happens with both intel and amd gpus and the error were introduced in gzdoom-g2.2pre-1875-gc9f93d9.7z
NOTE2: if you F12 on titlemap, the error will not happen anymore (the câmera view point will change from the câmera to the player)
EDIT:
Actually, when I tried now with the AMD gpu, the system went crazy, I heard a sound when you disconnect a flash drive, and the screen went red, and I couldn't nothing more.
Hardware Teste:
Intel Core I7 3635QM, 8GB RAM
Windows 10 64BITS
INTEL HD4000
AMD HD8870m
example vídeo Iuse: screen goes black, but can be viewed when you're looking at menu, console or map info, also it's viewed when some message is showed on screen or when you can see the log.
how to reproduce the error:
WARNING: test this in windowed mode, because if tested in fullscreen, your vídeo driver will crash.
step 1: test the wad file.
step 2: use your status bar with size 12 (it makes invisible)
step 3: wait for some time (there's going to have a interpolation error caused by the câmera)
now you'll see a black screen, if you view the menu or consle, you'll notice that the screen is back and you can see everything,
NOTE: This happens with both intel and amd gpus and the error were introduced in gzdoom-g2.2pre-1875-gc9f93d9.7z
NOTE2: if you F12 on titlemap, the error will not happen anymore (the câmera view point will change from the câmera to the player)
EDIT:
Actually, when I tried now with the AMD gpu, the system went crazy, I heard a sound when you disconnect a flash drive, and the screen went red, and I couldn't nothing more.
Last edited by ibm5155 on Sat Jul 30, 2016 16:12, edited 4 times in total.
-
- Posts: 152
- Joined: Tue Oct 25, 2011 13:05
Re: Titlepic goes black screen after a time pressing esc
ok, so manually rolling back, I found the commit that caused the iuse : https://github.com/coelckers/gzdoom/com ... 8540e59f87
The specific code makes the screen black when using some kind of câmera (example ChangeCamera(1,0,1)), this only happens when you're not viewing the menu, the console, the status bar and neither when there's no message showing under the screen.
if you can view your statusbar,menu, console or either some message on screen this error will not be showed...
The specific code makes the screen black when using some kind of câmera (example ChangeCamera(1,0,1)), this only happens when you're not viewing the menu, the console, the status bar and neither when there's no message showing under the screen.
if you can view your statusbar,menu, console or either some message on screen this error will not be showed...
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: Titlepic goes black screen after a time pressing esc
What graphics hardware are you using? We need to rule out a driver issue here as that commit changed quite a bit of things under the hood.
-
- Posts: 152
- Joined: Tue Oct 25, 2011 13:05
Re: Titlepic goes black screen after a time pressing esc
The error can be reproduced with an Intel HD4000 and an AMD HD8870mGraf Zahl wrote:What graphics hardware are you using? We need to rule out a driver issue here as that commit changed quite a bit of things under the hood.
driver ver:
AMD : 16.7.2
INTEL: 10.18.10.4276
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
When you say the video driver crash in fullscreen, what exactly are you seeing there? A Windows 'driver crashed' message in the corner? Has the hardware gamma on/off/fullscreen only option any influence on it?
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
I can reproduce the black screen issue on my computer (working on a fix). The fullscreen crash I cannot. Only thing changed in that part of the code would be the hardware gamma code. On the other hand, perhaps sufficiently wrong gamma data could make a monitor turn off (the disconnect sound you heard)? Please let me know what happens if you set hardware gamma to off before entering fullscreen.
-
- Posts: 152
- Joined: Tue Oct 25, 2011 13:05
Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
A black screen and a mouse cursor (also if I try to change from fullscreen to windowed [alt+enter] gzdoom will crash)dpJudas wrote:When you say the video driver crash in fullscreen, what exactly are you seeing there?
Yes I see the error message, but only when I close gzdoom. (example image below)dpJudas wrote:A Windows 'driver crashed' message in the corner? Has the hardware gamma on/off/fullscreen only option any influence on it?
I didn't found it under menu options, but I found the console cvar (vid_hwgamma), i changed the values from 2 to 1,0 and 3, but nothing changed...dpJudas wrote:Has the hardware gamma on/off/fullscreen only option any influence on it?
EDIT: this is what's showed for me when it crash the driver
EDIT2: When I'm in fullscreem mode, I cant do nothing, even pressing the menu key, the black background doesnt go out.
But if I start the game in windowed mode, the gpu doesn't crash and I can at least see the screen, only if I'm under menu or console command
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
Thanks - that rules out the hwgamma part at least.
I've found the source to the black screen issue. Something binds a sampler object (with glBindSampler) and leaves that bound. This made it try do a mipmapped render of the buffers, which fails because there are no mipmaps. Working on a PR that takes this situation into account. If we are lucky the driver crash is how ATI/Intel reacts to being asked to draw an incomplete texture.
I've found the source to the black screen issue. Something binds a sampler object (with glBindSampler) and leaves that bound. This made it try do a mipmapped render of the buffers, which fails because there are no mipmaps. Working on a PR that takes this situation into account. If we are lucky the driver crash is how ATI/Intel reacts to being asked to draw an incomplete texture.
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
Pull request fixing this: https://github.com/coelckers/gzdoom/pull/67
Please let me know if the driver crash remains after this change. Hopefully it shouldn't.
Please let me know if the driver crash remains after this change. Hopefully it shouldn't.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
Merged. I'm now waiting for confirmation.
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
-
- Posts: 152
- Joined: Tue Oct 25, 2011 13:05
Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
Well, it didn't fixed for me (actually it's a bit worse now, because now (only with the intel gpu) I can't see the normal doom 2 menu Picture)
Plus, I found that (now on both gpus) there's hom on status bar when you scale the screen
Actually, the intel gpu is quite broken with menu, I cant see some fonts neither the background doom 2 Picture
Just wondering, could you send me your compiled build, maybe I did something wrong here (just in case)
Plus, I found that (now on both gpus) there's hom on status bar when you scale the screen
Actually, the intel gpu is quite broken with menu, I cant see some fonts neither the background doom 2 Picture
Just wondering, could you send me your compiled build, maybe I did something wrong here (just in case)
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
Hmm, I'm not seeing the change from PR 67 in master yet. What really is worrying me is the driver crash thing because that has the potential of being a really big show stopper.
The scale thing also happens on my computer. Sorry, really thought I had most of the corner cases covered. Fixing this too.
The scale thing also happens on my computer. Sorry, really thought I had most of the corner cases covered. Fixing this too.
-
- Posts: 152
- Joined: Tue Oct 25, 2011 13:05
Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
update:
I discovered that in windowed mode (with the amd gpu) if I change the screen resolution, the background image will get stucked with the last rendered frame before the texture was changed (example Picture below)
And I really don't know if my log will help with something, but here's the performance usage from each part of the code:
And here's also an update:
In void FGLRenderer::Flush()
removing the "if (FGLRenderBuffers::IsEnabled())" and Always executing the interior code from that if fixed the camera iuse (so it's not anymore black for intel neither amd), it also fixed the driver crash in fullscreen (and it even fixed the problem that froze the background when changing the resolution)...
but, it's not a perfect solution, it's a bit buggy with intel ( it doesn't show the doom 2 title background image, but after a time, it shows The background credits and then it shows the doom 2 logo background)
OFF: I synched the gzdoom GitHub with visual studio, This way I hope it's going to be Always the latest version
EDIT: looking better to the code, I saw that when changing the resolution the game doesn't crash neither freeze the background, but it gets stucked in the FShader::Load code for about 15 SECONDS!!!, after that time pass the cpu usage drops from "100%" (single core usage) to 0% and the game goes back and the screen is now updated.
EDIT2: Actuall the same happens in fullscreen mode ( I tested with two monitors to avoid some kind of crash).
this is the initial run from gzdoom in fullscreen mode, first, it takes almost 20 seconds under the same function, and when it finish loading the FShader, the cpu drop goes to zero, but I can only see a thing on screen when the last small rise from the cpu shows, then I can actually use the game and see the stuff...
Here's the cpu/ram usage
EDIT3: More numbers:
on void FShaderManager::CompileShaders():
each FShader *shc = Compile(defaultshaders.ShaderName, defaultshaders.gettexelfunc, true); call takes +- 860ms to run
inside of FShader *FShaderManager::Compile (const char *ShaderName, const char *ShaderPath, bool usediscard) , the function that requires more cpu time is the function below
if (!shader->Load(ShaderName, "shaders/glsl/main.vp", "shaders/glsl/main.fp", ShaderPath, defines.GetChars())) +- 819ms to run
and inside of that if we found FShader::Load.
The only heavy functions inside of it were
glCompileShader(hFragProg); +- 7ms
glLinkProgram(hShader); +- 159ms
glUseProgram(hShader); +- 727ms
I belive the code somehow is working just fine, but it takes so many time to see something, but since you hear the sounds and can toy with the menu, you feel that the game crashed...
I discovered that in windowed mode (with the amd gpu) if I change the screen resolution, the background image will get stucked with the last rendered frame before the texture was changed (example Picture below)
And I really don't know if my log will help with something, but here's the performance usage from each part of the code:
Code: Select all
Function Name Total CPU (%) Self CPU (%) Total CPU (ms) Self CPU (ms) Module
- gzdoom.exe (PID: 11220) 100.00 % 0.00 % 77 0 gzdoom.exe
- [External Code] 100.00 % 10.39 % 77 8 10 modules
- WinMainCRTStartup 89.61 % 0.00 % 69 0 gzdoom.exe
- __scrt_common_main 89.61 % 0.00 % 69 0 gzdoom.exe
- __scrt_common_main_seh 89.61 % 0.00 % 69 0 gzdoom.exe
- invoke_main 89.61 % 0.00 % 69 0 gzdoom.exe
- WinMain 89.61 % 0.00 % 69 0 gzdoom.exe
- DoMain 89.61 % 0.00 % 69 0 gzdoom.exe
- D_DoomMain 89.61 % 0.00 % 69 0 gzdoom.exe
- D_DoomLoop 89.61 % 0.00 % 69 0 gzdoom.exe
- D_Display 84.42 % 0.00 % 65 0 gzdoom.exe
- OpenGLFrameBuffer::Update 29.87 % 0.00 % 23 0 gzdoom.exe
- OpenGLFrameBuffer::Swap 20.78 % 0.00 % 16 0 gzdoom.exe
- Win32GLFrameBuffer::SwapBuffers 9.09 % 0.00 % 7 0 gzdoom.exe
+ [External Code] 9.09 % 2.60 % 7 2 11 modules
- atioglxx.dll!0x00000004ba9826 9.09 % 0.00 % 7 0 atioglxx.dll
+ atioglxx.dll!0x000000056c730c 9.09 % 0.00 % 7 0 atioglxx.dll
- atioglxx.dll!0x00000004ba98c4 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000005897c32 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000005875ed8 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000005875d0e 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x000000058b1d60 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x000000058b7974 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x000000058b90c7 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x000000058c063e 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x000000058cd793 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000004b42fab 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000004b6ae3b 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000004b6852e 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000004b6bb9c 2.60 % 0.00 % 2 0 atioglxx.dll
- atigktxx.dll!0x0000000f9b767b 2.60 % 0.00 % 2 0 atigktxx.dll
- atigktxx.dll!0x0000000f9b6663 1.30 % 0.00 % 1 0 atigktxx.dll
- atigktxx.dll!0x0000000f9ba8a2 1.30 % 0.00 % 1 0 atigktxx.dll
- atigktxx.dll!0x0000000f9ba0fc 1.30 % 0.00 % 1 0 atigktxx.dll
atigktxx.dll!0x0000000f9ba156 1.30 % 1.30 % 1 1 atigktxx.dll
- atigktxx.dll!0x0000000f9b6680 1.30 % 0.00 % 1 0 atigktxx.dll
- atigktxx.dll!0x0000000f9bd1e1 1.30 % 0.00 % 1 0 atigktxx.dll
[External Code] 1.30 % 1.30 % 1 1 7 modules
- FGLRenderer::Flush 7.79 % 0.00 % 6 0 gzdoom.exe
- FFlatVertexBuffer::RenderCurrent 6.49 % 0.00 % 5 0 gzdoom.exe
- FFlatVertexBuffer::RenderArray 6.49 % 0.00 % 5 0 gzdoom.exe
- atioglxx.dll!0x00000004d30939 3.90 % 0.00 % 3 0 atioglxx.dll
- atioglxx.dll!0x00000004ef1fe4 3.90 % 0.00 % 3 0 atioglxx.dll
- atioglxx.dll!0x00000004baa051 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000004c7d1e0 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x0000000589c634 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x000000058a7a2a 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x000000058b4f39 1.30 % 0.00 % 1 0 atioglxx.dll
atioglxx.dll!0x000000058a8b7e 1.30 % 1.30 % 1 1 atioglxx.dll
- atioglxx.dll!0x000000058b4fa6 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x000000058a8bb3 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x000000058a9efc 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x000000057e511d 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x0000000576eb1e 1.30 % 0.00 % 1 0 atioglxx.dll
atioglxx.dll!0x0000000576e912 1.30 % 1.30 % 1 1 atioglxx.dll
- atioglxx.dll!0x00000004baa031 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x00000004c7cd6a 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x0000000561bf98 1.30 % 0.00 % 1 0 atioglxx.dll
atioglxx.dll!0x00000005e287a3 1.30 % 1.30 % 1 1 atioglxx.dll
- atioglxx.dll!0x00000004d30740 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x0000000561b550 1.30 % 0.00 % 1 0 atioglxx.dll
atioglxx.dll!0x00000004d35b03 1.30 % 1.30 % 1 1 atioglxx.dll
- atioglxx.dll!0x0000000561b4ef 1.30 % 0.00 % 1 0 atioglxx.dll
+ atioglxx.dll!0x0000000561b1e7 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x00000005375b2d 1.30 % 0.00 % 1 0 atioglxx.dll
atioglxx.dll!0x00000004bb6900 1.30 % 1.30 % 1 1 atioglxx.dll
- OpenGLFrameBuffer::Begin2D 1.30 % 0.00 % 1 0 gzdoom.exe
+ FRenderState::ApplyMatrices 1.30 % 0.00 % 1 0 gzdoom.exe
- D_PageDrawer 27.27 % 0.00 % 21 0 gzdoom.exe
- DCanvas::DrawTexture 18.18 % 0.00 % 14 0 gzdoom.exe
- OpenGLFrameBuffer::DrawTextureParms 16.88 % 0.00 % 13 0 gzdoom.exe
+ FGLRenderer::DrawTexture 16.88 % 0.00 % 13 0 gzdoom.exe
$$Thunk@00008c24 1.30 % 1.30 % 1 1 gzdoom.exe
- DCanvas::FillBorder 9.09 % 0.00 % 7 0 gzdoom.exe
- OpenGLFrameBuffer::Clear 9.09 % 0.00 % 7 0 gzdoom.exe
- FGLRenderer::Clear 9.09 % 0.00 % 7 0 gzdoom.exe
- atioglxx.dll!0x00000005375ad7 7.79 % 0.00 % 6 0 atioglxx.dll
- atioglxx.dll!0x00000004bb6f98 3.90 % 0.00 % 3 0 atioglxx.dll
- atioglxx.dll!0x00000005468dfa 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x000000054de52e 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x000000054dec62 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x000000054de07a 1.30 % 0.00 % 1 0 atioglxx.dll
+ atioglxx.dll!0x0000000589c634 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x000000054de8f4 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x00000005878fe3 1.30 % 0.00 % 1 0 atioglxx.dll
atioglxx.dll!0x000000058a9f51 1.30 % 1.30 % 1 1 atioglxx.dll
atioglxx.dll!0x00000005468f16 1.30 % 1.30 % 1 1 atioglxx.dll
- atioglxx.dll!0x00000004bb6efe 3.90 % 0.00 % 3 0 atioglxx.dll
- atioglxx.dll!0x000000056c0f6b 3.90 % 0.00 % 3 0 atioglxx.dll
- atioglxx.dll!0x000000056c5911 3.90 % 0.00 % 3 0 atioglxx.dll
- atioglxx.dll!0x000000056c1468 3.90 % 0.00 % 3 0 atioglxx.dll
- atioglxx.dll!0x00000004b40769 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000004b66dcc 2.60 % 0.00 % 2 0 atioglxx.dll
- atigktxx.dll!0x0000000f9b6282 1.30 % 0.00 % 1 0 atigktxx.dll
[External Code] 1.30 % 1.30 % 1 1 7 modules
atigktxx.dll!0x0000000f9bcbec 1.30 % 1.30 % 1 1 atigktxx.dll
- atioglxx.dll!0x00000004b40709 1.30 % 0.00 % 1 0 atioglxx.dll
[External Code] 1.30 % 1.30 % 1 1 8 modules
- atioglxx.dll!0x00000004c3bf83 1.30 % 0.00 % 1 0 atioglxx.dll
atioglxx.dll!0x00000004c4083a 1.30 % 1.30 % 1 1 atioglxx.dll
- M_Drawer 18.18 % 0.00 % 14 0 gzdoom.exe
- DListMenu::Drawer 14.29 % 0.00 % 11 0 gzdoom.exe
+ FListMenuItemPatch::Drawer 9.09 % 0.00 % 7 0 gzdoom.exe
- FListMenuItemStaticPatch::Drawer 3.90 % 0.00 % 3 0 gzdoom.exe
- DCanvas::DrawTexture 3.90 % 0.00 % 3 0 gzdoom.exe
- OpenGLFrameBuffer::DrawTextureParms 3.90 % 0.00 % 3 0 gzdoom.exe
- FGLRenderer::DrawTexture 3.90 % 0.00 % 3 0 gzdoom.exe
- FRenderState::SetMaterial 1.30 % 0.00 % 1 0 gzdoom.exe
- FMaterial::Bind 1.30 % 0.00 % 1 0 gzdoom.exe
- FGLTexture::Bind 1.30 % 0.00 % 1 0 gzdoom.exe
FGLTexture::CreateHwTexture 1.30 % 1.30 % 1 1 gzdoom.exe
- gl_SetRenderStyle 1.30 % 0.00 % 1 0 gzdoom.exe
atioglxx.dll!0x00000005375ce0 1.30 % 1.30 % 1 1 atioglxx.dll
- FFlatVertexBuffer::RenderCurrent 1.30 % 0.00 % 1 0 gzdoom.exe
+ FFlatVertexBuffer::RenderArray 1.30 % 0.00 % 1 0 gzdoom.exe
- DMenu::Drawer 1.30 % 0.00 % 1 0 gzdoom.exe
- DCanvas::DrawTexture 1.30 % 0.00 % 1 0 gzdoom.exe
- OpenGLFrameBuffer::DrawTextureParms 1.30 % 0.00 % 1 0 gzdoom.exe
- FGLRenderer::DrawTexture 1.30 % 0.00 % 1 0 gzdoom.exe
- FFlatVertexBuffer::RenderCurrent 1.30 % 0.00 % 1 0 gzdoom.exe
- FFlatVertexBuffer::RenderArray 1.30 % 0.00 % 1 0 gzdoom.exe
- atioglxx.dll!0x00000004ef1fe4 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x00000004baa051 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x00000004c7d1e0 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x0000000589c634 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x000000058a7a46 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x000000058ad7fa 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x000000058add19 1.30 % 0.00 % 1 0 atioglxx.dll
- atioglxx.dll!0x00000005773b0b 1.30 % 0.00 % 1 0 atioglxx.dll
atioglxx.dll!0x00000005774002 1.30 % 1.30 % 1 1 atioglxx.dll
- OpenGLFrameBuffer::Dim 2.60 % 0.00 % 2 0 gzdoom.exe
- DCanvas::Dim 2.60 % 0.00 % 2 0 gzdoom.exe
- OpenGLFrameBuffer::Dim 2.60 % 0.00 % 2 0 gzdoom.exe
+ FGLRenderer::Dim 2.60 % 0.00 % 2 0 gzdoom.exe
TArray<FListMenuItem *,FListMenuItem *>::operator[] 1.30 % 1.30 % 1 1 gzdoom.exe
- OpenGLFrameBuffer::Begin2D 9.09 % 0.00 % 7 0 gzdoom.exe
- FRenderState::ApplyMatrices 5.19 % 0.00 % 4 0 gzdoom.exe
- FShaderManager::ApplyMatrices 5.19 % 0.00 % 4 0 gzdoom.exe
- FShader::ApplyMatrices 5.19 % 0.00 % 4 0 gzdoom.exe
- FShader::Bind 5.19 % 0.00 % 4 0 gzdoom.exe
- FShaderManager::SetActiveShader 5.19 % 0.00 % 4 0 gzdoom.exe
- atioglxx.dll!0x00000004be02b0 3.90 % 0.00 % 3 0 atioglxx.dll
- atioglxx.dll!0x000000055cf25c 3.90 % 0.00 % 3 0 atioglxx.dll
- atioglxx.dll!0x000000055f8784 3.90 % 0.00 % 3 0 atioglxx.dll
- atioglxx.dll!0x0000000561d9e9 3.90 % 0.00 % 3 0 atioglxx.dll
atioglxx.dll!0x0000000561d29b 2.60 % 2.60 % 2 2 atioglxx.dll
atioglxx.dll!0x0000000561d2be 1.30 % 1.30 % 1 1 atioglxx.dll
- atioglxx.dll!0x00000004be027d 1.30 % 0.00 % 1 0 atioglxx.dll
atioglxx.dll!0x00000005492a14 1.30 % 1.30 % 1 1 atioglxx.dll
- FGLRenderer::Begin2D 3.90 % 0.00 % 3 0 gzdoom.exe
- FGLRenderBuffers::Setup 2.60 % 0.00 % 2 0 gzdoom.exe
- atioglxx.dll!0x00000005378f8b 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000004bc5f4b 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x0000000546ae1d 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000005469ee0 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000004d33c48 2.60 % 0.00 % 2 0 atioglxx.dll
- atioglxx.dll!0x00000004c837ee 1.30 % 0.00 % 1 0 atioglxx.dll
+ atioglxx.dll!0x00000004c81a1b 1.30 % 0.00 % 1 0 atioglxx.dll
atioglxx.dll!0x00000004c835ce 1.30 % 1.30 % 1 1 atioglxx.dll
- FGLRenderBuffers::BindHudFB 1.30 % 0.00 % 1 0 gzdoom.exe
- atioglxx.dll!0x00000005378f8b 1.30 % 0.00 % 1 0 atioglxx.dll
+ atioglxx.dll!0x00000004bc5f4b 1.30 % 0.00 % 1 0 atioglxx.dll
- TryRunTics 5.19 % 0.00 % 4 0 gzdoom.exe
- NetUpdate 3.90 % 0.00 % 3 0 gzdoom.exe
- I_StartTic 3.90 % 0.00 % 3 0 gzdoom.exe
- I_CheckNativeMouse 1.30 % 0.00 % 1 0 gzdoom.exe
[External Code] 1.30 % 1.30 % 1 1 8 modules
- I_GetEvent 1.30 % 0.00 % 1 0 gzdoom.exe
- [External Code] 1.30 % 0.00 % 1 0 3 modules
- WndProc 1.30 % 0.00 % 1 0 gzdoom.exe
[External Code] 1.30 % 1.30 % 1 1 10 modules
[External Code] 1.30 % 1.30 % 1 1 user32.dll
- G_Ticker 1.30 % 0.00 % 1 0 gzdoom.exe
cycle_t::Reset 1.30 % 1.30 % 1 1 gzdoom.exe
In void FGLRenderer::Flush()
removing the "if (FGLRenderBuffers::IsEnabled())" and Always executing the interior code from that if fixed the camera iuse (so it's not anymore black for intel neither amd), it also fixed the driver crash in fullscreen (and it even fixed the problem that froze the background when changing the resolution)...
but, it's not a perfect solution, it's a bit buggy with intel ( it doesn't show the doom 2 title background image, but after a time, it shows The background credits and then it shows the doom 2 logo background)
OFF: I synched the gzdoom GitHub with visual studio, This way I hope it's going to be Always the latest version
EDIT: looking better to the code, I saw that when changing the resolution the game doesn't crash neither freeze the background, but it gets stucked in the FShader::Load code for about 15 SECONDS!!!, after that time pass the cpu usage drops from "100%" (single core usage) to 0% and the game goes back and the screen is now updated.
EDIT2: Actuall the same happens in fullscreen mode ( I tested with two monitors to avoid some kind of crash).
this is the initial run from gzdoom in fullscreen mode, first, it takes almost 20 seconds under the same function, and when it finish loading the FShader, the cpu drop goes to zero, but I can only see a thing on screen when the last small rise from the cpu shows, then I can actually use the game and see the stuff...
Here's the cpu/ram usage
EDIT3: More numbers:
on void FShaderManager::CompileShaders():
each FShader *shc = Compile(defaultshaders.ShaderName, defaultshaders.gettexelfunc, true); call takes +- 860ms to run
inside of FShader *FShaderManager::Compile (const char *ShaderName, const char *ShaderPath, bool usediscard) , the function that requires more cpu time is the function below
if (!shader->Load(ShaderName, "shaders/glsl/main.vp", "shaders/glsl/main.fp", ShaderPath, defines.GetChars())) +- 819ms to run
and inside of that if we found FShader::Load.
The only heavy functions inside of it were
glCompileShader(hFragProg); +- 7ms
glLinkProgram(hShader); +- 159ms
glUseProgram(hShader); +- 727ms
I belive the code somehow is working just fine, but it takes so many time to see something, but since you hear the sounds and can toy with the menu, you feel that the game crashed...
Last edited by ibm5155 on Sun Jul 31, 2016 15:45, edited 1 time in total.
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87
Hmm, that's very strange. It should be always executing that code unless you explicitly disabled it (via gl_renderbuffers cvar) or it thinks you have no GLSL shader support at all (gl.glslversion = 0).
Could you try see what happens if you run it with the latest viewport changes I did? (https://github.com/dpjudas/zdoom/tree/viewport_fix). Just to rule out isn't that bug that messes up the rendering for you.
Could you try see what happens if you run it with the latest viewport changes I did? (https://github.com/dpjudas/zdoom/tree/viewport_fix). Just to rule out isn't that bug that messes up the rendering for you.