diff options
| author | Yong He <yonghe@outlook.com> | 2023-01-23 06:59:25 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-23 06:59:25 -0800 |
| commit | 46a4d98baa1d43b33717b4377aefeeaf46b9c2ff (patch) | |
| tree | c89f3a1c416330f859887d00f896b18bcc7488a5 /tests/pipeline/rasterization | |
| parent | 263ca18ea516cfce43fda703c0a411aaf1938e42 (diff) | |
Full address insts elimination for backward autodiff. (#2604)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/pipeline/rasterization')
3 files changed, 9 insertions, 6 deletions
diff --git a/tests/pipeline/rasterization/fragment-shader-interlock.slang.glsl b/tests/pipeline/rasterization/fragment-shader-interlock.slang.glsl index 1818b7789..84eba46f0 100644 --- a/tests/pipeline/rasterization/fragment-shader-interlock.slang.glsl +++ b/tests/pipeline/rasterization/fragment-shader-interlock.slang.glsl @@ -19,11 +19,13 @@ void main() { beginInvocationInterlockARB(); - vec4 _S3 = (imageLoad((entryPointParams_texture_0), ivec2((uvec2(_S1.xy))))); - imageStore((entryPointParams_texture_0), ivec2((uvec2(_S1.xy))), _S3 + _S1); + vec2 _S3 = _S1.xy; + + vec4 _S4 = (imageLoad((entryPointParams_texture_0), ivec2((uvec2(_S3))))); + imageStore((entryPointParams_texture_0), ivec2((uvec2(_S3))), _S4 + _S1); endInvocationInterlockARB(); - _S2 = _S3; + _S2 = _S4; return; } diff --git a/tests/pipeline/rasterization/get-attribute-at-vertex.slang.glsl b/tests/pipeline/rasterization/get-attribute-at-vertex.slang.glsl index 1da5f4f8a..864f44eb3 100644 --- a/tests/pipeline/rasterization/get-attribute-at-vertex.slang.glsl +++ b/tests/pipeline/rasterization/get-attribute-at-vertex.slang.glsl @@ -14,6 +14,7 @@ out vec4 _S2; void main() { + uvec2 _S3 = uvec2(0U, 0U); _S2 = gl_BaryCoordNV.x * ((_S1)[(0U)]) + gl_BaryCoordNV.y * ((_S1)[(1U)]) + gl_BaryCoordNV.z * ((_S1)[(2U)]); return; } diff --git a/tests/pipeline/rasterization/get-attribute-at-vertex.slang.hlsl b/tests/pipeline/rasterization/get-attribute-at-vertex.slang.hlsl index 257b334bf..ce23492c9 100644 --- a/tests/pipeline/rasterization/get-attribute-at-vertex.slang.hlsl +++ b/tests/pipeline/rasterization/get-attribute-at-vertex.slang.hlsl @@ -8,7 +8,7 @@ void main( vector<float,3> bary_0 : SV_BARYCENTRICS, out vector<float,4> result_0 : SV_TARGET) { - result_0 = bary_0.x * GetAttributeAtVertex(color_0, (uint) int(0)) - + bary_0.y * GetAttributeAtVertex(color_0, (uint) int(1)) - + bary_0.z * GetAttributeAtVertex(color_0, (uint) int(2)); + result_0 = bary_0.x * GetAttributeAtVertex(color_0, 0U) + + bary_0.y * GetAttributeAtVertex(color_0, 1U) + + bary_0.z * GetAttributeAtVertex(color_0, 2U); } |
