From e1a3e41bf33bf6a366760ede17c2e3bd2b106116 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Wed, 7 Jun 2017 04:16:02 -0700 Subject: fix various instances of -1 being assigned to unsigned types --- Source/Core/VideoBackends/OGL/TextureCache.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoBackends') 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 = -- cgit v1.2.3 From ab4a785f1b9f5d52071c0ba2414f7fa3c64c72ab Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Wed, 7 Jun 2017 04:30:57 -0700 Subject: d3d: silence variable shadowing warning --- Source/Core/VideoBackends/D3D/D3DBase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoBackends') diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp index 8000f15a31..b1ba228b96 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; } -- cgit v1.2.3 From 5480efdff2f6e51245aa690a0ccb152a2b0a438e Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Wed, 7 Jun 2017 04:30:39 -0700 Subject: video: change multisample/AA setting to u32 --- Source/Core/VideoBackends/D3D/D3DBase.cpp | 2 +- Source/Core/VideoBackends/OGL/Render.cpp | 4 ++-- Source/Core/VideoBackends/Vulkan/Renderer.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoBackends') diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp index b1ba228b96..327fece109 100644 --- a/Source/Core/VideoBackends/D3D/D3DBase.cpp +++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp @@ -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 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/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; -- cgit v1.2.3