SWDEV-245531 - GLInterop: linux - Buffer Interop
adding back two missed changes back to cmakelists and amdhip.def Change-Id: Ibe0ed655d3590f0add13c20b160078ae005feaaf
Cette révision appartient à :
@@ -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)
|
||||
|
||||
@@ -292,6 +292,12 @@ hipImportExternalSemaphore
|
||||
hipSignalExternalSemaphoresAsync
|
||||
hipWaitExternalSemaphoresAsync
|
||||
hipDestroyExternalSemaphore
|
||||
hipGLGetDevices
|
||||
hipGraphicsGLRegisterBuffer
|
||||
hipGraphicsMapResources
|
||||
hipGraphicsResourceGetMappedPointer
|
||||
hipGraphicsUnmapResources
|
||||
hipGraphicsUnregisterResource
|
||||
hipGraphGetNodes
|
||||
hipGraphGetRootNodes
|
||||
hipGraphKernelNodeGetParams
|
||||
|
||||
@@ -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,
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur