Hi Ti's experts,
we found any rendering abnormalities in the GPU after running our program multiple times for a long time(About two hours), like this,
This phenomenon has now replicated three times,
a)First time discovered on a real vehicle,Please refer to the attachment for the phenomenon , .After maintaining this for a long time, rotating at a certain angle and returning to normal, it no longer reappears., We also recorded PVRTune data0524-582.zip
b) The same phenomenon also appeared on the platform for the second time,the phenomenon of repeatedly running the program during this period is consistent, which lasted for about two minutes and then resumed
c) The phenomenon for the third and second times is consistent, but it shows anomalies in different areas
The code implementation on our GPU is as follows. Can you help check if there are any issues?
// create Renderbuffer。 glGenRenderbuffers(1, &offscreen_fbo_depth); glBindRenderbuffer(GL_RENDERBUFFER, offscreen_fbo_depth); glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, width, height); glBindRenderbuffer(GL_RENDERBUFFER, 0); // create Framebuffer。 glGenFramebuffers(1, &offscreen_fbo); glBindFramebuffer(GL_FRAMEBUFFER, offscreen_fbo); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, offscreen_fbo_texture, 0); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, offscreen_fbo_depth); if ((status = glCheckFramebufferStatus(GL_FRAMEBUFFER)) != GL_FRAMEBUFFER_COMPLETE) { LOG(ERROR)<<"glCheckFramebufferStatus returned error"<<status; return -1; } // Load 3D car model components and other data into VertexArray glGenVertexArrays(1, &vao); glBindVertexArray(vao); //Allocate and assign three VBO to our handle (vertices, normals and texture coordinates) glGenBuffers(3, buffer); //store vertices into buffer glBindBuffer(GL_ARRAY_BUFFER, buffer[P_VERTEX]); glBufferData(GL_ARRAY_BUFFER, sizeof(Vertex) * count, vertices, GL_STATIC_DRAW); // vertices are on index 0 and contains three floats per vertex glVertexAttribPointer(GLuint(0), 3, GL_FLOAT, GL_FALSE, 0, 0); glEnableVertexAttribArray(0); //store normals into buffer glBindBuffer(GL_ARRAY_BUFFER, buffer[P_NORMAL]); glBufferData(GL_ARRAY_BUFFER, sizeof(Vertex) * count, normals, GL_STATIC_DRAW); // normals are on index 1 and contains three floats per vertex glVertexAttribPointer(GLuint(1), 3, GL_FLOAT, GL_FALSE, 0, 0); glEnableVertexAttribArray(1); //store texture coordinates glBindBuffer(GL_ARRAY_BUFFER, buffer[P_TEXCOORD]); glBufferData(GL_ARRAY_BUFFER, sizeof(Coord) * count, texcoords, GL_STATIC_DRAW); //coordinates are on index 2 and contains two floats per vertex glVertexAttribPointer(GLuint(2), 2, GL_FLOAT, GL_FALSE, 0, 0); glEnableVertexAttribArray(2); glBindVertexArray(0);
The program rendering process is as follows,
- save current Framebuffer。
GLint default_fbo;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &default_fbo);
- bind offscreen_fbo。
glBindFramebuffer(GL_FRAMEBUFFER, offscreen_fbo);
- draw to the offscreen_fbo。
glBindVertexArray(vbo->GetVAO());
glDrawArrays(GL_TRIANGLES, 0, vbo->GetCount());
glBindVertexArray(0);
- bind current Framebuffer。
glBindFramebuffer(GL_FRAMEBUFFER, default_fbo);
- offscreen_fbo swap to default_fbo。
- run glFinish();
This doesn't seem like a software issue, We speculate if there is a problem with the driver or hardware ?Have you encountered similar problems?
Please help locate the cause of the problem, thanks!