Merge pull request #2218 from Subv/stencil_lines
Rasterizer/Memfill: Set the correct stencil write mask when clearing the stencil buffer.
This commit is contained in:
		
						commit
						77b7cec8af
					
				@ -893,7 +893,7 @@ bool RasterizerOpenGL::AccelerateFill(const GPU::Regs::MemoryFillConfig& config)
 | 
				
			|||||||
            value_float = config.value_32bit / 16777215.0f; // 2^24 - 1
 | 
					            value_float = config.value_32bit / 16777215.0f; // 2^24 - 1
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        cur_state.depth.write_mask = true;
 | 
					        cur_state.depth.write_mask = GL_TRUE;
 | 
				
			||||||
        cur_state.Apply();
 | 
					        cur_state.Apply();
 | 
				
			||||||
        glClearBufferfv(GL_DEPTH, 0, &value_float);
 | 
					        glClearBufferfv(GL_DEPTH, 0, &value_float);
 | 
				
			||||||
    } else if (dst_type == SurfaceType::DepthStencil) {
 | 
					    } else if (dst_type == SurfaceType::DepthStencil) {
 | 
				
			||||||
@ -908,8 +908,8 @@ bool RasterizerOpenGL::AccelerateFill(const GPU::Regs::MemoryFillConfig& config)
 | 
				
			|||||||
        GLfloat value_float = (config.value_32bit & 0xFFFFFF) / 16777215.0f; // 2^24 - 1
 | 
					        GLfloat value_float = (config.value_32bit & 0xFFFFFF) / 16777215.0f; // 2^24 - 1
 | 
				
			||||||
        GLint value_int = (config.value_32bit >> 24);
 | 
					        GLint value_int = (config.value_32bit >> 24);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        cur_state.depth.write_mask = true;
 | 
					        cur_state.depth.write_mask = GL_TRUE;
 | 
				
			||||||
        cur_state.stencil.write_mask = true;
 | 
					        cur_state.stencil.write_mask = 0xFF;
 | 
				
			||||||
        cur_state.Apply();
 | 
					        cur_state.Apply();
 | 
				
			||||||
        glClearBufferfi(GL_DEPTH_STENCIL, 0, value_float, value_int);
 | 
					        glClearBufferfi(GL_DEPTH_STENCIL, 0, value_float, value_int);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -27,8 +27,8 @@ OpenGLState::OpenGLState() {
 | 
				
			|||||||
    stencil.test_enabled = false;
 | 
					    stencil.test_enabled = false;
 | 
				
			||||||
    stencil.test_func = GL_ALWAYS;
 | 
					    stencil.test_func = GL_ALWAYS;
 | 
				
			||||||
    stencil.test_ref = 0;
 | 
					    stencil.test_ref = 0;
 | 
				
			||||||
    stencil.test_mask = -1;
 | 
					    stencil.test_mask = 0xFF;
 | 
				
			||||||
    stencil.write_mask = -1;
 | 
					    stencil.write_mask = 0xFF;
 | 
				
			||||||
    stencil.action_depth_fail = GL_KEEP;
 | 
					    stencil.action_depth_fail = GL_KEEP;
 | 
				
			||||||
    stencil.action_depth_pass = GL_KEEP;
 | 
					    stencil.action_depth_pass = GL_KEEP;
 | 
				
			||||||
    stencil.action_stencil_fail = GL_KEEP;
 | 
					    stencil.action_stencil_fail = GL_KEEP;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user