VirtualBox

Ignore:
Timestamp:
Aug 20, 2010 9:40:40 AM (14 years ago)
Author:
vboxsync
Message:

crOpenGL: resource sharing between contexts

Location:
trunk/src/VBox/GuestHost/OpenGL/include
Files:
5 edited

Legend:

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

    r27889 r31808  
    684684#define GL_REAL_RENDERER   0x8B25
    685685#define GL_REAL_EXTENSIONS 0x8B26
     686
     687/*Global resource ids sharing*/
     688#define GL_SHARE_CONTEXT_RESOURCES_CR 0x8B27
    686689#endif
    687690
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_glstate.h

    r29930 r31808  
    9898    CRHashTable *textureTable;  /* all texture objects */
    9999    CRHashTable *dlistTable;    /* all display lists */
     100    CRHashTable *buffersTable;  /* vbo/pbo */
     101    CRHashTable *fbTable;       /* frame buffers */
     102    CRHashTable *rbTable;       /* render buffers */
     103
    100104    GLint refCount;
     105    GLint id;                   /*unique shared state id, it's not always matching some existing context id!*/
     106    GLint saveCount;
    101107} CRSharedState;
    102108
     
    196202#ifndef IN_GUEST
    197203DECLEXPORT(int32_t) crStateSaveContext(CRContext *pContext, PSSMHANDLE pSSM);
    198 DECLEXPORT(int32_t) crStateLoadContext(CRContext *pContext, PSSMHANDLE pSSM);
     204DECLEXPORT(int32_t) crStateLoadContext(CRContext *pContext, CRHashTable * pCtxTable, PSSMHANDLE pSSM);
     205DECLEXPORT(void)    crStateFreeShared(CRSharedState *s);
    199206#endif
    200207
     
    219226                   GLenum format, GLenum type, GLvoid *pixels );
    220227
     228DECLEXPORT(void) STATE_APIENTRY crStateShareContext(GLboolean value);
    221229#ifdef __cplusplus
    222230}
  • trunk/src/VBox/GuestHost/OpenGL/include/state/cr_bufferobject.h

    r27091 r31808  
    1010#include "cr_hash.h"
    1111#include "state/cr_statetypes.h"
     12#include "state/cr_statefuncs.h"
    1213
    1314#ifdef __cplusplus
     
    3031typedef struct {
    3132        GLuint refCount;
    32         GLuint name;
     33        GLuint id;
     34    GLuint hwid;
    3335        GLenum usage;
    3436        GLenum access;
     
    5153        CRBufferObject *nullBuffer;  /* name = 0 */
    5254
    53         CRHashTable *buffers;
    54 
    5555    GLboolean   bResyncNeeded;
    5656} CRBufferObjectState;
     
    5959DECLEXPORT(GLboolean) crStateIsBufferBound(GLenum target);
    6060
     61DECLEXPORT(GLuint) STATE_APIENTRY crStateBufferHWIDtoID(GLuint hwid);
     62DECLEXPORT(GLuint) STATE_APIENTRY crStateGetBufferHWID(GLuint id);
     63
    6164#ifdef __cplusplus
    6265}
  • trunk/src/VBox/GuestHost/OpenGL/include/state/cr_framebuffer.h

    r28800 r31808  
    6262    CRFramebufferObject     *readFB, *drawFB;
    6363    CRRenderbufferObject    *renderbuffer;
    64     CRHashTable             *framebuffers;
    65     CRHashTable             *renderbuffers;
    6664
    6765    /* Indicates that we have to resend FBO data to GPU on first glMakeCurrent call with owning context */
  • trunk/src/VBox/GuestHost/OpenGL/include/state/cr_texture.h

    r27091 r31808  
    6161typedef struct {
    6262    GLenum                 target;
    63     GLuint                 name;
     63    GLuint                 id;
     64    GLuint                 hwid;
    6465
    6566    /* The mipmap levels */
     
    237238DECLEXPORT(void) crStateDeleteTextureObject(CRTextureObj *tobj);
    238239
     240DECLEXPORT(GLuint) STATE_APIENTRY crStateTextureHWIDtoID(GLuint hwid);
     241DECLEXPORT(GLuint) STATE_APIENTRY crStateGetTextureHWID(GLuint id);
     242DECLEXPORT(GLuint) STATE_APIENTRY crStateGetTextureObjHWID(CRTextureObj *tobj);
    239243
    240244#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.

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