Skip to content

Commit

Permalink
Update all tests to address new analyzer errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio0694 committed Nov 23, 2024
1 parent a9bdcf9 commit 49d9268
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,15 @@ public float4 Execute()
[D2DInputCount(1)]
[D2DInputComplex(0)]
[D2DShaderProfile(D2D1ShaderProfile.PixelShader40Level91)]
[D2DRequiresScenePosition]
[D2DGeneratedPixelShaderDescriptor]
internal readonly partial struct ComplexShaderWithExplicitShaderProfileAndNoCompileOptions : ID2D1PixelShader
{
public float4 Execute()
{
return D2D.GetInput(0);
float2 uv = D2D.GetScenePosition().XY;

return D2D.SampleInput(0, uv);
}
}

Expand Down
6 changes: 4 additions & 2 deletions tests/ComputeSharp.D2D1.Tests/D2D1ReflectionServicesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void GetShaderInfo()
Assert.AreEqual("""
#define D2D_INPUT_COUNT 3
#define D2D_INPUT0_SIMPLE
#define D2D_INPUT1_COMPLEX
#define D2D_INPUT1_SIMPLE
#define D2D_INPUT2_COMPLEX
#define D2D_REQUIRES_SCENE_POSITION
Expand Down Expand Up @@ -52,7 +52,7 @@ public void GetShaderInfo()

[D2DInputCount(3)]
[D2DInputSimple(0)]
[D2DInputComplex(1)]
[D2DInputSimple(1)]
[D2DInputComplex(2)]
[D2DRequiresScenePosition]
[D2DShaderProfile(D2D1ShaderProfile.PixelShader41)]
Expand Down Expand Up @@ -98,6 +98,7 @@ public void GetShaderInfoWithDoublePrecisionFeature()

Assert.AreEqual("""
#define D2D_INPUT_COUNT 1
#define D2D_INPUT0_SIMPLE
#include "d2d1effecthelpers.hlsli"
Expand All @@ -113,6 +114,7 @@ public void GetShaderInfoWithDoublePrecisionFeature()
}

[D2DInputCount(1)]
[D2DInputSimple(0)]
[D2DRequiresDoublePrecisionSupport]
[D2DShaderProfile(D2D1ShaderProfile.PixelShader50)]
[D2DGeneratedPixelShaderDescriptor]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ public float4 Execute()
}

[D2DInputCount(1)]
[D2DInputSimple(0)]
[D2DGeneratedPixelShaderDescriptor]
[AutoConstructor]
internal readonly partial struct ShaderWithSomePropertiesAndInputs : ID2D1PixelShader
Expand Down

0 comments on commit 49d9268

Please sign in to comment.