mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Merge pull request #944 from Subv/spam
GLRasterizer: Don't try to get a pointer to the depth buffer if it doesn't exist.
This commit is contained in:
		
						commit
						9a3b21bcf9
					
				
					 1 changed files with 8 additions and 4 deletions
				
			
		|  | @ -816,12 +816,16 @@ void RasterizerOpenGL::ReloadColorBuffer() { | |||
| } | ||||
| 
 | ||||
| void RasterizerOpenGL::ReloadDepthBuffer() { | ||||
|     // TODO: Appears to work, but double-check endianness of depth values and order of depth-stencil
 | ||||
|     u8* depth_buffer = Memory::GetPhysicalPointer(Pica::g_state.regs.framebuffer.GetDepthBufferPhysicalAddress()); | ||||
|     PAddr depth_buffer_addr = Pica::g_state.regs.framebuffer.GetDepthBufferPhysicalAddress(); | ||||
| 
 | ||||
|     if (depth_buffer == nullptr) { | ||||
|     if (depth_buffer_addr == 0) | ||||
|         return; | ||||
| 
 | ||||
|     // TODO: Appears to work, but double-check endianness of depth values and order of depth-stencil
 | ||||
|     u8* depth_buffer = Memory::GetPhysicalPointer(depth_buffer_addr); | ||||
| 
 | ||||
|     if (depth_buffer == nullptr) | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     u32 bytes_per_pixel = Pica::Regs::BytesPerDepthPixel(fb_depth_texture.format); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue