Multithreaded Render Pipeline Errors With Extra Buffers

Bug #1186887 reported by Craig Macomber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Invalid
Undecided
Unassigned

Bug Description

I haven't worked out the details yet, or produced a minimal example, but when I enable my lighting buffer and/or my decals buffer, I get this if Multithreaded Rendering is enabled:

$ ppython main.py
DirectStart: Starting the game.
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
Panda Version: 1.8.1
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1007 of c:\buildslave\release_sdk_win32\build\pand
a3d\panda\src\glstuff\glGraphicsBuffer_src.cxx : invalid operation
:display(error): Deactivating wglGraphicsStateGuardian.

The application continues running with a crazy flickering screen.

Tested on panda3d 1.8.1 on Window 7.

I'll post more details here if I can narrow it down.

Tags: threading
Revision history for this message
Craig Macomber (craigm) wrote :

I forgot to note, it is not all extra buffers. My various 14 other extra buffers work fine (including bloom stuff, some other post processes, a depth only pass, and my 2 aux buffers). Its just the lighting and decals ones that break it but I don't know why yet.

Revision history for this message
Craig Macomber (craigm) wrote :

The error spam is printed during a call to "shareDepthBuffer", which if removed fixed the problem (but of course then does not share the depth buffer).

This error occurs even if I delay the call to shareDepthBuffer via FrameDelayedCall for several frames to make sure the graphics buffer exists.

Revision history for this message
Craig Macomber (craigm) wrote :

Here is some code that demonstrates this error: (Without threading, the depth buffer sharing still fails, but thats a different bug that I will also file)

from panda3d.core import loadPrcFileData
loadPrcFileData("", "threading-model Cull/Draw")

import direct.directbase.DirectStart
from panda3d.core import *

winprops = base.win.getProperties()
props = FrameBufferProperties()
props.setRgbColor(1)

out = base.graphicsEngine.makeOutput(
     base.pipe, "x", -2,
     props, winprops,
     GraphicsPipe.BFSizeTrackHost | GraphicsPipe.BFCanBindEvery |
     GraphicsPipe.BFRttCumulative | GraphicsPipe.BFRefuseWindow,
     base.win.getGsg(), base.win)

shared=out.shareDepthBuffer(base.win)
if not shared:
    print "Failed to share depth"

run()

Moguri (mogurijin)
tags: added: threading
Revision history for this message
rdb (rdb) wrote :

Sample program demonstrates invalid use (depth buffer cannot be shared between window and buffer). Modifying the code to use two buffers does not produce the errors indicated in the bug report.

Changed in panda3d:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.