video: change multisample/AA setting to u32

This commit is contained in:
Shawn Hoffman 2017-06-07 04:30:39 -07:00
parent 9357cee2ef
commit 5480efdff2
7 changed files with 11 additions and 11 deletions

View File

@ -57,7 +57,7 @@ const ConfigInfo<bool> GFX_ENABLE_GPU_TEXTURE_DECODING{
const ConfigInfo<bool> GFX_ENABLE_PIXEL_LIGHTING{{System::GFX, "Settings", "EnablePixelLighting"}, const ConfigInfo<bool> GFX_ENABLE_PIXEL_LIGHTING{{System::GFX, "Settings", "EnablePixelLighting"},
false}; false};
const ConfigInfo<bool> GFX_FAST_DEPTH_CALC{{System::GFX, "Settings", "FastDepthCalc"}, true}; const ConfigInfo<bool> GFX_FAST_DEPTH_CALC{{System::GFX, "Settings", "FastDepthCalc"}, true};
const ConfigInfo<int> GFX_MSAA{{System::GFX, "Settings", "MSAA"}, 1}; const ConfigInfo<u32> GFX_MSAA{{System::GFX, "Settings", "MSAA"}, 1};
const ConfigInfo<bool> GFX_SSAA{{System::GFX, "Settings", "SSAA"}, false}; const ConfigInfo<bool> GFX_SSAA{{System::GFX, "Settings", "SSAA"}, false};
const ConfigInfo<int> GFX_EFB_SCALE{{System::GFX, "Settings", "EFBScale"}, const ConfigInfo<int> GFX_EFB_SCALE{{System::GFX, "Settings", "EFBScale"},
static_cast<int>(SCALE_1X)}; static_cast<int>(SCALE_1X)};

View File

@ -47,7 +47,7 @@ extern const ConfigInfo<bool> GFX_INTERNAL_RESOLUTION_FRAME_DUMPS;
extern const ConfigInfo<bool> GFX_ENABLE_GPU_TEXTURE_DECODING; extern const ConfigInfo<bool> GFX_ENABLE_GPU_TEXTURE_DECODING;
extern const ConfigInfo<bool> GFX_ENABLE_PIXEL_LIGHTING; extern const ConfigInfo<bool> GFX_ENABLE_PIXEL_LIGHTING;
extern const ConfigInfo<bool> GFX_FAST_DEPTH_CALC; extern const ConfigInfo<bool> GFX_FAST_DEPTH_CALC;
extern const ConfigInfo<int> GFX_MSAA; extern const ConfigInfo<u32> GFX_MSAA;
extern const ConfigInfo<bool> GFX_SSAA; extern const ConfigInfo<bool> GFX_SSAA;
extern const ConfigInfo<int> GFX_EFB_SCALE; extern const ConfigInfo<int> GFX_EFB_SCALE;
extern const ConfigInfo<bool> GFX_TEXFMT_OVERLAY_ENABLE; extern const ConfigInfo<bool> GFX_TEXFMT_OVERLAY_ENABLE;

View File

@ -1322,11 +1322,11 @@ void VideoConfigDiag::PopulatePostProcessingShaders()
void VideoConfigDiag::PopulateAAList() void VideoConfigDiag::PopulateAAList()
{ {
const std::vector<int>& aa_modes = vconfig.backend_info.AAModes; const auto& aa_modes = vconfig.backend_info.AAModes;
const bool supports_ssaa = vconfig.backend_info.bSupportsSSAA; const bool supports_ssaa = vconfig.backend_info.bSupportsSSAA;
m_msaa_modes = 0; m_msaa_modes = 0;
for (int mode : aa_modes) for (auto mode : aa_modes)
{ {
if (mode == 1) if (mode == 1)
{ {
@ -1342,7 +1342,7 @@ void VideoConfigDiag::PopulateAAList()
if (supports_ssaa) if (supports_ssaa)
{ {
for (int mode : aa_modes) for (auto mode : aa_modes)
{ {
if (mode != 1) if (mode != 1)
choice_aamode->AppendString(std::to_string(mode) + "x SSAA"); choice_aamode->AppendString(std::to_string(mode) + "x SSAA");

View File

@ -320,7 +320,7 @@ HRESULT Create(HWND wnd)
return desc.Count == g_Config.iMultisamples; return desc.Count == g_Config.iMultisamples;
}) == aa_modes.end()) }) == aa_modes.end())
{ {
Config::SetCurrent(Config::GFX_MSAA, 1); Config::SetCurrent(Config::GFX_MSAA, UINT32_C(1));
UpdateActiveConfig(); UpdateActiveConfig();
} }

View File

@ -63,7 +63,7 @@ static std::unique_ptr<RasterFont> s_raster_font;
// 1 for no MSAA. Use s_MSAASamples > 1 to check for MSAA. // 1 for no MSAA. Use s_MSAASamples > 1 to check for MSAA.
static int s_MSAASamples = 1; static int s_MSAASamples = 1;
static int s_last_multisamples = 1; static u32 s_last_multisamples = 1;
static bool s_last_stereo_mode = false; static bool s_last_stereo_mode = false;
static bool s_last_xfb_mode = false; static bool s_last_xfb_mode = false;
@ -519,7 +519,7 @@ Renderer::Renderer()
{ {
// GLES 3.1 can't support stereo rendering and MSAA // GLES 3.1 can't support stereo rendering and MSAA
OSD::AddMessage("MSAA Stereo rendering isn't supported by your GPU.", 10000); OSD::AddMessage("MSAA Stereo rendering isn't supported by your GPU.", 10000);
Config::SetCurrent(Config::GFX_MSAA, 1); Config::SetCurrent(Config::GFX_MSAA, UINT32_C(1));
} }
} }
else else

View File

@ -1106,7 +1106,7 @@ void Renderer::CheckForSurfaceChange()
void Renderer::CheckForConfigChanges() void Renderer::CheckForConfigChanges()
{ {
// Save the video config so we can compare against to determine which settings have changed. // Save the video config so we can compare against to determine which settings have changed.
int old_multisamples = g_ActiveConfig.iMultisamples; u32 old_multisamples = g_ActiveConfig.iMultisamples;
int old_anisotropy = g_ActiveConfig.iMaxAnisotropy; int old_anisotropy = g_ActiveConfig.iMaxAnisotropy;
int old_stereo_mode = g_ActiveConfig.iStereoMode; int old_stereo_mode = g_ActiveConfig.iStereoMode;
int old_aspect_ratio = g_ActiveConfig.iAspectRatio; int old_aspect_ratio = g_ActiveConfig.iAspectRatio;

View File

@ -70,7 +70,7 @@ struct VideoConfig final
bool bShaderCache; bool bShaderCache;
// Enhancements // Enhancements
int iMultisamples; u32 iMultisamples;
bool bSSAA; bool bSSAA;
int iEFBScale; int iEFBScale;
bool bForceFiltering; bool bForceFiltering;
@ -167,7 +167,7 @@ struct VideoConfig final
APIType api_type; APIType api_type;
std::vector<std::string> Adapters; // for D3D std::vector<std::string> Adapters; // for D3D
std::vector<int> AAModes; std::vector<u32> AAModes;
// TODO: merge AdapterName and Adapters array // TODO: merge AdapterName and Adapters array
std::string AdapterName; // for OpenGL std::string AdapterName; // for OpenGL