Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
78 user(s) are online (64 user(s) are browsing Forums)

Members: 0
Guests: 78

more...
Support us!
Recent OS4 Files
OS4Depot.net
Report message:*
 

Re: RadeonHD 3.x bug (?): more than ~256mb of used GPU (second chunk) memory cause a heavy lockup/crash.

Subject: Re: RadeonHD 3.x bug (?): more than ~256mb of used GPU (second chunk) memory cause a heavy lockup/crash.
by kas1e on 2019/9/27 18:09:26

@All
I step by step trying to find deep details, and create a simple test case, which looks like this:

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

#include <SDL/SDL.h>
#include <GL/gl.h>


// 100 : eat 34 mb of GPU
// 200 : eat 68 mb of GPU
// 300 : eat 101 mb of GPU
// 400 : eat 135 mb of GPU
// 500 : eat 168 mb of GPU
// 600 : eat 202 mb of GPU
// 700 : eat 235 mb of GPU
// 750 : eat 252 mb of GPU

// 761 : fill 256 mb of GPU , but not overbound to 257 mb at moment
// 762 : now we cross the line of 256 mb => CRASH

int num_of_textures 761;


/* function to load in bitmap as a GL texture */
int LoadGLTextures( )
{

    
int width 256;
    
int height 256;
    
unsigned char *data;
    
data malloc(width*height*3);    

    
GLuint TextureID[num_of_textures];

    
glEnable(GL_TEXTURE_2D);

    for(
int a=0;a<num_of_textures;a++)
    {
        
glGenTextures1, &TextureID[a]);
        
glBindTextureGL_TEXTURE_2DTextureID[a]);
        
glTexImage2D(GL_TEXTURE_2D0GL_RGBwidthheight,0GL_RGBGL_UNSIGNED_BYTEdata);
        
    }

    
free(data);
}


int mainint argcchar **argv )
{
  
    
/* main loop variable */
    
int done false;
    
/* used to collect events */
    
SDL_Event event;


    
/* initialize SDL */
    
if ( SDL_InitSDL_INIT_VIDEO ) < )
    {
        
fprintfstderr"Video initialization failed: %sn",
             
SDL_GetError( ) );
        
SDL_Quit();
    }


    
/* get a SDL surface */
    
SDL_Surface *surface SDL_SetVideoMode64048016SDL_OPENGL SDL_GL_DOUBLEBUFFER);


    
/* Load in the texture */
    
LoadGLTextures();


    
/* wait for events */
    
while ( !done )
    {
        
/* handle the events in the queue */

        
while ( SDL_PollEvent( &event ) )
        {
            switch( 
event.type )
            {                            
            case 
SDL_QUIT:
                
/* handle quit requests */
                
done 1;
                break;
            default:
                break;
            }
        }
    }

    
/* clean ourselves up and exit */
    
SDL_Quit();

    
/* Should never get here */
    
return(0);
}


I compile it over gl4es (so ogles2, warp3dnova in use), and can reproduce the crash easy. Till i fill only 256 and no more (so any amount of textures, but no more than 256 mb is filled) all is fine. Once i add one more texture so it should be placed in 257 mb of GPU then CRASH and burn !

Now i will start to reduce components. First i will try to create pure ogles2 example (without gl4es involved), then if issue still here, then pure warp3dnova example.
Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project