summaryrefslogtreecommitdiff
path: root/Ports/libatomic_ops
diff options
context:
space:
mode:
authorJesse Buhagiar <jooster669@gmail.com>2021-08-20 21:19:42 +1000
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-08-21 13:48:59 +0430
commit0152f1924b9330e00c027c8b0cc0e7cab22a89f0 (patch)
treef29e7678583fa7beb1d93ea6290ff76793e5ff43 /Ports/libatomic_ops
parent2fe5f1528fc134ced8c8f2e0a5d5ec3b9f2a44f4 (diff)
downloadserenity-0152f1924b9330e00c027c8b0cc0e7cab22a89f0.zip
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.
Diffstat (limited to 'Ports/libatomic_ops')
0 files changed, 0 insertions, 0 deletions