|Summary:||glPolygonOffsetEXT, OFFSET_BIAS incorrectly set to a huge number|
|Product:||Mesa||Reporter:||Blaž Hrastnik <speed.the.bboy>|
|Status:||RESOLVED FIXED||QA Contact:|
|i915 platform:||i915 features:|
Description Blaž Hrastnik 2013-03-03 21:23:56 UTC
Created attachment 75858 [details] test program When using glPolygonOffsetEXT(1.0, 2.0), GL_POLYGON_OFFSET_BIAS_EXT should be set to 2.0. Instead, it is set to an enormously huge value (always the same number, 3.35544e+07).
Comment 1 Roland Scheidegger 2013-03-04 12:19:24 UTC
Looks like when using PolygonOffsetEXT() mesa will multiply the bias value by _DepthMaxF to set offset units (hence the same as calling PolygonOffset(). But the get will just return offset units instead of bias instead. I guess to really support that correctly we'd need to store bias separately. After all _DepthMaxF of the bound draw buffer could change. I don't know though if anyone is interested in that or we should just drop it...
Comment 2 Brian Paul 2013-03-04 16:24:36 UTC
I wonder if we should just drop the GL_EXT_polygon_offset extension. I see that NVIDIA doesn't advertise it.
Comment 3 Roland Scheidegger 2013-03-04 16:43:59 UTC
I guess if nvidia doesn't advertize it (and by the looks of it they never did) it should be safe to remove (and amd doesn't seem to advertize it neither in their closed-source drivers). After all PolygonOffset became core in OpenGL 1.1, so you'd be looking at OpenGL 1.0 apps potentially using it. Some of the mesa demos actually can use it, though all of them will use the ordinary PolygonOffset by default.
Comment 4 Blaž Hrastnik 2013-03-04 16:52:22 UTC
Yeah, it seems to be some obscurely ancient extension. The only reason I "used" it is because I took over the work on OpenGL bindings for ruby, and the library is over 6 years old, so some tests test really old pieces of OpenGL (https://github.com/archSeer/opengl/blob/master/test/test_gl_ext_ext.rb#L29), which is why I was able to report the past few bugs. More to come!
Comment 5 Timothy Arceri 2018-05-17 23:27:34 UTC
Extension dropped with: commit c0c69bd8ddf384379863d8b4bcbc670e86984ae5 Author: Timothy Arceri <firstname.lastname@example.org> Date: Fri May 11 15:33:22 2018 +1000 mesa: drop GL_EXT_polygon_offset support glPolygonOffset() has been part of the GL standard since 1.1. Also niether AMD or Nvidia support this in their binary drivers. Reviewed-by: Marek Olšák <email@example.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61761