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

Improve the refresh rate precision. (AMDVLK #268) #100

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion inc/core/palScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ struct ScreenMode

Extent2d extent; ///< Width and height of the resolution.
SwizzledFormat format; ///< Pixel format and channel swizzle of the display mode.
uint32 refreshRate; ///< Refresh rate in Hz.
Rational refreshRate; ///< Refresh rate in Hz.
};

/// 3-component floating point vector describing the red, green, and blue channels of a color.
Expand Down
3 changes: 2 additions & 1 deletion src/core/os/amdgpu/amdgpuDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5708,7 +5708,8 @@ Result Device::QueryScreenModesForConnector(

pScreenModeList[j].extent.width = pMode->hdisplay;
pScreenModeList[j].extent.height = pMode->vdisplay;
pScreenModeList[j].refreshRate = pMode->vrefresh;
pScreenModeList[j].refreshRate.numerator = pMode->clock * 1000;
pScreenModeList[j].refreshRate.denominator = pMode->htotal * pMode->vtotal;
pScreenModeList[j].flags.u32All = 0;
}

Expand Down