Jump to content
  • Advertisement

Andrey OGL_D3D

Member
  • Content Count

    49
  • Joined

  • Last visited

Community Reputation

3 Neutral

1 Follower

About Andrey OGL_D3D

  • Rank
    Member

Personal Information

  • Role
    Programmer
  • Interests
    Programming

Social

  • Github
    https://github.com/Andreyogld3d

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi @Alex Garcin, How many OpenGL Contexts do you have ? I don't know how to create OpenGL context on GPU that is not connected to Monitor. How do you have more than one context on you system with single monitor ? I have already answered, did you try it ?
  2. Hi, @Alex Garcin I have already answered you: if (clGLDevice == curDevice_id) { device_id = clGLDevice; break; } does't it code work ? You should choice the platform that supports GPU and can interop with OpenGL.
  3. Hi @_Flame_, I'm glad that you have the decision
  4. Yes, i have the same result on AMD, black texture for GL_RGBA_INTEGER/GL_RGBA8UI and uint4 vali = { 255, 0, 0, 255 }; write_imageui(outputImage, coords, vali); Also, I have some AMD forum posts about OpenCL/Vulkan. You should ask about it on AMD even if you have an invalid result on nVidia/Intel.
  5. Hi @_Flame_, I have no any ideas, try to ask on AMD forum, I think moderator dipak, can help you.
  6. i Have a black texture even using write_imagef: float4 valf = { 255.f, 0.f, 0.f, 255.f }; write_imagef(outputImage, coords, valf); Sorry, i have found my mistake, i should change texture parameters: const int TEXTURE_INTERNAL_FORMAT = GL_RGBA; const GLenum TEXTURE_FORMAT = GL_RGBA; const GLenum TEXTURE_TYPE = GL_UNSIGNED_BYTE;
  7. Yes, you can use glut instead of glfw, please create simple test project, i will change code and test of result.
  8. @_Flame_, can you create a simple project without any dependencies ? I haven't PkgConfig, GLFW.
  9. Hi @_Flame_, Ok, I will chek it
  10. I don't know, I think the final format of OpenCL image is depends of OpenGL format, so you have no any means to change the result format. Do have you any OpenGL Error(glGetError() ) after this calling ? can you attach a test project ?
  11. Hello @_Flame_ Which result from function clGetImageInfo(img, CL_IMAGE_FORMAT, sizeof(cl_image_format), imgFormat, &ret) ?
  12. Hi @_Flame_, 1) How do you write data to CL image ? 2) May be problem with normalized colors value (float/int/uint) ? 3) Which result from function clGetImageInfo(img, CL_IMAGE_FORMAT, sizeof(cl_image_format), imgFormat, &ret) ? 4) Try to write to CL image simple value (255, 0, 0,), which result will you receive ? 4) Can you post your code ?
  13. Andrey OGL_D3D

    clCreateFromGLBuffer crash

    I have never had same task.. I think you should create separate OpenCL context for each OpenGL context. Usually, the different OpenGL contexts can be used in separate threads, so we can also use different OpenCL context in different threads, because OpenCL runtime is thread safe(except some functions: clSetKernelArg, ...)
  14. Andrey OGL_D3D

    clCreateFromGLBuffer crash

    Hi, @Alex Garcin 1) Support of OpenCL extension this is not enough for working OpenGL/OpenCL together. 2) If we have more than one GPU in system, we should find one OpenGL context and share it with OpenCL, so your monitor is connected to second GPU Geforce GTX 1080, only this GPU has correct OpenGL context and can work with OpenCL using some sharing objects(VBO,Texture...)
  15. Andrey OGL_D3D

    clCreateFromGLBuffer crash

    Ok, please test new code testOpenCL.7z: for (size_t i = 0; i < ret_num_platforms; ++i) { platform_id = platform_ids[i]; cl_device_id curDevices_id[16]; ret = clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_GPU, _countof(curDevices_id), curDevices_id, &ret_num_devices); for(cl_uint nDevices = 0; nDevices < ret_num_devices; ++nDevices) { cl_device_id curDevice_id = curDevices_id[nDevices]; char str[1024]; size_t strSize = 0; ret = clGetDeviceInfo(curDevice_id, CL_DEVICE_NAME, sizeof(str), str, &strSize); fprintf(stderr, "OpenCL Device Name %s\n", str); ret = clGetDeviceInfo(curDevice_id, CL_DEVICE_VENDOR, sizeof(str), str, &strSize); fprintf(stderr, "OpenCL Device Vendor %s\n", str); ret = clGetDeviceInfo(curDevice_id, CL_DEVICE_EXTENSIONS, sizeof(str), str, &strSize); fprintf(stderr, "OpenCL Device Extensions %s\n", str); bool supportGLSharing = strstr(str, "cl_khr_gl_sharing") != NULL; fprintf(stderr, "OpenCL Supports OpenCL/OpenGL sharing: %s\n", supportGLSharing ? "true" : "false"); clGetGLContextInfoKHR_fn clGetGLContextInfo = reinterpret_cast<clGetGLContextInfoKHR_fn>(clGetExtensionFunctionAddressForPlatform(platform_id, "clGetGLContextInfoKHR")); if (clGetGLContextInfo) { cl_device_id clGLDevice = 0; props[5] = reinterpret_cast<cl_context_properties>(platform_id); clGetGLContextInfo(props, CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR, sizeof(cl_uint), &clGLDevice, &n); if (clGLDevice == curDevice_id) { device_id = clGLDevice; } } } if (device_id) { break; } } I think your device doesn't support OpenCL/OpenGL Interop, please post OpenCL info. I tested on 2 system: Windows & X64 - single GPU AMD R7240 Windows 10 X64 - GPU 1: nVidia 610(Monitor uses for this GPU) , GPU 2 - AMD R7 350X I have no problem on this systems.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!