diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx index e269464bf6..691585492c 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx +++ b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx @@ -1922,6 +1922,10 @@ reset() { void dx_set_stencil_functions (StencilRenderStates *stencil_render_states); dx_set_stencil_functions (_stencil_render_states); + + // Now that the GSG has been initialized, make it available for + // optimizations. + add_gsg(this); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx index 41a88d5383..62e0cc6dc3 100755 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx @@ -3027,6 +3027,10 @@ reset() { void dx_set_stencil_functions (StencilRenderStates *stencil_render_states); dx_set_stencil_functions (_stencil_render_states); + + // Now that the GSG has been initialized, make it available for + // optimizations. + add_gsg(this); } ////////////////////////////////////////////////////////////////////