mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	swrasterizer, gl_shader_gen: return 0.0 for Disabled texture unit 0
This commit is contained in:
		
							parent
							
								
									f9a89ff410
								
							
						
					
					
						commit
						4d4b833a00
					
				
					 2 changed files with 5 additions and 2 deletions
				
			
		|  | @ -319,6 +319,8 @@ static std::string SampleTexture(const PicaFSConfig& config, unsigned texture_un | ||||||
|             return "shadowTexture(texcoord0, texcoord0_w)"; |             return "shadowTexture(texcoord0, texcoord0_w)"; | ||||||
|         case TexturingRegs::TextureConfig::ShadowCube: |         case TexturingRegs::TextureConfig::ShadowCube: | ||||||
|             return "shadowTextureCube(texcoord0, texcoord0_w)"; |             return "shadowTextureCube(texcoord0, texcoord0_w)"; | ||||||
|  |         case TexturingRegs::TextureConfig::Disabled: | ||||||
|  |             return "vec4(0.0)"; | ||||||
|         default: |         default: | ||||||
|             LOG_CRITICAL(HW_GPU, "Unhandled texture type {:x}", |             LOG_CRITICAL(HW_GPU, "Unhandled texture type {:x}", | ||||||
|                          static_cast<int>(state.texture0_type)); |                          static_cast<int>(state.texture0_type)); | ||||||
|  |  | ||||||
|  | @ -361,9 +361,10 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve | ||||||
|                         shadow_z = float24::FromFloat32(std::abs(tc0_w.ToFloat32())); |                         shadow_z = float24::FromFloat32(std::abs(tc0_w.ToFloat32())); | ||||||
|                         break; |                         break; | ||||||
|                     } |                     } | ||||||
|  |                     case TexturingRegs::TextureConfig::Disabled: | ||||||
|  |                         continue; // skip this unit and continue to the next unit
 | ||||||
|                     default: |                     default: | ||||||
|                         // TODO: Change to LOG_ERROR when more types are handled.
 |                         LOG_ERROR(HW_GPU, "Unhandled texture type {:x}", (int)texture.config.type); | ||||||
|                         LOG_DEBUG(HW_GPU, "Unhandled texture type {:x}", (int)texture.config.type); |  | ||||||
|                         UNIMPLEMENTED(); |                         UNIMPLEMENTED(); | ||||||
|                         break; |                         break; | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue