Skip to content

Conversation

@dpogue
Copy link
Member

@dpogue dpogue commented Aug 12, 2025

Prints out the available hsG3DDeviceRecord records along with their hsG3DDeviceMode resolutions for debugging purposes.

Incredibly hacky code 😛

@dpogue dpogue force-pushed the hsG3DDeviceDumper branch 7 times, most recently from b910539 to e4fcaa8 Compare August 19, 2025 05:30
@dpogue dpogue force-pushed the hsG3DDeviceDumper branch 4 times, most recently from f60f968 to 282c217 Compare August 23, 2025 09:36
@dpogue
Copy link
Member Author

dpogue commented Aug 23, 2025

In theory this is ready (although TBD if it's worth merging the tool or just picking the various other bits into their own PR without the tool).

The one thing I've not been able to test properly is Windows: In my Windows VM, epoxy wgl seems to fail to get a context, although non-epoxy wgl works.

If someone is able to grab a build from CI and run it on Windows and confirm if it prints out an OpenGL driver version and display resolutions, that would be very helpful.

@Hoikas
Copy link
Member

Hoikas commented Aug 23, 2025

It seems to work fine here:

PS C:\Users\AdamJ\Downloads\plasma-windows-x64-internal-release\tools> ./hsG3DDeviceDumper
Checking device records... 2 found.

and then a whole pile of stuff follows.

@dpogue
Copy link
Member Author

dpogue commented Aug 23, 2025

It should print an OpenGL driver name/version followed by screen resolutions, and then do the same for DirectX. I think I've seen a case where it printed multiple DX drivers.

On my VM it's not printing the OpenGL driver at all.

@Hoikas
Copy link
Member

Hoikas commented Aug 23, 2025

@dpogue
Copy link
Member Author

dpogue commented Aug 23, 2025

hmm, yeah, that looks like 2 DX drivers and a lack of deduplication on the resolutions (just remembered that the resolution deduplicating is only for OpenGL) 😕

@dpogue dpogue force-pushed the hsG3DDeviceDumper branch 3 times, most recently from f1a58cd to 9c4004a Compare August 24, 2025 07:32
@dpogue
Copy link
Member Author

dpogue commented Aug 25, 2025

This latest revision seems to work for me in wine, but not in my Windows VM.

@Hoikas
Copy link
Member

Hoikas commented Aug 26, 2025

Looks like I'm now getting an OpenGL driver: https://gist.github.com/Hoikas/e1af43129027a6e9461c6089f50a9adb

@dpogue dpogue marked this pull request as ready for review August 26, 2025 01:23
@dpogue
Copy link
Member Author

dpogue commented Aug 26, 2025

I'm still unclear whether the tool itself has any long-term value and should be merged or not, but this seems like a good starting point for other Linux and OpenGL work

@dpogue dpogue force-pushed the hsG3DDeviceDumper branch from 9c4004a to fb2493a Compare August 27, 2025 00:41
@dpogue
Copy link
Member Author

dpogue commented Sep 7, 2025

Decision to be made here: Do we think having this tool is useful, or should I split out the device enumeration fixes into their own PR and close the tool part of this one?

@dpogue dpogue added the Tools label Sep 7, 2025
@Deledrius
Copy link
Member

I think the tool functionality might be more useful long-term as a console command, but I'm not working on adding new clients/platforms so my opinion on that is not strong.

@Hoikas Hoikas requested a review from colincornaby September 8, 2025 03:30
@dpogue dpogue force-pushed the hsG3DDeviceDumper branch from 88a6a7b to 154392f Compare January 31, 2026 04:31
@class NSScreen;
#else
class NSScreen;
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be ok for now - but this situation will get worse. iOS doesn't support CGDirectDisplayID - it only has Cocoa types. I'll continue thinking about it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a plIOSDisplayHelper would make sense for that case if it's different enough?

@dpogue dpogue force-pushed the hsG3DDeviceDumper branch from fbc6956 to 58f7275 Compare January 31, 2026 08:16
public:
virtual ~plDisplayHelper() {}

virtual plDisplayMode DesktopDisplayMode() = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was noticing this in the derived classes you added - this will make a copy of the display mode when called. I wonder if we should - potentially in another PR - change this to return a const reference to avoid that.

dpogue and others added 10 commits January 31, 2026 13:30
Co-Authored-By: Adam Johnson <AdamJohnso@gmail.com>
This tool is a hack to facilitate debugging of pipeline device/driver
init stuff, but seems potentially worth having. I'm sure it could be
made less terrible, but I'm aiming for "immediately useful to me" at the
moment.
This is essentially the same as the plOptionalWinCall introduced for DPI
handling, except that it doesn't enforce WINAPI calling conventions and
can also be used to dynamically load values as well as functions.
Co-Authored-By: Adam Johnson <AdamJohnso@gmail.com>
@dpogue dpogue force-pushed the hsG3DDeviceDumper branch from 58f7275 to 34d0099 Compare January 31, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants