mirror of https://github.com/PCSX2/pcsx2.git
31 lines
809 B
C++
31 lines
809 B
C++
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
|
// SPDX-License-Identifier: LGPL-3.0+
|
|
|
|
#pragma once
|
|
|
|
#include "GS.h"
|
|
#include "GSRegs.h"
|
|
|
|
class GSUtil
|
|
{
|
|
public:
|
|
static void Init();
|
|
|
|
static GS_PRIM_CLASS GetPrimClass(u32 prim);
|
|
static int GetVertexCount(u32 prim);
|
|
static int GetClassVertexCount(u32 primclass);
|
|
|
|
static const u32* HasSharedBitsPtr(u32 dpsm);
|
|
static bool HasSharedBits(u32 spsm, const u32* ptr);
|
|
static bool HasSharedBits(u32 spsm, u32 dpsm);
|
|
static bool HasSharedBits(u32 sbp, u32 spsm, u32 dbp, u32 dpsm);
|
|
static bool HasCompatibleBits(u32 spsm, u32 dpsm);
|
|
static bool HasSameSwizzleBits(u32 spsm, u32 dpsm);
|
|
static u32 GetChannelMask(u32 spsm);
|
|
static u32 GetChannelMask(u32 spsm, u32 fbmsk);
|
|
|
|
static GSRendererType GetPreferredRenderer();
|
|
};
|
|
|
|
const char* psm_str(int psm);
|