cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

stephanp
Journeyman III

issue with radeon driver on Ubuntu 16.04

Hello,

i recently upgraded my sytem to Ubuntu 16.04. Since there is no fglrx driver for my AMD gpus, i had to use the radeon driver.

My OpenGL application runs two windows on two gpus (each within its own thread). I used GLFW library. The gpus are two Radeon HD 7870.

The application crashes when the second window tries to swap buffers. If I comment out the second swapbuffers call, everything runs at least.

I tried with a much simpler test program, having two windows on the same gpu, with the same results.

I know the driver development for Ubuntu 16.04 is still in progress, but maybe someone has an advice or workaround for this issue.

Thanks in advance.

0 Likes
6 Replies
dwitczak
Staff

Thank you for your report. Before I can forward it to the relevant team, I'm going to need to ask you for to provide a simple test app which reproduces the problem. Would you be able to provide one?

0 Likes
stephanp
Journeyman III

here's a simple test program: (sorry i don't know how to format the code correctly)

// Include standard headers

#include <stdio.h>

#include <stdlib.h>

// Include GLEW

#include <GL/glew.h>

// Include GLFW

#include <glfw3.h>

GLFWwindow* window1, window2;

int main( void )

{

    // Initialise GLFW

    if( !glfwInit() )

    {

        fprintf( stderr, "Failed to initialize GLFW\n" );

        return -1;

    }

    // Open the first window and create its OpenGL context

    window1 = glfwCreateWindow( 1024, 768, "Window1", NULL, NULL);

    if( window1 == NULL ){

        glfwTerminate();

        return -1;

    }

    glfwMakeContextCurrent(window1);

    // Initialize GLEW

    if (glewInit() != GLEW_OK) {

        fprintf(stderr, "Failed to initialize GLEW\n");

        return -1;

    }

    glfwSetInputMode(window1, GLFW_STICKY_KEYS, GL_TRUE);

    // Open the second window and create its OpenGL context

    window2 = glfwCreateWindow( 1024, 768, "Window2", NULL, NULL);

    if( window2 == NULL ){

        glfwTerminate();

        return -1;

    }

    glfwMakeContextCurrent(window2);

    do{

        // Draw stuff

        // Swap buffers

        glfwSwapBuffers(window1);

        glfwSwapBuffers(window2);   // <- the app crashes at this point!

        glfwPollEvents();

    } // Check if the ESC key was pressed or the window was closed

    while( glfwGetKey(window1, GLFW_KEY_ESCAPE ) != GLFW_PRESS &&

           glfwWindowShouldClose(window1) == 0 );

    // Close OpenGL window and terminate GLFW

    glfwTerminate();

    return 0;

}

0 Likes

Thanks. I don't deal with the GL driver myself, but what I can do is forward this report to a relevant team. Someone should get back to you in this thread at some point with more details.  

0 Likes

Many thanks.

0 Likes

Hi Stephanp, I am sorry that Radeon driver is an open source driver stack and beyond our support list, so we can’t help about this issue. I suggest you to wait for our close source driver.

0 Likes

Thanks for the response. I will be patient. I can deal with Ubuntu 14.04 with fglrx until drivers are ready.

0 Likes