VirtualBox

Ignore:
Timestamp:
May 3, 2019 9:51:02 PM (6 years ago)
Author:
vboxsync
Message:

Additions/common/crOpengl,GuestHost/OpenGL,HostServices/SharedOpenGL: Eliminate all global variables from the state tracker library (state_tracker) in preparation of the SPU DLL merging, bugref:9435

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_framebuffer.c

    r78190 r78375  
    2525packspu_FramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
    2626{
    27     crStateFramebufferTexture1DEXT(target, attachment, textarget, texture, level);
     27    crStateFramebufferTexture1DEXT(&pack_spu.StateTracker, target, attachment, textarget, texture, level);
    2828    crPackFramebufferTexture1DEXT(target, attachment, textarget, texture, level);
    2929}
     
    3232packspu_FramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
    3333{
    34     crStateFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
     34    crStateFramebufferTexture2DEXT(&pack_spu.StateTracker, target, attachment, textarget, texture, level);
    3535    crPackFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
    3636}
     
    3939packspu_FramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
    4040{
    41     crStateFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset);
     41    crStateFramebufferTexture3DEXT(&pack_spu.StateTracker, target, attachment, textarget, texture, level, zoffset);
    4242    crPackFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset);
    4343}
     
    4646packspu_BindFramebufferEXT(GLenum target, GLuint framebuffer)
    4747{
    48         crStateBindFramebufferEXT(target, framebuffer);
     48    crStateBindFramebufferEXT(&pack_spu.StateTracker, target, framebuffer);
    4949    crPackBindFramebufferEXT(target, framebuffer);
    5050}
     
    5353packspu_DeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
    5454{
    55         crStateDeleteFramebuffersEXT(n, framebuffers);
     55    crStateDeleteFramebuffersEXT(&pack_spu.StateTracker, n, framebuffers);
    5656    crPackDeleteFramebuffersEXT(n, framebuffers);
    5757}
     
    6060packspu_DeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
    6161{
    62         crStateDeleteRenderbuffersEXT(n, renderbuffers);
     62    crStateDeleteRenderbuffersEXT(&pack_spu.StateTracker, n, renderbuffers);
    6363    crPackDeleteRenderbuffersEXT(n, renderbuffers);
    6464}
     
    6767packspu_FramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
    6868{
    69         crStateFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer);
     69    crStateFramebufferRenderbufferEXT(&pack_spu.StateTracker, target, attachment, renderbuffertarget, renderbuffer);
    7070    crPackFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer);
    7171}
     
    7474packspu_BindRenderbufferEXT(GLenum target, GLuint renderbuffer)
    7575{
    76     crStateBindRenderbufferEXT(target, renderbuffer);
     76    crStateBindRenderbufferEXT(&pack_spu.StateTracker, target, renderbuffer);
    7777    crPackBindRenderbufferEXT(target, renderbuffer);
    7878}
     
    8181packspu_CheckFramebufferStatusEXT(GLenum target)
    8282{
    83         GET_THREAD(thread);
    84         int writeback = 1;
    85     GLenum status = crStateCheckFramebufferStatusEXT(target);
     83    GET_THREAD(thread);
     84    int writeback = 1;
     85    GLenum status = crStateCheckFramebufferStatusEXT(&pack_spu.StateTracker, target);
    8686
    8787    if (status!=GL_FRAMEBUFFER_UNDEFINED)
     
    9292    crPackCheckFramebufferStatusEXT(target, &status, &writeback);
    9393
    94         packspuFlush((void *) thread);
     94    packspuFlush((void *) thread);
    9595    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    9696
    97     crStateSetFramebufferStatus(target, status);
     97    crStateSetFramebufferStatus(&pack_spu.StateTracker, target, status);
    9898    return status;
    9999}
     
    112112    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    113113
    114     crStateRegFramebuffers(n, framebuffers);
     114    crStateRegFramebuffers(&pack_spu.StateTracker, n, framebuffers);
    115115}
    116116
     
    128128    CRPACKSPU_WRITEBACK_WAIT(thread, writeback);
    129129
    130     crStateRegRenderbuffers(n, renderbuffers);
     130    crStateRegRenderbuffers(&pack_spu.StateTracker, n, renderbuffers);
    131131}
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