From 5f07f77c946c640640a8199286171ae64d6162e1 Mon Sep 17 00:00:00 2001 From: Wunkolo <Wunkolo@gmail.com> Date: Sat, 17 Jun 2023 23:27:19 -0700 Subject: [PATCH] Move `hasStencil` to `regs.hpp` --- include/PICA/regs.hpp | 2 ++ include/renderer_gl/surfaces.hpp | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/PICA/regs.hpp b/include/PICA/regs.hpp index c5da123a..657fb6f3 100644 --- a/include/PICA/regs.hpp +++ b/include/PICA/regs.hpp @@ -150,6 +150,8 @@ namespace PICA { Depth24Stencil8 = 3, }; + inline constexpr bool hasStencil(DepthFmt format) { return format == PICA::DepthFmt::Depth24Stencil8; } + // Size occupied by each pixel in bytes // All formats are 16BPP except for RGBA8 (32BPP) and BGR8 (24BPP) diff --git a/include/renderer_gl/surfaces.hpp b/include/renderer_gl/surfaces.hpp index f6d5230d..7ff36c6d 100644 --- a/include/renderer_gl/surfaces.hpp +++ b/include/renderer_gl/surfaces.hpp @@ -95,10 +95,6 @@ struct DepthBuffer { range = Interval<u32>(loc, (u32)endLoc); } - bool hasStencil() { - return format == PICA::DepthFmt::Depth24Stencil8; - } - void allocate() { // Create texture for the FBO, setting up filters and the like // Reading back the current texture is slow, but allocate calls should be few and far between.