VirtualBox

Ignore:
Timestamp:
Apr 5, 2013 2:37:54 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: Read pixels worker bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_rpw.cpp

    r45348 r45376  
    7373        cr_server.head_spu->dispatch_table.UnmapBufferARB(GL_PIXEL_PACK_BUFFER_ARB);
    7474
     75        cr_server.head_spu->dispatch_table.BufferDataARB(GL_PIXEL_PACK_BUFFER_ARB, pCurEntry->Size.cx*pCurEntry->Size.cy*4, 0, GL_STREAM_READ_ARB);
     76
    7577        cr_server.head_spu->dispatch_table.BindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0);
    7678    }
     
    128130    bool fExit = false;
    129131    bool fForceComplete = false;
     132    bool fNotifyCmdCompleted = false;
    130133
    131134    CRASSERT(pDummyMural);
    132135
    133     int rc = RTSemEventSignal(pWorker->hSubmitEvent);
     136    int rc = RTSemEventSignal(pWorker->Ctl.hCompleteEvent);
    134137    if (!RT_SUCCESS(rc))
    135138    {
     
    181184            enmCtlType = CR_SERVER_RPW_CTL_TYPE_UNDEFINED;
    182185            pCtlEntry = NULL;
     186            fNotifyCmdCompleted = true;
    183187        }
    184188
     
    220224            RTCritSectLeave(&pWorker->CritSect);
    221225
     226            if (fNotifyCmdCompleted)
     227            {
     228                rc = RTSemEventSignal(pWorker->Ctl.hCompleteEvent);
     229                if (!RT_SUCCESS(rc))
     230                {
     231                    crWarning("RTSemEventSignal failed rc %d", rc);
     232                    break;
     233                }
     234                fNotifyCmdCompleted = false;
     235            }
     236
    222237            if (fExit)
    223238                break;
     
    239254                Assert(!RTListIsEmpty(&GpuSubmittedList));
    240255                fForceComplete = true;
     256            }
     257
     258            rc = RTCritSectEnter(&pWorker->CritSect);
     259            if (!RT_SUCCESS(rc))
     260            {
     261                crWarning("RTCritSectEnter failed, rc %d", rc);
     262                break;
    241263            }
    242264        }
     
    366388                        if (RT_SUCCESS(rc))
    367389                        {
    368                             rc = RTSemEventWait(pWorker->hSubmitEvent, RT_INDEFINITE_WAIT);
     390                            rc = RTSemEventWait(pWorker->Ctl.hCompleteEvent, RT_INDEFINITE_WAIT);
    369391                            if (RT_SUCCESS(rc))
    370392                            {
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