mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 22:54:00 +00:00
gl_state: Remove point size tracking
This commit is contained in:
parent
b95f064b51
commit
d2d5554296
3 changed files with 4 additions and 22 deletions
|
@ -428,9 +428,7 @@ void RasterizerOpenGL::Clear() {
|
|||
bool use_stencil{};
|
||||
|
||||
OpenGLState prev_state{OpenGLState::GetCurState()};
|
||||
SCOPE_EXIT({
|
||||
prev_state.Apply();
|
||||
});
|
||||
SCOPE_EXIT({ prev_state.Apply(); });
|
||||
|
||||
OpenGLState clear_state{OpenGLState::GetCurState()};
|
||||
clear_state.SetDefaultViewports();
|
||||
|
@ -1205,9 +1203,9 @@ void RasterizerOpenGL::SyncPointState() {
|
|||
const auto& regs = system.GPU().Maxwell3D().regs;
|
||||
// Limit the point size to 1 since nouveau sometimes sets a point size of 0 (and that's invalid
|
||||
// in OpenGL).
|
||||
state.point.program_control = regs.vp_point_size.enable != 0;
|
||||
state.point.sprite = regs.point_sprite_enable != 0;
|
||||
state.point.size = std::max(1.0f, regs.point_size);
|
||||
oglEnable(GL_PROGRAM_POINT_SIZE, regs.vp_point_size.enable);
|
||||
oglEnable(GL_POINT_SPRITE, regs.point_sprite_enable);
|
||||
glPointSize(std::max(1.0f, regs.point_size));
|
||||
}
|
||||
|
||||
void RasterizerOpenGL::SyncPolygonOffset() {
|
||||
|
|
|
@ -126,14 +126,6 @@ void OpenGLState::ApplyClipDistances() {
|
|||
}
|
||||
}
|
||||
|
||||
void OpenGLState::ApplyPointSize() {
|
||||
Enable(GL_PROGRAM_POINT_SIZE, cur_state.point.program_control, point.program_control);
|
||||
Enable(GL_POINT_SPRITE, cur_state.point.sprite, point.sprite);
|
||||
if (UpdateValue(cur_state.point.size, point.size)) {
|
||||
glPointSize(point.size);
|
||||
}
|
||||
}
|
||||
|
||||
void OpenGLState::ApplyFragmentColorClamp() {
|
||||
if (UpdateValue(cur_state.fragment_color_clamp.enabled, fragment_color_clamp.enabled)) {
|
||||
glClampColor(GL_CLAMP_FRAGMENT_COLOR_ARB,
|
||||
|
@ -445,7 +437,6 @@ void OpenGLState::Apply() {
|
|||
ApplyShaderProgram();
|
||||
ApplyProgramPipeline();
|
||||
ApplyClipDistances();
|
||||
ApplyPointSize();
|
||||
ApplyFragmentColorClamp();
|
||||
ApplyMultisample();
|
||||
ApplyRasterizerDiscard();
|
||||
|
|
|
@ -130,12 +130,6 @@ public:
|
|||
};
|
||||
std::array<Viewport, Tegra::Engines::Maxwell3D::Regs::NumViewports> viewports;
|
||||
|
||||
struct {
|
||||
bool program_control = false; // GL_PROGRAM_POINT_SIZE
|
||||
bool sprite = false; // GL_POINT_SPRITE
|
||||
GLfloat size = 1.0f; // GL_POINT_SIZE
|
||||
} point;
|
||||
|
||||
struct {
|
||||
bool point_enable = false;
|
||||
bool line_enable = false;
|
||||
|
@ -176,7 +170,6 @@ public:
|
|||
void ApplyShaderProgram();
|
||||
void ApplyProgramPipeline();
|
||||
void ApplyClipDistances();
|
||||
void ApplyPointSize();
|
||||
void ApplyFragmentColorClamp();
|
||||
void ApplyMultisample();
|
||||
void ApplySRgb();
|
||||
|
|
Loading…
Reference in a new issue