mirror of
https://github.com/libretro/beetle-psx-libretro.git
synced 2024-11-23 08:49:47 +00:00
Add MSAA option.
This commit is contained in:
parent
f9429349d7
commit
b88758e5bd
@ -3926,6 +3926,7 @@ void retro_set_environment(retro_environment_t cb)
|
||||
#ifdef HAVE_VULKAN
|
||||
{ BEETLE_OPT(adaptive_smoothing), "Adaptive smoothing; enabled|disabled" },
|
||||
{ BEETLE_OPT(super_sampling), "Super sampling (downsample from internal upscale); disabled|enabled" },
|
||||
{ BEETLE_OPT(msaa), "MSAA; 1x|2x|4x|8x|16x" },
|
||||
{ BEETLE_OPT(mdec_yuv), "MDEC YUV Chroma filter; disabled|enabled" },
|
||||
#endif
|
||||
{ BEETLE_OPT(internal_resolution), "Internal GPU resolution; 1x(native)|2x|4x|8x|16x" },
|
||||
|
@ -32,6 +32,7 @@ static bool inside_frame;
|
||||
static bool has_software_fb;
|
||||
static bool adaptive_smoothing;
|
||||
static bool super_sampling;
|
||||
static unsigned msaa = 1;
|
||||
static bool mdec_yuv;
|
||||
static vector<function<void ()>> defer;
|
||||
static dither_mode dither_mode = DITHER_NATIVE;
|
||||
@ -73,7 +74,7 @@ static void context_reset(void)
|
||||
device = new Device;
|
||||
device->set_context(*context);
|
||||
|
||||
renderer = new Renderer(*device, scaling, 4, save_state.vram.empty() ? nullptr : &save_state);
|
||||
renderer = new Renderer(*device, scaling, msaa, save_state.vram.empty() ? nullptr : &save_state);
|
||||
|
||||
for (auto &func : defer)
|
||||
func();
|
||||
@ -182,6 +183,7 @@ void rsx_vulkan_refresh_variables(void)
|
||||
}
|
||||
|
||||
unsigned old_scaling = scaling;
|
||||
unsigned old_msaa = msaa;
|
||||
bool old_super_sampling = super_sampling;
|
||||
|
||||
var.key = BEETLE_OPT(internal_resolution);
|
||||
@ -214,6 +216,12 @@ void rsx_vulkan_refresh_variables(void)
|
||||
super_sampling = false;
|
||||
}
|
||||
|
||||
var.key = BEETLE_OPT(msaa);
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
msaa = strtoul(var.value, nullptr, 0);
|
||||
}
|
||||
|
||||
var.key = BEETLE_OPT(mdec_yuv);
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
@ -246,7 +254,7 @@ void rsx_vulkan_refresh_variables(void)
|
||||
if (super_sampling && scaling > 8)
|
||||
scaling = 8;
|
||||
|
||||
if ((old_scaling != scaling || old_super_sampling != super_sampling) && renderer)
|
||||
if ((old_scaling != scaling || old_super_sampling != super_sampling || old_msaa != msaa) && renderer)
|
||||
{
|
||||
retro_system_av_info info;
|
||||
rsx_vulkan_get_system_av_info(&info);
|
||||
|
Loading…
Reference in New Issue
Block a user