summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorarades79 <scravers@protonmail.com>2023-02-11 19:28:03 +0100
committerarades79 <scravers@protonmail.com>2023-02-14 18:33:11 +0100
commit45e13b03f372230dbf780f3fa87dd88f388af605 (patch)
tree555593e7e5016b6ba2a777d7417ada244abce458 /src/video_core/engines
parentMerge pull request #9795 from Kelebek1/biquad_fix (diff)
downloadyuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.gz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.bz2
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.lz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.xz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.zst
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.zip
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/fermi_2d.cpp2
-rw-r--r--src/video_core/engines/maxwell_3d.cpp2
-rw-r--r--src/video_core/engines/sw_blitter/converter.cpp10
3 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp
index a126c359c..40176821b 100644
--- a/src/video_core/engines/fermi_2d.cpp
+++ b/src/video_core/engines/fermi_2d.cpp
@@ -72,7 +72,7 @@ void Fermi2D::Blit() {
UNIMPLEMENTED_IF_MSG(regs.clip_enable != 0, "Clipped blit enabled");
const auto& args = regs.pixels_from_memory;
- constexpr s64 null_derivate = 1ULL << 32;
+ constexpr static s64 null_derivate = 1ULL << 32;
Surface src = regs.src;
const auto bytes_per_pixel = BytesPerBlock(PixelFormatFromRenderTargetFormat(src.format));
const bool delegate_to_gpu = src.width > 512 && src.height > 512 && bytes_per_pixel <= 8 &&
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index ae9da6290..3c1af92c4 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -258,7 +258,7 @@ u32 Maxwell3D::GetMaxCurrentVertices() {
size_t Maxwell3D::EstimateIndexBufferSize() {
GPUVAddr start_address = regs.index_buffer.StartAddress();
GPUVAddr end_address = regs.index_buffer.EndAddress();
- constexpr std::array<size_t, 4> max_sizes = {
+ constexpr static std::array<size_t, 4> max_sizes = {
std::numeric_limits<u8>::max(), std::numeric_limits<u16>::max(),
std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max()};
const size_t byte_size = regs.index_buffer.FormatSizeInBytes();
diff --git a/src/video_core/engines/sw_blitter/converter.cpp b/src/video_core/engines/sw_blitter/converter.cpp
index 2419b5632..11674c748 100644
--- a/src/video_core/engines/sw_blitter/converter.cpp
+++ b/src/video_core/engines/sw_blitter/converter.cpp
@@ -694,16 +694,16 @@ private:
};
const auto force_to_fp16 = [](f32 base_value) {
u32 tmp = Common::BitCast<u32>(base_value);
- constexpr size_t fp32_mantissa_bits = 23;
- constexpr size_t fp16_mantissa_bits = 10;
- constexpr size_t mantissa_mask =
+ constexpr static size_t fp32_mantissa_bits = 23;
+ constexpr static size_t fp16_mantissa_bits = 10;
+ constexpr static size_t mantissa_mask =
~((1ULL << (fp32_mantissa_bits - fp16_mantissa_bits)) - 1ULL);
tmp = tmp & static_cast<u32>(mantissa_mask);
// TODO: force the exponent within the range of half float. Not needed in UNORM / SNORM
return Common::BitCast<f32>(tmp);
};
const auto from_fp_n = [&sign_extend](u32 base_value, size_t bits, size_t mantissa) {
- constexpr size_t fp32_mantissa_bits = 23;
+ constexpr static size_t fp32_mantissa_bits = 23;
size_t shift_towards = fp32_mantissa_bits - mantissa;
const u32 new_value =
static_cast<u32>(sign_extend(base_value, bits) << shift_towards) & (~(1U << 31));
@@ -770,7 +770,7 @@ private:
component_mask[which_component];
};
const auto to_fp_n = [](f32 base_value, size_t bits, size_t mantissa) {
- constexpr size_t fp32_mantissa_bits = 23;
+ constexpr static size_t fp32_mantissa_bits = 23;
u32 tmp_value = Common::BitCast<u32>(std::max(base_value, 0.0f));
size_t shift_towards = fp32_mantissa_bits - mantissa;
return tmp_value >> shift_towards;