diff options
| author | shuffle2 <godisgovernment@gmail.com> | 2017-06-07 20:33:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-07 20:33:54 -0700 |
| commit | b11d722eeda67bc498f7bf727649fb4ae4e5f997 (patch) | |
| tree | 597b9596564442ac1c125f5f7332ffc6ec97ce03 /Source/Core/VideoBackends | |
| parent | e6aa118f2111351c7fb38a611f3523793927addb (diff) | |
| parent | fd166032abec349b9fae7240830133bf7e0c77b5 (diff) | |
Merge pull request #5572 from shuffle2/msvc-w4
msvc: use /W4 (and fixes to make it work)
Diffstat (limited to 'Source/Core/VideoBackends')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DBase.cpp | 10 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/OGL/Render.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/OGL/TextureCache.cpp | 8 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/Renderer.cpp | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp index 8000f15a31..327fece109 100644 --- a/Source/Core/VideoBackends/D3D/D3DBase.cpp +++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp @@ -240,12 +240,12 @@ D3D_FEATURE_LEVEL GetFeatureLevel(IDXGIAdapter* adapter) return feat_level; } -static bool SupportsS3TCTextures(ID3D11Device* device) +static bool SupportsS3TCTextures(ID3D11Device* dev) { UINT bc1_support, bc2_support, bc3_support; - if (FAILED(device->CheckFormatSupport(DXGI_FORMAT_BC1_UNORM, &bc1_support)) || - FAILED(device->CheckFormatSupport(DXGI_FORMAT_BC2_UNORM, &bc2_support)) || - FAILED(device->CheckFormatSupport(DXGI_FORMAT_BC3_UNORM, &bc3_support))) + if (FAILED(dev->CheckFormatSupport(DXGI_FORMAT_BC1_UNORM, &bc1_support)) || + FAILED(dev->CheckFormatSupport(DXGI_FORMAT_BC2_UNORM, &bc2_support)) || + FAILED(dev->CheckFormatSupport(DXGI_FORMAT_BC3_UNORM, &bc3_support))) { return false; } @@ -320,7 +320,7 @@ HRESULT Create(HWND wnd) return desc.Count == g_Config.iMultisamples; }) == aa_modes.end()) { - Config::SetCurrent(Config::GFX_MSAA, 1); + Config::SetCurrent(Config::GFX_MSAA, UINT32_C(1)); UpdateActiveConfig(); } diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index ebec5e98a9..ec709c152b 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -63,7 +63,7 @@ static std::unique_ptr<RasterFont> s_raster_font; // 1 for no MSAA. Use s_MSAASamples > 1 to check for MSAA. 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_xfb_mode = false; @@ -519,7 +519,7 @@ Renderer::Renderer() { // GLES 3.1 can't support stereo rendering and MSAA 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 diff --git a/Source/Core/VideoBackends/OGL/TextureCache.cpp b/Source/Core/VideoBackends/OGL/TextureCache.cpp index 2031d7e220..169dec0bc5 100644 --- a/Source/Core/VideoBackends/OGL/TextureCache.cpp +++ b/Source/Core/VideoBackends/OGL/TextureCache.cpp @@ -370,9 +370,9 @@ TextureCache::TextureCache() { CompileShaders(); - s_ActiveTexture = -1; + s_ActiveTexture = UINT32_MAX; for (auto& gtex : s_Textures) - gtex = -1; + gtex = UINT32_MAX; if (g_ActiveConfig.backend_info.bSupportsPaletteConversion) { @@ -519,8 +519,8 @@ bool TextureCache::CompileShaders() s_ColorMatrixUniform = glGetUniformLocation(s_ColorMatrixProgram.glprogid, "colmat"); s_DepthMatrixUniform = glGetUniformLocation(s_DepthMatrixProgram.glprogid, "colmat"); - s_ColorCbufid = -1; - s_DepthCbufid = -1; + s_ColorCbufid = UINT32_MAX; + s_DepthCbufid = UINT32_MAX; s_ColorCopyPositionUniform = glGetUniformLocation(s_ColorCopyProgram.glprogid, "copy_position"); s_ColorMatrixPositionUniform = diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp index 94087bdc1f..81bd7671cd 100644 --- a/Source/Core/VideoBackends/Vulkan/Renderer.cpp +++ b/Source/Core/VideoBackends/Vulkan/Renderer.cpp @@ -1106,7 +1106,7 @@ void Renderer::CheckForSurfaceChange() void Renderer::CheckForConfigChanges() { // 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_stereo_mode = g_ActiveConfig.iStereoMode; int old_aspect_ratio = g_ActiveConfig.iAspectRatio; |
