mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 21:51:22 +00:00 
			
		
		
		
	Add a check for device in shader lang to prevent startup editor crash
This commit is contained in:
		
							parent
							
								
									5cb6f39014
								
							
						
					
					
						commit
						0e2ef987b1
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -7595,7 +7595,10 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct | |||
| 	int instance_index = 0; | ||||
| #ifdef DEBUG_ENABLED | ||||
| 	int uniform_buffer_size = 0; | ||||
| 	int max_uniform_buffer_size = RenderingDevice::get_singleton()->limit_get(RenderingDevice::LIMIT_MAX_UNIFORM_BUFFER_SIZE); | ||||
| 	int max_uniform_buffer_size = 0; | ||||
| 	if (RenderingDevice::get_singleton()) { | ||||
| 		max_uniform_buffer_size = RenderingDevice::get_singleton()->limit_get(RenderingDevice::LIMIT_MAX_UNIFORM_BUFFER_SIZE); | ||||
| 	} | ||||
| #endif // DEBUG_ENABLED
 | ||||
| 	ShaderNode::Uniform::Scope uniform_scope = ShaderNode::Uniform::SCOPE_LOCAL; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yuri Roubinsky
						Yuri Roubinsky