After update opengl artifacts and flickering

Not for sure what is going on but since the updates my images and videos have artifacts on screen and flickering issues. I can somewhat fix the artifacts and flickering on the screen but not for sure why this is happening.

Changing GL_RGB to GL_RGB32F_ARB

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
			 texture_width, texture_height,
			 0, GL_RGBA, GL_UNSIGNED_BYTE, read_address);

seems strange, any reason why you are not using GL_RGBA32F? or GL_RGBA, my guess is something to do with the alpha channel OpenGL is interpreting. Have you also tried playing around with the texture parameters?

The code original worked when I from intel 10900 to 13900 it broke and looked weird. So I update mesa and then the image you see above is the results.

20.04.1 LTS (GNU/Linux 5.6.0-1028-oem x86_64)

server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 4.6
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.8
OpenGL core profile shading language version string: 4.60
OpenGL version string: 3.0 Mesa 20.0.8
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.0.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

22.04.3 LTS (GNU/Linux 6.5.0-1003-oem x86_64)

server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL core profile shading language version string: 4.60
OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL shading language version string: 4.60
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

alpha seems to have the same issues but makes the video stutter. This is a portion of the code and yes I have tried to modify but still same issues.

glBindTexture(GL_TEXTURE_2D, new_texture_id);
check("glBindTexture");

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
check("glTexParameteri");
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
check("glTexParameteri");

glPixelStoref(GL_PACK_ROW_LENGTH, bd->shm_buffer->get_width());
glPixelStoref(GL_UNPACK_SKIP_PIXELS, bd->src_x);
glPixelStoref(GL_UNPACK_SKIP_ROWS, bd->src_y);

{
	bd->shm_buffer->grab_read_sem();

	const guint8* read_address = bd->shm_buffer->get_read_address();

	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
		 texture_width, texture_height,
		 0, GL_RGBA, GL_UNSIGNED_BYTE, read_address);
	check("glTexImage2D");

	bd->shm_buffer->release_read_sem();
}

bd->current_texture_id = bd->texture_ids[texture_index_to_render_to];

Questions:

  • Are you seeing artifacts with the above code snippet as-written?
  • Why are you not using the sized internal format GL_RGBA8 as the internal format?
  • Is it intentional that the unsized internal format you do use (GL_RGB) doesn’t contain alpha?
    (The GL driver is probably allocating space for this anyway behind-the-scenes)
  • Why are you reallocating the texture MIP storage every time through this code? Is this startup-only code?

The artifacts started to happen when I updated mesa. Mesa 23.0.4-0ubuntu1~22.04.1
Previously everything worked with Mesa 20.0.8
This all have been working fine until I changed intel chips. But there were no artifacts just shader issues. After updating the artifacts appeared on all of the chipsets.

The program is always changing videos, image, we even use it to transition videos with chorma and flip index. The code portion is huge.

There’s nothing in this code that seems to be wrong, have you checked your shaders perhaps? I had a similar issue with texture artifacts and it was more of a shader problem and it acted different on my integrated graphics and dedicated.

Well, you didn’t answer any of my questions, so I can only assume you don’t want any help.

No before updating mesa and new pc the code works perfect.
I have the same issue with all internal formats.
Yes the code is always interchanging everything. Resolutions, fps, videos sizes, images, etc. the program is designed to interchange.
No it is not a start up this has been running perfect for years.

Is this a bug with opengl? Where can I report this?

OpenGL is a API spec, not an implementation. So no.

Though I think you mean, is this a bug with your specific OpenGL driver implementation (apparently Mesa3D). It’s possible, but you haven’t established that yet.

Have you tried regression testing against other Mesa3D driver versions?

I do have a version that works. I only updated since the new machine I am using the video seems to mess up. I will explain and send my version of mesa. So previously on intel gen 7 to 10 everything works with Mesa 20.0.8. I upgrade to intel gen 12 and 13 the video seems to look like the image is over saturated. Once I updated to Mesa 23.0.4-0ubuntu1~22.04.1 the artifacts appeared on all of the intel gens. So should I look for mesa version that works with gen 13? I am just confused why this version would break gen 10 when it was working previously. This sounds like a bug! But I will try different versions.

Okay update I tested Mesa 21.2.6 and it causes the same issues as Mesa 23. So I am at a loss to understand, why mesa 20 works in my gen 10 but not the others versions after? Then in gen 13 none of the version work properly.