KhronosGroup / OpenGL-Registry

OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry
690 stars 276 forks source link

GL_INTEL_performance_queries is missing in gl.xml #494

Closed StanleySweet closed 2 years ago

StanleySweet commented 2 years ago

As reported here https://github.com/Dav1dde/glad/issues/346 GL_INTEL_performance_queries seems to be missing. It seems in the past ten years Intel hasn't written the specification for that extension.

The only specification that seems to exist is this http://zaynar.co.uk/docs/gl-intel-performance-queries.html provided by a retired Wildfire Games (the team behind 0 A.D: Empires Ascendant) team member.

Let me know if there is anything else I can do.

oddhack commented 2 years ago

There's not a lot we can do with an extension the vendor does not document. If there's reliable reason to think the interface is known, it could be added to gl.xml, with some caveat commentary that we don't actually know for sure. This has been done with a couple of other orphaned extensions IIRC, together with some stubbed out "extension specs" that explain the situation.

As far as I can tell from gpuinfo.org and https://feedback.wildfiregames.com/report/opengl/feature/GL_INTEL_performance_queries, Intel stopped supporting this with their OpenGL 4.3 drivers. So it doesn't seem like something people would want to use today. Of course that's true of most extensions, I'm just saying that there seems little compelling reason to spend much time digging up history. Note there is also a GL_INTEL_performance_query extension which is documented and shares at least some of the same API - the queries version may have been an experimental extension that got included in their builds for a while, or something of that nature.

Possibly fun historical note: early in GL history, when it was still all workstation manufacturers, one of the CAD vendors came up with a "secret" extension. They convinced multiple GL implementers to support it in their drivers, but not to expose it in the GL_EXTENSIONS string. We speculated the purpose was to give them some sort of competitive edge over other CAD vendors, while keeping the driver suppliers from realizing what was going on.

If you want to put together an XML addition for this and Intel folks don't object, I'd be fine accepting it - will have to figure out who at Intel to even ask these days, though. That might alleviate the glad issue.

StanleySweet commented 2 years ago

So it doesn't seem like something people would want to use today.

Indeed, we might replace it in the future with GL_EXT_timer_query
From our more recent stats (the page you linked is very outdated) https://feedback.wildfiregames.com/results/gl/extensions/ it seems that only 3.7% of our users support it anyway.

I just reported it for completeness in our migration :)

Possibly fun historical note: early in GL history, when it was still all workstation manufacturers, one of the CAD vendors came up with a "secret" extension. They convinced multiple GL implementers to support it in their drivers, but not to expose it in the GL_EXTENSIONS string. We speculated the purpose was to give them some sort of competitive edge over other CAD vendors, while keeping the driver suppliers from realizing what was going on.

Nice, is there any source for this?

If you want to put together an XML addition for this and Intel folks don't object, I'd be fine accepting it - will have to figure out who at Intel to even ask these days, though. That might alleviate the glad issue.

We only got in touch with one person at intel when she wrote that article https://www.intel.com/content/www/us/en/developer/articles/technical/identifying-the-frame-rate-bottleneck-in-0-ad.html

I'll keep watching this issue, see if more Intel people show up :) And then if hope is lost I will make a PR :)

pdaniell-nv commented 2 years ago

@ianromanick do you know about GL_INTEL_performance_queries and whether it can be added to the registry?

ianromanick commented 2 years ago

Looking back through the Mesa repo, I can only find references to GL_INTEL_performance_query. There is an odd mention or two of GL_INTEL_performance_queries in commit messages, but I believe those are just typos. If the "ies" version was ever a thing, I don't know anything about it.

Maybe @llandwerlin-intel will know something since he did the Mesa work on the "y" version.

llandwerlin-intel commented 2 years ago

I think queries might have been a windows driver typo.

StanleySweet commented 2 years ago

Our stats report both extensions

https://feedback.wildfiregames.com/results/gl/extensions/

llandwerlin-intel commented 2 years ago

Yeah, I think the Intel/Windows drivers had both. The Intel/Mesa only advertised GL_INTEL_performance_query

StanleySweet commented 2 years ago
    #define INTEL_PERFQUERIES_NONBLOCK             0x83FA
    #define INTEL_PERFQUERIES_BLOCK                0x83FB
    #define INTEL_PERFQUERIES_TYPE_UNSIGNED_INT    0x9402
    #define INTEL_PERFQUERIES_TYPE_UNSIGNED_INT64  0x9403
    #define INTEL_PERFQUERIES_TYPE_FLOAT           0x9404
    #define INTEL_PERFQUERIES_TYPE_BOOL            0x9406

Those defines are not present in the other extension, see the link in the first post.

llandwerlin-intel commented 2 years ago

I don't have access to any documentation regarding GL_INTEL_performance_queries. My impression is that it was probably an early iteration of GL_INTEL_performance_query and stay around in the Windows drivers for some reason.

How much value is there in documenting this?

oddhack commented 2 years ago

@StanleySweet based on @llandwerlin-intel's comment I think you may be at the "hope is lost" phase - so if you want to make a PR with appropriate disclaimers that is probably the only path forward. Otherwise we should close this as it seems unlikely anyone in Khronos is going to take action on this.

StanleySweet commented 2 years ago

That code is probably gonna be nuked from 0 A.D. anyway, and if there isn't any interest I don't think it's worth it. Thanks for your time and patience :)