mirror of
				https://github.com/encounter/dawn-cmake.git
				synced 2025-10-24 18:50:29 +00:00 
			
		
		
		
	These have been warnings for multiple months. Time to properly turn this on. Bug: tint:880 Change-Id: I3b38f672309b5acd48c12a38dc5a1675f3c62470 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103480 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
		
			
				
	
	
		
			31 lines
		
	
	
		
			830 B
		
	
	
	
		
			WebGPU Shading Language
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			830 B
		
	
	
	
		
			WebGPU Shading Language
		
	
	
	
	
	
| // 1112.wgsl
 | |
| @group(0) @binding(0) var Sampler: sampler;
 | |
| @group(0) @binding(1) var randomTexture: texture_2d<f32>;
 | |
| @group(0) @binding(2) var depthTexture: texture_2d<f32>;
 | |
| 
 | |
| @fragment
 | |
| fn main(@location(0) vUV : vec2<f32>) -> @location(0) vec4<f32> {
 | |
|     let random: vec3<f32> = textureSample(randomTexture, Sampler, vUV).rgb;
 | |
| 
 | |
|     var i = 0;
 | |
|     loop {
 | |
|         if (i < 1) {
 | |
|         } else {
 | |
|            break;
 | |
|         }
 | |
|         let offset : vec3<f32> = vec3<f32>(random.x);
 | |
| 
 | |
|         if (offset.x < 0.0 || offset.y < 0.0 || offset.x > 1.0 || offset.y > 1.0) {
 | |
|             i = i + 1;
 | |
|             continue;
 | |
|         }
 | |
| 
 | |
|         // Violates uniformity analysis:
 | |
|         // let sampleDepth : f32 = textureSample(depthTexture, Sampler, offset.xy).r;
 | |
|         let sampleDepth : f32 = 0;
 | |
|         i = i + 1;
 | |
|     }
 | |
| 
 | |
|     return vec4<f32>(1.0);
 | |
| }
 |