 75fd223f03
			
		
	
	
		75fd223f03
		
	
	
	
	
		
			
			HLSL has keywords for various interpolation modifiers such as "linear", "centroid", "sample", etc. Of these, "sample" appears to be special, as it is also accepted as an identifier string, where the others are not. This PR adds this ability, so the construct "int sample = 42;" no longer produces a compilation error. New test = hlsl.identifier.sample.frag
		
			
				
	
	
		
			19 lines
		
	
	
		
			419 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			419 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| 
 | |
| struct MyStruct {
 | |
|     sample        float a;
 | |
|     noperspective float b;
 | |
|     linear        float c;
 | |
|     centroid      float d;
 | |
| };
 | |
| 
 | |
| int sample(int x) { return x; } // HLSL allows this as an identifier as well.
 | |
| 
 | |
| float4 main() : SV_Target0
 | |
| {
 | |
|     // HLSL allows this as an identifier as well.
 | |
|     // However, this is not true of other qualifier keywords such as "linear".
 | |
|     int sample = 3;
 | |
| 
 | |
|     return float4(0,0,0,0);
 | |
| }
 |