mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-27 13:00:06 +00:00
renderer_base: Add GetSampleCount
Only enables sample counts higher than 1 on vulkan
This commit is contained in:
parent
23d2e532fc
commit
42b04b048c
@ -29,6 +29,17 @@ u32 RendererBase::GetResolutionScaleFactor() {
|
|||||||
: render_window.GetFramebufferLayout().GetScalingRatio();
|
: render_window.GetFramebufferLayout().GetScalingRatio();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u8 RendererBase::GetSampleCount() const {
|
||||||
|
const auto graphics_api = Settings::values.graphics_api.GetValue();
|
||||||
|
|
||||||
|
// Enabled for vulkan only for now
|
||||||
|
if (graphics_api != Settings::GraphicsAPI::Vulkan) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Settings::values.sample_count.GetValue();
|
||||||
|
}
|
||||||
|
|
||||||
void RendererBase::UpdateCurrentFramebufferLayout(bool is_portrait_mode) {
|
void RendererBase::UpdateCurrentFramebufferLayout(bool is_portrait_mode) {
|
||||||
const auto update_layout = [is_portrait_mode](Frontend::EmuWindow& window) {
|
const auto update_layout = [is_portrait_mode](Frontend::EmuWindow& window) {
|
||||||
const Layout::FramebufferLayout& layout = window.GetFramebufferLayout();
|
const Layout::FramebufferLayout& layout = window.GetFramebufferLayout();
|
||||||
|
@ -69,6 +69,9 @@ public:
|
|||||||
/// Returns the resolution scale factor relative to the native 3DS screen resolution
|
/// Returns the resolution scale factor relative to the native 3DS screen resolution
|
||||||
u32 GetResolutionScaleFactor();
|
u32 GetResolutionScaleFactor();
|
||||||
|
|
||||||
|
/// Returns the MSAA sample count
|
||||||
|
u8 GetSampleCount() const;
|
||||||
|
|
||||||
/// Updates the framebuffer layout of the contained render window handle.
|
/// Updates the framebuffer layout of the contained render window handle.
|
||||||
void UpdateCurrentFramebufferLayout(bool is_portrait_mode = {});
|
void UpdateCurrentFramebufferLayout(bool is_portrait_mode = {});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user