Fix context sharing between direct/indirect contexts
This commit is contained in:
		
							parent
							
								
									d74b0327e8
								
							
						
					
					
						commit
						43e46a654f
					
				| 
						 | 
					@ -614,6 +614,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
	driShare = NULL;
 | 
						driShare = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (baseShareContext && baseShareContext->isDirect)
 | 
				
			||||||
 | 
					        return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    context = xalloc(sizeof *context);
 | 
					    context = xalloc(sizeof *context);
 | 
				
			||||||
    if (context == NULL)
 | 
					    if (context == NULL)
 | 
				
			||||||
	return NULL;
 | 
						return NULL;
 | 
				
			||||||
| 
						 | 
					@ -649,6 +652,11 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
 | 
				
			||||||
					   hwContext,
 | 
										   hwContext,
 | 
				
			||||||
					   &context->driContext);
 | 
										   &context->driContext);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (context->driContext.private == NULL) {
 | 
				
			||||||
 | 
						xfree(context);
 | 
				
			||||||
 | 
						return NULL;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return &context->base;
 | 
					    return &context->base;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue