drm: Fix surface size selection to respect resolution from -s option #251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[Problem]
The
glmark2-es2-drmbinary always used the maximum display resolution, ignoring the user-specified-s <width>x<height>. This caused benchmarks to run at fullscreen/highest resolution, distorting performance results.[Solution]
Adjusted the DRM backend to select the closest supported mode based on the requested size. If no exact match exists, it picks the nearest available resolution by pixel area. Also updated
resize_no_viewport()to recreate the window if resolution or fullscreen state doesn't match the request.[Platform/device]
AMD Ryzen with Radeon Vega 8 Graphics (raven)
DRM 3.57, Mesa 23.2.1, Kernel 6.8.0-52-generic
[Test/verification]
Command:
glmark2-es2-drm -s 800x600 -b terrain