Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel GL performance counters #1136

Closed
wants to merge 5 commits into from

Conversation

djdeath
Copy link
Contributor

@djdeath djdeath commented Oct 22, 2018

Description

This PR includes the fixes from #1134

It adds the performance counter support on OpenGL for Intel chipsets and in particular the motivation was to get some data with the Intel/Mesa driver (although this extension is available on Windows too).

Reading #967 it seems performance counter support is somewhat low on the list of things to tackle (if it's even on the list).
Just putting this out there, no big deal if no interest.

Commit cba4e8a ("Implemented OpenGL counters using pipeline
stats and occlusion queries") introduced a query with the GL_NONE
target which doesn't seem valid looking at the OpenGL 4.6 (Core
Profile).

Section 4.2. QUERY OBJECTS AND ASYNCHRONOUS QUERIES:

"An INVALID_ENUM error is generated if target is TIMESTAMP , or is not
one of the query object targets described in section 4.2.1."

Section 4.2.1 doesn't list GL_NONE.
Avoid error raised when querying the results later on.
A missing \n was triggering a compile error for example :

 #extension GL_ARB_shader_storage_buffer_object : require#define SHADER_RESTYPE 1
 #define UINT_TEX 0
At this point we don't have Intel GL counters. But the current logic
assumes there is only AMD ones (and that if it's not AMD's, it must be
the generic ones).
@djdeath djdeath force-pushed the intel-gl-performance-counters branch from 28e3e76 to 0bc2cbb Compare October 22, 2018 23:51
Intel published a performance query extension support defined back in
2013. This is available on Windows & Linux (in the Mesa driver). This
should provide the same types of counters as the MDAPI backend for
DX11.

Frameretrace [1] (a fork/branch of Apitrace) uses the same extension.

[1]: https://github.com/janesma/apitrace/wiki/screen-shots
@djdeath djdeath force-pushed the intel-gl-performance-counters branch from 0bc2cbb to fd7ed29 Compare October 23, 2018 00:05
@baldurk
Copy link
Owner

baldurk commented Oct 23, 2018

I don't have any objections to adding more counter support within the existing framework, it's just that profiling is not currently a goal of the project as I don't have the time to put into it. So in that respect PRs are fine.

I would ask though that you avoid adding dependent PRs like this, otherwise changes and fixes to the other PR on that branch will clash with this one. Once those changes are merged then either re-open this PR with rebased changes or open a new one, but please only one PR at a time unless they're entirely independent.

@baldurk baldurk closed this Oct 23, 2018
@dos1
Copy link
Contributor

dos1 commented Dec 10, 2018

@djdeath How about rebasing this PR now that #1134 is in? :)

@djdeath
Copy link
Contributor Author

djdeath commented Dec 10, 2018

Reopened as #1202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants