mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 08:20:05 +00:00
config: Make sample_count
a pow/log-2 index
Sample counts increment in powers of two(1,2,4,8). Rather than storing a direct integer of the number of samples, just store the pow2 index.
This commit is contained in:
parent
90ad4e1a19
commit
3c2f825c84
@ -475,7 +475,7 @@ struct Values {
|
|||||||
SwitchableSetting<bool> use_vsync_new{true, "use_vsync_new"};
|
SwitchableSetting<bool> use_vsync_new{true, "use_vsync_new"};
|
||||||
Setting<bool> use_shader_jit{true, "use_shader_jit"};
|
Setting<bool> use_shader_jit{true, "use_shader_jit"};
|
||||||
SwitchableSetting<u32, true> resolution_factor{1, 0, 10, "resolution_factor"};
|
SwitchableSetting<u32, true> resolution_factor{1, 0, 10, "resolution_factor"};
|
||||||
SwitchableSetting<u8, true> sample_count{1, 0, 8, "sample_count"};
|
SwitchableSetting<u8, true> sample_count{0, 0, 3, "sample_count"};
|
||||||
SwitchableSetting<u16, true> frame_limit{100, 0, 1000, "frame_limit"};
|
SwitchableSetting<u16, true> frame_limit{100, 0, 1000, "frame_limit"};
|
||||||
SwitchableSetting<TextureFilter> texture_filter{TextureFilter::None, "texture_filter"};
|
SwitchableSetting<TextureFilter> texture_filter{TextureFilter::None, "texture_filter"};
|
||||||
SwitchableSetting<TextureSampling> texture_sampling{TextureSampling::GameControlled,
|
SwitchableSetting<TextureSampling> texture_sampling{TextureSampling::GameControlled,
|
||||||
|
@ -37,7 +37,7 @@ u8 RendererBase::GetSampleCount() const {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Settings::values.sample_count.GetValue();
|
return static_cast<u8>(1u << Settings::values.sample_count.GetValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
void RendererBase::UpdateCurrentFramebufferLayout(bool is_portrait_mode) {
|
void RendererBase::UpdateCurrentFramebufferLayout(bool is_portrait_mode) {
|
||||||
|
@ -766,7 +766,7 @@ bool RasterizerVulkan::AccelerateDisplay(const Pica::FramebufferConfig& config,
|
|||||||
src_params.stride = pixel_stride;
|
src_params.stride = pixel_stride;
|
||||||
src_params.is_tiled = false;
|
src_params.is_tiled = false;
|
||||||
src_params.pixel_format = VideoCore::PixelFormatFromGPUPixelFormat(config.color_format);
|
src_params.pixel_format = VideoCore::PixelFormatFromGPUPixelFormat(config.color_format);
|
||||||
src_params.sample_count = Settings::values.sample_count.GetValue();
|
src_params.sample_count = (1u << Settings::values.sample_count.GetValue());
|
||||||
src_params.UpdateParams();
|
src_params.UpdateParams();
|
||||||
|
|
||||||
const auto [src_surface_id, src_rect] =
|
const auto [src_surface_id, src_rect] =
|
||||||
|
Loading…
Reference in New Issue
Block a user