1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00
serenity/Userland/Libraries/LibGL
Jesse Buhagiar 0152f1924b LibGL: Use integer comparison for GL_EQUAL and GL_NOTEQUAL
This is an interesting quirk that occurs due to us using the x87 FPU
when Serenity is compiled for the i386 target. When we calculate our
depth value to be stored in the buffer, it is an 80-bit x87
floating point number, however, when stored into the DepthBuffer,
this is truncated to 32 bits. This 38 bit loss of precision means
that when x87 `FCOMP` is eventually used here the comparison fails.

This could be solved by using a `long double` for the depth buffer,
however this would take up significantly more space and is completely
overkill for a depth buffer. As such, comparing the first 32-bits of
this depth value is "good enough" that if we get a hit on it being
equal, we can pretty much guarantee that it's actually equal.
2021-08-21 13:48:59 +04:30
..
GL LibGL: Implement glPolygonMode 2021-08-20 20:04:06 +04:30
Tex LibGL: Improve texture sampling performance 2021-08-18 20:30:58 +02:00
Clipper.cpp LibGL: Fix clipping and interpolate vertex attributes 2021-08-18 20:30:58 +02:00
Clipper.h LibGL: Fix clipping and interpolate vertex attributes 2021-08-18 20:30:58 +02:00
CMakeLists.txt LibGL: Implement glVertexPointer 2021-08-14 12:49:29 +02:00
DepthBuffer.cpp Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
DepthBuffer.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
GLBlend.cpp Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
GLColor.cpp LibGL: Implement glColor3fv 2021-08-13 16:54:37 +04:30
GLContext.cpp Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
GLContext.h LibGL: Implement glPolygonMode 2021-08-20 20:04:06 +04:30
GLLights.cpp Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
GLLists.cpp LibGL: Implement glGenLists and a few friends 2021-05-11 14:09:17 +01:00
GLMat.cpp Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
GLStruct.h LibGL: Fix clipping and interpolate vertex attributes 2021-08-18 20:30:58 +02:00
GLTexture.cpp LibGL: Implement glTexParameter{i,f} 2021-08-12 18:58:41 +02:00
GLUtils.cpp LibGL: Implement glPolygonMode 2021-08-20 20:04:06 +04:30
GLVert.cpp LibGL: Implement glTexCoord4fv 2021-08-14 12:49:29 +02:00
GLVertexArrays.cpp LibGL: Implement glDrawElements 2021-08-14 12:49:29 +02:00
SoftwareGLContext.cpp LibGL: Implement glPolygonMode 2021-08-20 20:04:06 +04:30
SoftwareGLContext.h LibGL: Implement glPolygonMode 2021-08-20 20:04:06 +04:30
SoftwareRasterizer.cpp LibGL: Use integer comparison for GL_EQUAL and GL_NOTEQUAL 2021-08-21 13:48:59 +04:30
SoftwareRasterizer.h LibGL: Implement glPolygonMode 2021-08-20 20:04:06 +04:30