From bd6306cdaa4a49344658bd026721b6532e103d09 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 24 Feb 2023 10:01:47 -0800 Subject: More control flow simplifications. (#2673) * More control flow and Phi param simplifications. * Fix. * Fix gcc error. * Fix. * More IR cleanup. * Fix bug in phi param dce + ifelse simplify. * Propagate and DCE side-effect-free functions. * Enhance CFG simplifcation to remove loops with no side effects. * Fix. * Fixes. * Fix tests. Add [__AlwaysFoldIntoUseSite] for rayPayloadLocation. * More cleanup. * Fixes. * Fix. --------- Co-authored-by: Yong He --- .../rasterization/fragment-shader-interlock.slang.glsl | 14 ++++---------- .../pipeline/rasterization/mesh/passing-outputs.slang.glsl | 6 ------ 2 files changed, 4 insertions(+), 16 deletions(-) (limited to 'tests/pipeline/rasterization') diff --git a/tests/pipeline/rasterization/fragment-shader-interlock.slang.glsl b/tests/pipeline/rasterization/fragment-shader-interlock.slang.glsl index 84eba46f0..7f53576e9 100644 --- a/tests/pipeline/rasterization/fragment-shader-interlock.slang.glsl +++ b/tests/pipeline/rasterization/fragment-shader-interlock.slang.glsl @@ -1,10 +1,7 @@ -//TEST_IGNORE_FILE: - #version 450 #extension GL_ARB_fragment_shader_interlock : require layout(row_major) uniform; layout(row_major) buffer; - layout(rgba32f) layout(binding = 0) uniform image2D entryPointParams_texture_0; @@ -17,15 +14,12 @@ out vec4 _S2; void main() { - beginInvocationInterlockARB(); - - vec2 _S3 = _S1.xy; - - vec4 _S4 = (imageLoad((entryPointParams_texture_0), ivec2((uvec2(_S3))))); - imageStore((entryPointParams_texture_0), ivec2((uvec2(_S3))), _S4 + _S1); + beginInvocationInterlockARB(); + uvec2 _S3 = uvec2(_S1.xy); + vec4 _S4 = (imageLoad((entryPointParams_texture_0), ivec2((_S3)))); + imageStore((entryPointParams_texture_0), ivec2((_S3)), _S4 + _S1); endInvocationInterlockARB(); - _S2 = _S4; return; } diff --git a/tests/pipeline/rasterization/mesh/passing-outputs.slang.glsl b/tests/pipeline/rasterization/mesh/passing-outputs.slang.glsl index 31c2f0db2..1102a838e 100644 --- a/tests/pipeline/rasterization/mesh/passing-outputs.slang.glsl +++ b/tests/pipeline/rasterization/mesh/passing-outputs.slang.glsl @@ -160,16 +160,10 @@ void main() d_0(gl_LocalInvocationIndex); e_0(gl_LocalInvocationIndex); } - else - { - } if(gl_LocalInvocationIndex < 1U) { gl_PrimitiveTriangleIndicesEXT[gl_LocalInvocationIndex] = uvec3(0U, 1U, 2U); } - else - { - } return; } -- cgit v1.2.3