Improve OsContext construction

Change-Id: Ibf9293344cc5c0ae1b2cc011e87d9e3626f3a066
This commit is contained in:
Dunajski, Bartosz
2019-02-27 11:17:17 +01:00
committed by sys_ocldev
parent 10a25e405a
commit 86dabbf6d5
38 changed files with 227 additions and 203 deletions

View File

@@ -110,7 +110,7 @@ bool setupArbSyncObject(GLSharingFunctions &sharing, OSInterface &osInterface, C
}
void signalArbSyncObject(OsContext &osContext, CL_GL_SYNC_INFO &glSyncInfo) {
auto osContextWin = osContext.get();
auto osContextWin = static_cast<OsContextWin *>(&osContext);
UNRECOVERABLE_IF(!osContextWin);
auto wddm = osContextWin->getWddm();
@@ -127,7 +127,7 @@ void signalArbSyncObject(OsContext &osContext, CL_GL_SYNC_INFO &glSyncInfo) {
}
D3DKMT_SIGNALSYNCHRONIZATIONOBJECT signalSubmissionSyncInfo = {0};
signalSubmissionSyncInfo.hContext = osContext.get()->getContext();
signalSubmissionSyncInfo.hContext = osContextWin->getContext();
signalSubmissionSyncInfo.Flags.SignalAtSubmission = 1; // Don't wait for GPU to complete processing command buffer
signalSubmissionSyncInfo.ObjectHandleArray[0] = glSyncInfo.submissionSynchronizationObject;
signalSubmissionSyncInfo.ObjectCount = 1;