video_core: Implement point_size and add point state sync

This commit is contained in:
ReinUsesLisp 2018-09-28 01:31:01 -03:00
parent f7da74d18e
commit e3e51d3ddb
5 changed files with 27 additions and 1 deletions

View file

@ -452,6 +452,7 @@ void RasterizerOpenGL::DrawArrays() {
SyncCullMode();
SyncAlphaTest();
SyncTransformFeedback();
SyncPointState();
// TODO(bunnei): Sync framebuffer_scale uniform here
// TODO(bunnei): Sync scissorbox uniform(s) here
@ -905,4 +906,10 @@ void RasterizerOpenGL::SyncTransformFeedback() {
}
}
void RasterizerOpenGL::SyncPointState() {
const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;
state.point.size = regs.point_size;
}
} // namespace OpenGL

View file

@ -164,6 +164,9 @@ private:
/// Syncs the transform feedback state to match the guest state
void SyncTransformFeedback();
/// Syncs the point state to match the guest state
void SyncPointState();
bool has_ARB_direct_state_access = false;
bool has_ARB_multi_bind = false;
bool has_ARB_separate_shader_objects = false;

View file

@ -79,6 +79,8 @@ OpenGLState::OpenGLState() {
viewport.height = 0;
clip_distance = {};
point.size = 1;
}
void OpenGLState::Apply() const {
@ -283,6 +285,11 @@ void OpenGLState::Apply() const {
}
}
// Point
if (point.size != cur_state.point.size) {
glPointSize(point.size);
}
cur_state = *this;
}

View file

@ -141,6 +141,10 @@ public:
GLsizei height;
} viewport;
struct {
float size; // GL_POINT_SIZE
} point;
std::array<bool, 2> clip_distance; // GL_CLIP_DISTANCE
OpenGLState();