Holy hell, finally got this working with an R9 390 + Ubuntu.

This commit is contained in:
2017-11-15 23:07:50 -08:00
parent d3a9c95ef7
commit 2baabf5bc5
7 changed files with 26 additions and 17 deletions

View File

@@ -1,5 +1,8 @@
#include "Application.h"
const int Application::MAP_X = 32;
const int Application::MAP_Y = 32;
const int Application::MAP_Z = 32;
Application::Application() {

View File

@@ -602,10 +602,10 @@ bool CLCaster::create_shared_context()
#ifdef linux
cl_context_properties context_properties[] = {
//CL_GL_CONTEXT_KHR, (cl_context_properties)glXGetCurrentContext(),
//CL_GLX_DISPLAY_KHR, (cl_context_properties)glXGetCurrentDisplay(),
CL_GL_CONTEXT_KHR, (cl_context_properties)eglGetCurrentContext(),
CL_EGL_DISPLAY_KHR, (cl_context_properties)eglGetCurrentDisplay(),
CL_GL_CONTEXT_KHR, (cl_context_properties)glXGetCurrentContext(),
CL_GLX_DISPLAY_KHR, (cl_context_properties)glXGetCurrentDisplay(),
//CL_GL_CONTEXT_KHR, (cl_context_properties)eglGetCurrentContext(),
//CL_EGL_DISPLAY_KHR, (cl_context_properties)eglGetCurrentDisplay(),
CL_CONTEXT_PLATFORM, (cl_context_properties)platform_id,
0
};