Skip to content

Commit

Permalink
Merge pull request #10082 from lioncash/texenum
Browse files Browse the repository at this point in the history
BPMemory: Make ZTexOp enum an enum class
  • Loading branch information
JosJuice committed Sep 2, 2021
2 parents 907091a + f36fd5f commit 156ccdb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/BPMemory.h
Expand Up @@ -241,7 +241,7 @@ struct fmt::formatter<ZTexFormat> : EnumFormatter<ZTexFormat::U24>
};

// Z texture operator
enum ZTexOp : u32
enum class ZTexOp : u32
{
Disabled = 0,
Add = 1,
Expand Down
5 changes: 3 additions & 2 deletions Source/Core/VideoCommon/ConstantManager.h
Expand Up @@ -12,8 +12,9 @@ using float4 = std::array<float, 4>;
using uint4 = std::array<u32, 4>;
using int4 = std::array<s32, 4>;

enum class SrcBlendFactor : u32;
enum class DstBlendFactor : u32;
enum class SrcBlendFactor : u32;
enum class ZTexOp : u32;

struct PixelShaderConstants
{
Expand All @@ -37,7 +38,7 @@ struct PixelShaderConstants
u32 fogParam3; // .x
u32 fogRangeBase; // .y
u32 dstalpha; // .z
u32 ztex_op; // .w
ZTexOp ztex_op; // .w
u32 late_ztest; // .x (bool)
u32 rgba6_format; // .y (bool)
u32 dither; // .z (bool)
Expand Down
13 changes: 7 additions & 6 deletions Source/Core/VideoCommon/PixelShaderGen.h
Expand Up @@ -8,15 +8,16 @@
#include "VideoCommon/ShaderGenCommon.h"

enum class APIType;
enum class AlphaTestOp : u32;
enum class AlphaTestResult;
enum class SrcBlendFactor : u32;
enum class DstBlendFactor : u32;
enum class CompareMode : u32;
enum class AlphaTestOp : u32;
enum class RasColorChan : u32;
enum class KonstSel : u32;
enum class DstBlendFactor : u32;
enum class FogProjection : u32;
enum class FogType : u32;
enum class KonstSel : u32;
enum class RasColorChan : u32;
enum class SrcBlendFactor : u32;
enum class ZTexOp : u32;

#pragma pack(1)
struct pixel_shader_uid_data
Expand All @@ -40,7 +41,7 @@ struct pixel_shader_uid_data

FogType fog_fsel : 3;
u32 fog_RangeBaseEnabled : 1;
u32 ztex_op : 2;
ZTexOp ztex_op : 2;
u32 per_pixel_depth : 1;
u32 forced_early_z : 1;
u32 early_ztest : 1;
Expand Down

0 comments on commit 156ccdb

Please sign in to comment.