diff options
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/video_core/command_classes/codecs/codec.h | 8 | ||||
| -rw-r--r-- | src/video_core/command_classes/vic.cpp | 7 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/texture_cache/image_base.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/texture_cache/util.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/textures/astc.cpp | 4 |
7 files changed, 8 insertions, 23 deletions
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index e31eb30c0..e4de55f4d 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt | |||
| @@ -292,13 +292,12 @@ endif() | |||
| 292 | 292 | ||
| 293 | if (MSVC) | 293 | if (MSVC) |
| 294 | target_compile_options(video_core PRIVATE | 294 | target_compile_options(video_core PRIVATE |
| 295 | /we4267 # 'var' : conversion from 'size_t' to 'type', possible loss of data | 295 | /we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data |
| 296 | /we4244 # 'var' : conversion from integer to 'type', possible loss of data | 296 | /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data |
| 297 | /we4456 # Declaration of 'identifier' hides previous local declaration | 297 | /we4456 # Declaration of 'identifier' hides previous local declaration |
| 298 | /we4457 # Declaration of 'identifier' hides function parameter | 298 | /we4457 # Declaration of 'identifier' hides function parameter |
| 299 | /we4458 # Declaration of 'identifier' hides class member | 299 | /we4458 # Declaration of 'identifier' hides class member |
| 300 | /we4459 # Declaration of 'identifier' hides global declaration | 300 | /we4459 # Declaration of 'identifier' hides global declaration |
| 301 | /we4715 # 'function' : not all control paths return a value | ||
| 302 | ) | 301 | ) |
| 303 | else() | 302 | else() |
| 304 | target_compile_options(video_core PRIVATE | 303 | target_compile_options(video_core PRIVATE |
diff --git a/src/video_core/command_classes/codecs/codec.h b/src/video_core/command_classes/codecs/codec.h index f2aef1699..96c823c76 100644 --- a/src/video_core/command_classes/codecs/codec.h +++ b/src/video_core/command_classes/codecs/codec.h | |||
| @@ -14,18 +14,10 @@ extern "C" { | |||
| 14 | #pragma GCC diagnostic push | 14 | #pragma GCC diagnostic push |
| 15 | #pragma GCC diagnostic ignored "-Wconversion" | 15 | #pragma GCC diagnostic ignored "-Wconversion" |
| 16 | #endif | 16 | #endif |
| 17 | #ifdef _MSC_VER | ||
| 18 | #pragma warning(push) | ||
| 19 | #pragma warning(disable : 4242) // conversion from 'type' to 'type', possible loss of data | ||
| 20 | #pragma warning(disable : 4244) // conversion from 'type' to 'type', possible loss of data | ||
| 21 | #endif | ||
| 22 | #include <libavcodec/avcodec.h> | 17 | #include <libavcodec/avcodec.h> |
| 23 | #if defined(__GNUC__) || defined(__clang__) | 18 | #if defined(__GNUC__) || defined(__clang__) |
| 24 | #pragma GCC diagnostic pop | 19 | #pragma GCC diagnostic pop |
| 25 | #endif | 20 | #endif |
| 26 | #ifdef _MSC_VER | ||
| 27 | #pragma warning(pop) | ||
| 28 | #endif | ||
| 29 | } | 21 | } |
| 30 | 22 | ||
| 31 | namespace Tegra { | 23 | namespace Tegra { |
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp index 5faf8c0f1..ff3db0aee 100644 --- a/src/video_core/command_classes/vic.cpp +++ b/src/video_core/command_classes/vic.cpp | |||
| @@ -9,17 +9,10 @@ extern "C" { | |||
| 9 | #pragma GCC diagnostic push | 9 | #pragma GCC diagnostic push |
| 10 | #pragma GCC diagnostic ignored "-Wconversion" | 10 | #pragma GCC diagnostic ignored "-Wconversion" |
| 11 | #endif | 11 | #endif |
| 12 | #ifdef _MSC_VER | ||
| 13 | #pragma warning(disable : 4244) // conversion from 'type' to 'type', possible loss of data | ||
| 14 | #pragma warning(push) | ||
| 15 | #endif | ||
| 16 | #include <libswscale/swscale.h> | 12 | #include <libswscale/swscale.h> |
| 17 | #if defined(__GNUC__) || defined(__clang__) | 13 | #if defined(__GNUC__) || defined(__clang__) |
| 18 | #pragma GCC diagnostic pop | 14 | #pragma GCC diagnostic pop |
| 19 | #endif | 15 | #endif |
| 20 | #ifdef _MSC_VER | ||
| 21 | #pragma warning(pop) | ||
| 22 | #endif | ||
| 23 | } | 16 | } |
| 24 | 17 | ||
| 25 | #include "common/assert.h" | 18 | #include "common/assert.h" |
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index a2c1599f7..ff0f03e99 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp | |||
| @@ -327,7 +327,8 @@ void ApplySwizzle(GLuint handle, PixelFormat format, std::array<SwizzleSource, 4 | |||
| 327 | if (format_info.is_compressed) { | 327 | if (format_info.is_compressed) { |
| 328 | return false; | 328 | return false; |
| 329 | } | 329 | } |
| 330 | if (std::ranges::find(ACCELERATED_FORMATS, internal_format) == ACCELERATED_FORMATS.end()) { | 330 | if (std::ranges::find(ACCELERATED_FORMATS, static_cast<int>(internal_format)) == |
| 331 | ACCELERATED_FORMATS.end()) { | ||
| 331 | return false; | 332 | return false; |
| 332 | } | 333 | } |
| 333 | if (format_info.compatibility_by_size) { | 334 | if (format_info.compatibility_by_size) { |
diff --git a/src/video_core/texture_cache/image_base.cpp b/src/video_core/texture_cache/image_base.cpp index ad69d32d1..f22358c90 100644 --- a/src/video_core/texture_cache/image_base.cpp +++ b/src/video_core/texture_cache/image_base.cpp | |||
| @@ -82,7 +82,7 @@ std::optional<SubresourceBase> ImageBase::TryFindBase(GPUVAddr other_addr) const | |||
| 82 | if (info.type != ImageType::e3D) { | 82 | if (info.type != ImageType::e3D) { |
| 83 | const auto [layer, mip_offset] = LayerMipOffset(diff, info.layer_stride); | 83 | const auto [layer, mip_offset] = LayerMipOffset(diff, info.layer_stride); |
| 84 | const auto end = mip_level_offsets.begin() + info.resources.levels; | 84 | const auto end = mip_level_offsets.begin() + info.resources.levels; |
| 85 | const auto it = std::find(mip_level_offsets.begin(), end, mip_offset); | 85 | const auto it = std::find(mip_level_offsets.begin(), end, static_cast<u32>(mip_offset)); |
| 86 | if (layer > info.resources.layers || it == end) { | 86 | if (layer > info.resources.layers || it == end) { |
| 87 | return std::nullopt; | 87 | return std::nullopt; |
| 88 | } | 88 | } |
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index 4efe042b6..20794fa32 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp | |||
| @@ -394,7 +394,7 @@ template <u32 GOB_EXTENT> | |||
| 394 | const s32 mip_offset = diff % layer_stride; | 394 | const s32 mip_offset = diff % layer_stride; |
| 395 | const std::array offsets = CalculateMipLevelOffsets(new_info); | 395 | const std::array offsets = CalculateMipLevelOffsets(new_info); |
| 396 | const auto end = offsets.begin() + new_info.resources.levels; | 396 | const auto end = offsets.begin() + new_info.resources.levels; |
| 397 | const auto it = std::find(offsets.begin(), end, mip_offset); | 397 | const auto it = std::find(offsets.begin(), end, static_cast<u32>(mip_offset)); |
| 398 | if (it == end) { | 398 | if (it == end) { |
| 399 | // Mipmap is not aligned to any valid size | 399 | // Mipmap is not aligned to any valid size |
| 400 | return std::nullopt; | 400 | return std::nullopt; |
diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp index 7b756ba41..3ab500760 100644 --- a/src/video_core/textures/astc.cpp +++ b/src/video_core/textures/astc.cpp | |||
| @@ -1365,8 +1365,8 @@ static void DecompressBlock(std::span<const u8, 16> inBuf, const u32 blockWidth, | |||
| 1365 | // each partition. | 1365 | // each partition. |
| 1366 | 1366 | ||
| 1367 | // Determine partitions, partition index, and color endpoint modes | 1367 | // Determine partitions, partition index, and color endpoint modes |
| 1368 | s32 planeIdx = -1; | 1368 | u32 planeIdx{UINT32_MAX}; |
| 1369 | u32 partitionIndex; | 1369 | u32 partitionIndex{}; |
| 1370 | u32 colorEndpointMode[4] = {0, 0, 0, 0}; | 1370 | u32 colorEndpointMode[4] = {0, 0, 0, 0}; |
| 1371 | 1371 | ||
| 1372 | // Define color data. | 1372 | // Define color data. |