mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	vulkan: compute return from process on invalid buffer id
Combined with the blit filter the process function of the source is often called without a valid buffer, which results in a crash. This hack mitigates this.
This commit is contained in:
		
							parent
							
								
									560b26a5b5
								
							
						
					
					
						commit
						f7b036764a
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -149,6 +149,11 @@ static int updateDescriptors(struct vulkan_compute_state *s)
 | 
			
		|||
		};
 | 
			
		||||
		descriptorSetLen++;
 | 
			
		||||
	}
 | 
			
		||||
	// Abort process if any buffer is not valid
 | 
			
		||||
	if (s->streams[0].current_buffer_id == SPA_ID_INVALID
 | 
			
		||||
			|| (s->n_streams == 2 && s->streams[1].current_buffer_id == SPA_ID_INVALID))
 | 
			
		||||
		return -1;
 | 
			
		||||
 | 
			
		||||
	vkUpdateDescriptorSets(s->base.device, descriptorSetLen,
 | 
			
		||||
				writeDescriptorSet, 0, NULL);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue