Remove SyncAlphaTest and clang format

This commit is contained in:
FernandoS27 2018-10-10 09:45:22 -04:00
parent 7b39107e3a
commit bcb5b924fd
4 changed files with 9 additions and 8 deletions

View file

@ -572,8 +572,8 @@ void RasterizerOpenGL::DrawArrays() {
SyncBlendState(); SyncBlendState();
SyncLogicOpState(); SyncLogicOpState();
SyncCullMode(); SyncCullMode();
SyncAlphaTest();
SyncScissorTest(); SyncScissorTest();
// Alpha Testing is synced on shaders.
SyncTransformFeedback(); SyncTransformFeedback();
SyncPointState(); SyncPointState();
@ -1026,6 +1026,7 @@ void RasterizerOpenGL::SyncLogicOpState() {
state.logic_op.operation = MaxwellToGL::LogicOp(regs.logic_op.operation); state.logic_op.operation = MaxwellToGL::LogicOp(regs.logic_op.operation);
} }
<<<<<<< HEAD
void RasterizerOpenGL::SyncAlphaTest() { void RasterizerOpenGL::SyncAlphaTest() {
const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;
@ -1053,6 +1054,8 @@ void RasterizerOpenGL::SyncScissorTest() {
} }
} }
=======
>>>>>>> Remove SyncAlphaTest and clang format
void RasterizerOpenGL::SyncTransformFeedback() { void RasterizerOpenGL::SyncTransformFeedback() {
const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;

View file

@ -132,6 +132,7 @@ private:
u32 SetupTextures(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, Shader& shader, u32 SetupTextures(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, Shader& shader,
GLenum primitive_mode, u32 current_unit); GLenum primitive_mode, u32 current_unit);
/// Syncs the alpha test state to match the guest state
void SetupAlphaTesting(Shader& shader); void SetupAlphaTesting(Shader& shader);
/// Syncs the viewport to match the guest state /// Syncs the viewport to match the guest state
@ -164,9 +165,6 @@ private:
/// Syncs the LogicOp state to match the guest state /// Syncs the LogicOp state to match the guest state
void SyncLogicOpState(); void SyncLogicOpState();
/// Syncs the alpha test state to match the guest state
void SyncAlphaTest();
/// Syncs the scissor test state to match the guest state /// Syncs the scissor test state to match the guest state
void SyncScissorTest(); void SyncScissorTest();

View file

@ -73,7 +73,6 @@ public:
/// Gets the GL uniform location for the specified resource, caching as needed /// Gets the GL uniform location for the specified resource, caching as needed
GLint GetUniformLocation(const GLShader::SamplerEntry& sampler); GLint GetUniformLocation(const GLShader::SamplerEntry& sampler);
GLint GetAlphaTestingEnableLocation(); GLint GetAlphaTestingEnableLocation();
GLint GetAlphaTestingFuncLocation(); GLint GetAlphaTestingFuncLocation();
GLint GetAlphaTestingRefLocation(); GLint GetAlphaTestingRefLocation();

View file

@ -1280,7 +1280,8 @@ private:
header.ps.IsColorComponentOutputEnabled(render_target, 1) || header.ps.IsColorComponentOutputEnabled(render_target, 1) ||
header.ps.IsColorComponentOutputEnabled(render_target, 2) || header.ps.IsColorComponentOutputEnabled(render_target, 2) ||
header.ps.IsColorComponentOutputEnabled(render_target, 3)) { header.ps.IsColorComponentOutputEnabled(render_target, 3)) {
shader.AddLine(fmt::format("if (AlphaFunc({}, alpha_testing_ref, alpha_testing_func)) discard;", shader.AddLine(fmt::format(
"if (AlphaFunc({}, alpha_testing_ref, alpha_testing_func)) discard;",
regs.GetRegisterAsFloat(current_reg))); regs.GetRegisterAsFloat(current_reg)));
current_reg += 4; current_reg += 4;
} }