SWDEV-245531 - GLInterop: linux - Buffer Interop

adding back two missed changes back to cmakelists and amdhip.def

Change-Id: Ibe0ed655d3590f0add13c20b160078ae005feaaf
Cette révision appartient à :
Payam
2021-09-13 23:34:29 -04:00
révisé par Aakash Sudhanwa
Parent c250a13849
révision b075718a0f
3 fichiers modifiés avec 19 ajouts et 4 suppressions
+4 -2
Voir le fichier
@@ -110,7 +110,8 @@ target_sources(amdhip64 PRIVATE
hip_stream_ops.cpp
hip_stream.cpp
hip_surface.cpp
hip_texture.cpp)
hip_texture.cpp
hip_gl.cpp)
if(WIN32)
target_sources(amdhip64 PRIVATE
@@ -135,7 +136,8 @@ target_include_directories(amdhip64
${PROJECT_BINARY_DIR}/include)
target_compile_definitions(amdhip64 PRIVATE __HIP_PLATFORM_AMD__)
find_package(OpenGL REQUIRED)
target_link_libraries(amdhip64 PRIVATE ${OPENGL_LIBRARIES})
target_link_libraries(amdhip64 PRIVATE ${CMAKE_DL_LIBS})
# Additional dependencies for hipRTC
if(WIN32)
+6
Voir le fichier
@@ -292,6 +292,12 @@ hipImportExternalSemaphore
hipSignalExternalSemaphoresAsync
hipWaitExternalSemaphoresAsync
hipDestroyExternalSemaphore
hipGLGetDevices
hipGraphicsGLRegisterBuffer
hipGraphicsMapResources
hipGraphicsResourceGetMappedPointer
hipGraphicsUnmapResources
hipGraphicsUnregisterResource
hipGraphGetNodes
hipGraphGetRootNodes
hipGraphKernelNodeGetParams
+9 -2
Voir le fichier
@@ -176,11 +176,15 @@ void setupGLInteropOnce() {
HDC dc;
HGLRC glrc;
dc = wglGetCurrentDC();
glrc = wglGetCurrentContext();
/*
if (!getDeviceGLContext(dc, glrc)) {
LogError(" Context setup failed \n");
return;
}
*/
cl_context_properties properties[] = {CL_CONTEXT_PLATFORM,
(cl_context_properties)AMD_PLATFORM,
CL_GL_CONTEXT_KHR,
@@ -197,11 +201,14 @@ void setupGLInteropOnce() {
hGL->context = nullptr;
hGL->window = 0;
hGL->cmap = 0;
hGL->context = glXGetCurrentContext();
hGL->display = glXGetCurrentDisplay();
/*
if (!getDeviceGLContext(hGL)) {
LogError(" Context setup failed \n");
return;
}
*/
cl_context_properties properties[] = {CL_CONTEXT_PLATFORM,
(cl_context_properties)AMD_PLATFORM,