mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-23 07:00:40 +02:00
Merge pull request #1775 from bunnei/blend-eq
maxwell_3d: Implement alternate blend equations.
This commit is contained in:
commit
50d2abaaa9
@ -389,6 +389,13 @@ public:
|
|||||||
ReverseSubtract = 3,
|
ReverseSubtract = 3,
|
||||||
Min = 4,
|
Min = 4,
|
||||||
Max = 5,
|
Max = 5,
|
||||||
|
|
||||||
|
// These values are used by Nouveau and some games.
|
||||||
|
AddGL = 0x8006,
|
||||||
|
SubtractGL = 0x8007,
|
||||||
|
ReverseSubtractGL = 0x8008,
|
||||||
|
MinGL = 0x800a,
|
||||||
|
MaxGL = 0x800b
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class Factor : u32 {
|
enum class Factor : u32 {
|
||||||
|
@ -218,14 +218,19 @@ inline GLenum DepthCompareFunc(Tegra::Texture::DepthCompareFunc func) {
|
|||||||
inline GLenum BlendEquation(Maxwell::Blend::Equation equation) {
|
inline GLenum BlendEquation(Maxwell::Blend::Equation equation) {
|
||||||
switch (equation) {
|
switch (equation) {
|
||||||
case Maxwell::Blend::Equation::Add:
|
case Maxwell::Blend::Equation::Add:
|
||||||
|
case Maxwell::Blend::Equation::AddGL:
|
||||||
return GL_FUNC_ADD;
|
return GL_FUNC_ADD;
|
||||||
case Maxwell::Blend::Equation::Subtract:
|
case Maxwell::Blend::Equation::Subtract:
|
||||||
|
case Maxwell::Blend::Equation::SubtractGL:
|
||||||
return GL_FUNC_SUBTRACT;
|
return GL_FUNC_SUBTRACT;
|
||||||
case Maxwell::Blend::Equation::ReverseSubtract:
|
case Maxwell::Blend::Equation::ReverseSubtract:
|
||||||
|
case Maxwell::Blend::Equation::ReverseSubtractGL:
|
||||||
return GL_FUNC_REVERSE_SUBTRACT;
|
return GL_FUNC_REVERSE_SUBTRACT;
|
||||||
case Maxwell::Blend::Equation::Min:
|
case Maxwell::Blend::Equation::Min:
|
||||||
|
case Maxwell::Blend::Equation::MinGL:
|
||||||
return GL_MIN;
|
return GL_MIN;
|
||||||
case Maxwell::Blend::Equation::Max:
|
case Maxwell::Blend::Equation::Max:
|
||||||
|
case Maxwell::Blend::Equation::MaxGL:
|
||||||
return GL_MAX;
|
return GL_MAX;
|
||||||
}
|
}
|
||||||
LOG_ERROR(Render_OpenGL, "Unimplemented blend equation={}", static_cast<u32>(equation));
|
LOG_ERROR(Render_OpenGL, "Unimplemented blend equation={}", static_cast<u32>(equation));
|
||||||
|
Loading…
Reference in New Issue
Block a user