7 Replies Latest reply on Jun 10, 2015 2:08 AM by dipak

    OpenGL Texture in OpenCL not showing

    kjo

      Hey Guys,

       

      I am working on my thesis and i am programming a ray tracer in OpenCL. Well it is already finished, but i have to analyse it, how it is working on different GPUs.

      The Problem is now that on my AMD/ATI HD 5650 Mobility on my Laptop and on an Nvidia GTX 660ti and on an GTX 560SE my the Program is working fine.

      But on the AMD HD 7950 and HD 6850 the program starts but it doesnt show me any results. What i mean there is no Picture displayed.

      I don't know why it is working on my ATI HD 5650 Mobility, because when i started the thesis my knowledge in Ubuntu (I am working on Ubuntu OS), Qt  OpenGL and OpenCL where very small.

      So maybe some packages are missing, but the funny thing is that it works with the packages i know, which to install, on the Computers with Nvidia GPUs.

      I will explain a little how my program works. My OpenCL Kernel is Ray Tracing a Scene and each Result of a Pixel is put on an OpenGL Texture, which i am displaying with Shaders.

      In the Shaders there isn't much into it, it just shows the texture on the screen. Well thats all.

       

      I added some screenshots of the program, so you guys can see what my problem is. One screenshot is, how it should look like and the other two showing how it shouldn't look like.

      I hope you guys know what my problem is.

       

      Here are some specs from the computers

      Laptop (Where it works):

      OS Ubuntu 12.04 LTS

      HD 5650 1GB Mobility

      4 GB RAM

       

      Computer A (Where it works)

      OS Ubuntu 14.04 LTS

      GTX 660ti 3GB

      16 GB RAM

       

      Computer B (Where it works)

      OS Ubuntu 12.04 LTS

      GTX 560SE 1GB

      4 GB RAM

       

      Computer C (doesn't Work)

      OS Ubuntu 14.04 LTS

      HD 7950 3GB

      16 GB RAM

       

      Computer D (doesn't Work)

      OS Ubuntu 12.04 LTS

      HD 6850 HD 1GB

      4 GB RAM

       

       

      Thanks for at least reading my post

        • Re: OpenGL Texture in OpenCL not showing
          gopal

          Hi kjo,

          As you mentioned that your code works on some machine, but does not work on some other machines, so i think this is because of some missing packages to be required to run an OpenGL application.

           

          To make sure that you have all the required packages installed in your system to work with OCL-OGL applications,

          1. download latest catalyst drivers from AMD site.

          2. download latest AMD APP SDK.

          3. just try to run existing SimpleGL sample (or some other GL samples from APP SDK) and see if it works?

          4. if it works, that means that you have all the required packages installed in your machine. And if this is case then there should be some issue with your kernel/shader code, which may vary based on h/w architecture.

           

          Thanks,

            • Re: OpenGL Texture in OpenCL not showing
              kjo

              Hi gopal,

              i will be able to see if it works on tuesday, but there is one question i have.

              When i am trying to execute OpenCL Programs on ATI/AMD Cards, only executing, not programming. Do i always have do install the AMD APP SDK?

              I am asking because on Nvidia Cards you only need the Graphiccards Driver installed for executing OpenCL Programs.

               

              Regards,

              kjo

                • Re: OpenGL Texture in OpenCL not showing
                  gopal

                  No. (The reason, i told you to install APP SDK package is that it has few GL samples. And these samples could be used to test whether you have all packages installed to run an OCL-OGL application.)

                   

                  From your first post, you mentioned that your program does not work on AMD HD 7950 and HD 6850 cards. So you should test on these AMD cards only. Why do you want to test on Nivida card?


                  (Note: The steps, I mentioned above is to test on AMD card. The same steps should be applicable to other vendor's hardware too. To test an OCL-OGL app On Nvidia card, first download graphics driver from Nvidia site only, then download Nivida's OpenCL SDK and run some GL samples.)

                   

                  Thanks,

              • Re: OpenGL Texture in OpenCL not showing
                kjo

                In Terms of the Nvidia Card, i was just asking because you can run OpenCL Programs on Nvidia Cards without any opencl sdk installed only the graphiccards driver installed. Thats why i thougt, when you want to run an opencl program on amd cards it is also possible to have only the cards driver installed. Well nevermind.

                On the amd cards, opencl and opengl are working fine, but the combination isn't working.

                  • Re: OpenGL Texture in OpenCL not showing
                    dipak

                    Hi,

                    On the amd cards, opencl and opengl are working fine, but the combination isn't working.

                    As Gopal suggested, did you try to run the SimpleGL sample in APP SDK? It manifests OCL-OGL interop. Please run and let us know your findings.

                     

                    Regards

                      • Re: OpenGL Texture in OpenCL not showing
                        kjo

                        SimpleGL works fine, but SimpleGL isn't manipulating a GLTexture within the Kernel like in my Kernel.

                        I mean, it doesn't use a OpenCL Image Object from a OpenGL Texture and there isn't really a sample from the amd app sdk which is using

                        this combination. I got that idea from the Book OpenCL Programming Guide.

                         

                        Regards