Bug 96925 - Improve GL driver version parsing ...
Summary: Improve GL driver version parsing ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.1.0.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: VCL-OpenGL
  Show dependency treegraph
 
Reported: 2016-01-06 15:40 UTC by Michael Meeks
Modified: 2016-01-08 13:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
hacked up bits of a unit-test for version parsing =) (5.03 KB, patch)
2016-01-06 15:41 UTC, Michael Meeks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2016-01-06 15:40:05 UTC
Windows 10 seems to have encouraged people to add another digit to their GL driver versions:

		+ Intel:
			+ 15.40.10.64.4300 - 64bit / only
			+ 15.40.12.4326    - 32bit
		+ AMD:
			+ 15.30.1025.1001  - 32bit / other
			+ 15.40.4.64.4256  - 64bit

cf.

https://downloadcenter.intel.com/product/81502/Intel-HD-Graphics-2000-for-2nd-Generation-Intel-Core-Processors

It seems Microsoft mandate a certain pattern for driver versions too:

https://msdn.microsoft.com/en-us/library/windows/hardware/ff570154(v=vs.85).aspx

Anyhow - for now; I guess we need to drop the .64. for 64bit versions =)

Thanks !
Comment 1 Michael Meeks 2016-01-06 15:41:07 UTC
Created attachment 121751 [details]
hacked up bits of a unit-test for version parsing =)
Comment 2 How can I remove my account? 2016-01-06 16:45:27 UTC
Actually, we don't know whether the version number as reported by the system APIs, ever includes this .64. part. The five part version numbers might be used only in human-readable contexts. My initial report that the version of my AMD driver was 15.40.4.64.4256 was a misunderstanding. The number actually came from the vcl/opengl/opengl_blacklist_windows.xml file.
Comment 3 How can I remove my account? 2016-01-06 17:06:19 UTC
(And that number in that xml file seems to be a mistake and should actually be 15.40.4.64, to match the data and behaviour of the code in 5.0. There the five-part bit was used for the "suggested version", which is only displayed in a message, not parsed or compared to anything.)
Comment 4 How can I remove my account? 2016-01-08 10:45:13 UTC
Anyway, the opengl_blacklist_windows.xml file has been fixed now to have the proper version number for that Intel driver (90e1baf4ed1cf03bec430870d870ede0984f9adc), and *if* the code that parses the version numbers would ever in the future again come across a version number with more than four numbers (either from the system, or from some future error in that .xml file), it won't access an array out of bounds (and potentially crash, or worse) any longer (d12dcbcb61b1818c7ea58650fc06bf4aa04057cf). Resolving this as fixed.
Comment 5 Michael Meeks 2016-01-08 13:42:31 UTC
It is even more fun than this ;-) The latest Intel driver downloads have numbers on their page like:

"Intel® HD Graphics Driver for Windows* 7/8-64-bit
 Version: 15.28.24.64.4229 (Latest) Date: 6/5/2015"

But as you install them it says:

"Installing Driver HD Graphics 4600
 Version: 10.18.14.4264"

nice to see the version they advertise and what is installed are disjoint.

I think we need to black-list all but 10.18.14.4264 and higher ...

Unfortunately this axes the older SandyBridge chips; I have a working:

i7-2620M - whose latest driver is:
9.17.10.4229

But c'est la vie.

We know that drivers sub 4264 have a horrific bug with the GL framebuffer binding & unbinding, so - need to require the latest there.