mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	gl_state: Implement PROGRAM_POINT_SIZE
For gl_PointSize to have effect we have to activate GL_PROGRAM_POINT_SIZE.
This commit is contained in:
		
							parent
							
								
									64cd46579b
								
							
						
					
					
						commit
						c375d735e6
					
				@ -1018,7 +1018,14 @@ public:
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
                } instanced_arrays;
 | 
					                } instanced_arrays;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                INSERT_UNION_PADDING_WORDS(0x6);
 | 
					                INSERT_UNION_PADDING_WORDS(0x4);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                union {
 | 
				
			||||||
 | 
					                    BitField<0, 1, u32> enable;
 | 
				
			||||||
 | 
					                    BitField<4, 8, u32> unk4;
 | 
				
			||||||
 | 
					                } vp_point_size;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                INSERT_UNION_PADDING_WORDS(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                Cull cull;
 | 
					                Cull cull;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1503,6 +1510,7 @@ ASSERT_REG_POSITION(primitive_restart, 0x591);
 | 
				
			|||||||
ASSERT_REG_POSITION(index_array, 0x5F2);
 | 
					ASSERT_REG_POSITION(index_array, 0x5F2);
 | 
				
			||||||
ASSERT_REG_POSITION(polygon_offset_clamp, 0x61F);
 | 
					ASSERT_REG_POSITION(polygon_offset_clamp, 0x61F);
 | 
				
			||||||
ASSERT_REG_POSITION(instanced_arrays, 0x620);
 | 
					ASSERT_REG_POSITION(instanced_arrays, 0x620);
 | 
				
			||||||
 | 
					ASSERT_REG_POSITION(vp_point_size, 0x644);
 | 
				
			||||||
ASSERT_REG_POSITION(cull, 0x646);
 | 
					ASSERT_REG_POSITION(cull, 0x646);
 | 
				
			||||||
ASSERT_REG_POSITION(pixel_center_integer, 0x649);
 | 
					ASSERT_REG_POSITION(pixel_center_integer, 0x649);
 | 
				
			||||||
ASSERT_REG_POSITION(viewport_transform_enabled, 0x64B);
 | 
					ASSERT_REG_POSITION(viewport_transform_enabled, 0x64B);
 | 
				
			||||||
 | 
				
			|||||||
@ -1272,6 +1272,7 @@ void RasterizerOpenGL::SyncPointState() {
 | 
				
			|||||||
    const auto& regs = system.GPU().Maxwell3D().regs;
 | 
					    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
 | 
					    // Limit the point size to 1 since nouveau sometimes sets a point size of 0 (and that's invalid
 | 
				
			||||||
    // in OpenGL).
 | 
					    // in OpenGL).
 | 
				
			||||||
 | 
					    state.point.program_control = regs.vp_point_size.enable ? GL_TRUE : GL_FALSE;
 | 
				
			||||||
    state.point.size = std::max(1.0f, regs.point_size);
 | 
					    state.point.size = std::max(1.0f, regs.point_size);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -127,6 +127,7 @@ void OpenGLState::ApplyClipDistances() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void OpenGLState::ApplyPointSize() {
 | 
					void OpenGLState::ApplyPointSize() {
 | 
				
			||||||
 | 
					    Enable(GL_PROGRAM_POINT_SIZE, cur_state.point.program_control, point.program_control);
 | 
				
			||||||
    if (UpdateValue(cur_state.point.size, point.size)) {
 | 
					    if (UpdateValue(cur_state.point.size, point.size)) {
 | 
				
			||||||
        glPointSize(point.size);
 | 
					        glPointSize(point.size);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -131,7 +131,8 @@ public:
 | 
				
			|||||||
    std::array<Viewport, Tegra::Engines::Maxwell3D::Regs::NumViewports> viewports;
 | 
					    std::array<Viewport, Tegra::Engines::Maxwell3D::Regs::NumViewports> viewports;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    struct {
 | 
					    struct {
 | 
				
			||||||
        float size = 1.0f; // GL_POINT_SIZE
 | 
					        GLboolean program_control = GL_FALSE; // GL_PROGRAM_POINT_SIZE
 | 
				
			||||||
 | 
					        GLfloat size = 1.0f;                  // GL_POINT_SIZE
 | 
				
			||||||
    } point;
 | 
					    } point;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    struct {
 | 
					    struct {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user