mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 12:32:52 +00:00
GPU: Allow using the old NV04 values for the depth test function.
These seem to be just a valid as the GL token values. Thanks @ReinUsesLisp This restores graphical output to Disgaea 5
This commit is contained in:
parent
637f9d780a
commit
9f6a5660e8
|
@ -281,14 +281,26 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class ComparisonOp : u32 {
|
enum class ComparisonOp : u32 {
|
||||||
Never = 0,
|
// These values are used by Nouveau and most games, they correspond to the OpenGL token
|
||||||
Less = 1,
|
// values for these operations.
|
||||||
Equal = 2,
|
Never = 0x200,
|
||||||
LessEqual = 3,
|
Less = 0x201,
|
||||||
Greater = 4,
|
Equal = 0x202,
|
||||||
NotEqual = 5,
|
LessEqual = 0x203,
|
||||||
GreaterEqual = 6,
|
Greater = 0x204,
|
||||||
Always = 7,
|
NotEqual = 0x205,
|
||||||
|
GreaterEqual = 0x206,
|
||||||
|
Always = 0x207,
|
||||||
|
|
||||||
|
// These values are used by some games, they seem to be NV04 values.
|
||||||
|
NeverOld = 1,
|
||||||
|
LessOld = 2,
|
||||||
|
EqualOld = 3,
|
||||||
|
LessEqualOld = 4,
|
||||||
|
GreaterOld = 5,
|
||||||
|
NotEqualOld = 6,
|
||||||
|
GreaterEqualOld = 7,
|
||||||
|
AlwaysOld = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Cull {
|
struct Cull {
|
||||||
|
@ -482,7 +494,7 @@ public:
|
||||||
|
|
||||||
u32 d3d_cull_mode;
|
u32 d3d_cull_mode;
|
||||||
|
|
||||||
BitField<0, 3, ComparisonOp> depth_test_func;
|
ComparisonOp depth_test_func;
|
||||||
|
|
||||||
INSERT_PADDING_WORDS(0xB);
|
INSERT_PADDING_WORDS(0xB);
|
||||||
|
|
||||||
|
|
|
@ -211,20 +211,28 @@ inline GLenum SwizzleSource(Tegra::Texture::SwizzleSource source) {
|
||||||
inline GLenum ComparisonOp(Maxwell::ComparisonOp comparison) {
|
inline GLenum ComparisonOp(Maxwell::ComparisonOp comparison) {
|
||||||
switch (comparison) {
|
switch (comparison) {
|
||||||
case Maxwell::ComparisonOp::Never:
|
case Maxwell::ComparisonOp::Never:
|
||||||
|
case Maxwell::ComparisonOp::NeverOld:
|
||||||
return GL_NEVER;
|
return GL_NEVER;
|
||||||
case Maxwell::ComparisonOp::Less:
|
case Maxwell::ComparisonOp::Less:
|
||||||
|
case Maxwell::ComparisonOp::LessOld:
|
||||||
return GL_LESS;
|
return GL_LESS;
|
||||||
case Maxwell::ComparisonOp::Equal:
|
case Maxwell::ComparisonOp::Equal:
|
||||||
|
case Maxwell::ComparisonOp::EqualOld:
|
||||||
return GL_EQUAL;
|
return GL_EQUAL;
|
||||||
case Maxwell::ComparisonOp::LessEqual:
|
case Maxwell::ComparisonOp::LessEqual:
|
||||||
|
case Maxwell::ComparisonOp::LessEqualOld:
|
||||||
return GL_LEQUAL;
|
return GL_LEQUAL;
|
||||||
case Maxwell::ComparisonOp::Greater:
|
case Maxwell::ComparisonOp::Greater:
|
||||||
|
case Maxwell::ComparisonOp::GreaterOld:
|
||||||
return GL_GREATER;
|
return GL_GREATER;
|
||||||
case Maxwell::ComparisonOp::NotEqual:
|
case Maxwell::ComparisonOp::NotEqual:
|
||||||
|
case Maxwell::ComparisonOp::NotEqualOld:
|
||||||
return GL_NOTEQUAL;
|
return GL_NOTEQUAL;
|
||||||
case Maxwell::ComparisonOp::GreaterEqual:
|
case Maxwell::ComparisonOp::GreaterEqual:
|
||||||
|
case Maxwell::ComparisonOp::GreaterEqualOld:
|
||||||
return GL_GEQUAL;
|
return GL_GEQUAL;
|
||||||
case Maxwell::ComparisonOp::Always:
|
case Maxwell::ComparisonOp::Always:
|
||||||
|
case Maxwell::ComparisonOp::AlwaysOld:
|
||||||
return GL_ALWAYS;
|
return GL_ALWAYS;
|
||||||
}
|
}
|
||||||
LOG_CRITICAL(Render_OpenGL, "Unimplemented comparison op={}", static_cast<u32>(comparison));
|
LOG_CRITICAL(Render_OpenGL, "Unimplemented comparison op={}", static_cast<u32>(comparison));
|
||||||
|
|
Loading…
Reference in a new issue