VirtualBox

Changeset 36231 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 9, 2011 3:05:32 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70452
Message:

crOpenGL: workaround for recent nvidia drivers, disabled yet as need more testing

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_spu.h

    r22509 r36231  
    455455DECLEXPORT(void) crUnloadOpenGL( void );
    456456DECLEXPORT(int) crLoadOpenGLExtensions( const crOpenGLInterface *crInterface, SPUNamedFunctionTable table[] );
     457DECLEXPORT(void) crSPUChangeDispatch(SPUDispatchTable *dispatch, const SPUNamedFunctionTable *newtable);
    457458
    458459#if defined(GLX)
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/loader.def

    r15532 r36231  
    1919crUnloadOpenGL
    2020crChooseVisual
     21crSPUChangeDispatch
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/spuchange.py

    r15532 r36231  
    5454"""
    5555print '}'
     56
     57print """
     58void crSPUChangeDispatch(SPUDispatchTable *dispatch, const SPUNamedFunctionTable *newtable)
     59{
     60    SPUGenericFunction func;
     61"""
     62keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
     63for func_name in keys:
     64    print '\tfunc = crSPUFindFunction(newtable, "%s");' % func_name
     65    print '\tif (func && ((SPUGenericFunction)dispatch->%s!=func))' % func_name
     66    print '\t{'
     67    print '\t\tcrDebug("%%s changed from %%p to %%p", "gl%s", dispatch->%s, func);' % (func_name, func_name)
     68    print '\t\tcrSPUChangeInterface(dispatch, dispatch->%s, func);' % func_name
     69    print '\t}\n'
     70print """
     71}
     72"""
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c

    r33595 r36231  
    869869                    crError( "Render SPU: (MakeCurrent) Couldn't create the context for the window (error 0x%x)", GetLastError() );
    870870                }
     871
     872                /*Requery ext function pointers, we skip dummy ctx as it should never be used with ext functions*/
     873                if (0 && context->id)
     874                {
     875                    int numFuncs, i;
     876                    SPUNamedFunctionTable ext_table[1000];
     877
     878
     879                    crDebug("Default server ctx created, requerying ext functions");
     880                    /*requery ext functions*/
     881                    numFuncs = renderspuCreateFunctions(ext_table);
     882                    numFuncs += crLoadOpenGLExtensions( &render_spu.ws, ext_table+numFuncs);
     883                    CRASSERT(numFuncs < 1000);
     884
     885                    /*change spu dispatch*/
     886                    crSPUChangeDispatch(&render_spu.self, ext_table);
     887
     888
     889                    /*cleanup temp table*/
     890                    for (i=0; i<numFuncs; ++i)
     891                    {
     892                        if (ext_table[i].name) crFree(ext_table[i].name);
     893                    }
     894                }
    871895            }
    872896
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette