summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorarades79 <scravers@protonmail.com>2023-02-14 17:13:47 +0100
committerarades79 <scravers@protonmail.com>2023-02-14 18:35:39 +0100
commit683019878fc939b418a65e1c5d84b066596d7655 (patch)
tree6b2a2e8ea34cb00a3fccf3613a52475550997035 /src/video_core/engines
parentapply clang-format (diff)
downloadyuzu-683019878fc939b418a65e1c5d84b066596d7655.tar
yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.gz
yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.bz2
yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.lz
yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.xz
yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.zst
yuzu-683019878fc939b418a65e1c5d84b066596d7655.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 40176821b..a126c359c 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 static s64 null_derivate = 1ULL << 32;
+ constexpr 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 3c1af92c4..7195f2bc1 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 static std::array<size_t, 4> max_sizes = {
+ static constexpr 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 11674c748..2419b5632 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 static size_t fp32_mantissa_bits = 23;
- constexpr static size_t fp16_mantissa_bits = 10;
- constexpr static size_t mantissa_mask =
+ constexpr size_t fp32_mantissa_bits = 23;
+ constexpr size_t fp16_mantissa_bits = 10;
+ constexpr 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 static size_t fp32_mantissa_bits = 23;
+ constexpr 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 static size_t fp32_mantissa_bits = 23;
+ constexpr 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;