Add missing type check for operands having the same type (after conversion) around the ":" in a "?:" operation.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21721 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
		
							parent
							
								
									2d0f1e5424
								
							
						
					
					
						commit
						8d00fd0e29
					
				| @ -71,6 +71,13 @@ void main() | |||||||
|     float uvec3; |     float uvec3; | ||||||
|     float uvec4; |     float uvec4; | ||||||
|     //packed;     // ERROR, reserved word |     //packed;     // ERROR, reserved word | ||||||
|  | 
 | ||||||
|  |     { | ||||||
|  |         mat4 m; | ||||||
|  |         vec4 v; | ||||||
|  |         bool b; | ||||||
|  |         gl_FragColor += b ? v : m;  // ERROR, types don't match around ":" | ||||||
|  |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| float imageBuffer; | float imageBuffer; | ||||||
|  | |||||||
| @ -770,6 +770,10 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true | |||||||
|             return 0; |             return 0; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|  |     // After conversion, types have to match.
 | ||||||
|  |     if (falseBlock->getType() != trueBlock->getType()) | ||||||
|  |         return 0; | ||||||
|  | 
 | ||||||
|     //
 |     //
 | ||||||
|     // See if all the operands are constant, then fold it otherwise not.
 |     // See if all the operands are constant, then fold it otherwise not.
 | ||||||
|     //
 |     //
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 John Kessenich
						John Kessenich