Recently, in order to solve the problem of blurred screens, we upgraded the GPU driver of TDA4. A new rendering issue has occurred, SRV is allowed to stand for 10 minutes before entering(Active), and the SRV component rendering is incomplete.
Incorrect rendering result:
// If avmStatus is always 1, we got correct rendering result.
// If avmStatus(== 0) is input for about 10 minutes, then input avmStatus(== 1), we will get an incomplete rendering result.
void render_renderFrame(GLuint cameraTextures[4], int avmStatus)
{
int offscreen_width = 1856;
int offscreen_height = 750;
GLint default_fbo;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &default_fbo);
// We bind an offscreen framebuffer offscreen_fbo whitch is created in srv init function.
glBindFramebuffer(GL_FRAMEBUFFER, offscreen_fbo);
// when avmStatus == 1 whitch means Active, we need to render a srv image for HDU.
if(avmStatus == 1)
{
// we clear offscreen with Gray color.
glClearColor(0.55f, 0.55f, 0.55f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Now we setup viewports and draw camera textures, car models and other components to offscreen framebuffer.
{
// glViewport ...
// glDrawArrays ...
// glViewport ...
// glDrawArrays ...
// glViewport ...
// glDrawArrays ...
// glViewport ...
// glDrawArrays ...
// Finally we got surround-view image for HDU.
//
}
}
// otherwize(Inactive) we need to render a black image for HDU.
else
{
// We clear offscreen with Black color.
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
}
glBindFramebuffer(GL_FRAMEBUFFER, default_fbo);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glViewport(0, 0, offscreen_width, offscreen_height);
// Now we render offscreen_fbo texture attachment to default framebuffer.
// ... ....
}
Please help us analyze this problem
Thanks!
Henghui Guo