Skip to content

Commit

Permalink
Use mad() intrinsic in D3D12_Shader_Debug_Zoo SM6+ tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorro666 committed Dec 10, 2024
1 parent ae7159f commit a40d729
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ float4 main(v2f IN) : SV_Target0
{
int value = IN.tri;
int original;
int u = 3 * (IN.tri - 85) + 17;
int u = mad(3, (IN.tri - 85), 17);
int2 uv = int2(u,37);
inttexrwtest[uv] = 100;
InterlockedAdd(inttexrwtest[uv], value, original);
Expand All @@ -790,7 +790,7 @@ float4 main(v2f IN) : SV_Target0
{
int value = IN.tri;
int original;
int u = 3 * (IN.tri - 85) + 17;
int u = mad(3, (IN.tri - 85), 17);
int2 uv = int2(u,37);
inttexrwtest[uv] = 100;
InterlockedAnd(inttexrwtest[uv], value, original);
Expand All @@ -800,7 +800,7 @@ float4 main(v2f IN) : SV_Target0
{
int value = IN.tri;
int original;
int u = 3 * (IN.tri - 85) + 17;
int u = mad(3, (IN.tri - 85), 17);
int2 uv = int2(u,37);
inttexrwtest[uv] = 100;
InterlockedOr(inttexrwtest[uv], value, original);
Expand All @@ -810,7 +810,7 @@ float4 main(v2f IN) : SV_Target0
{
int value = IN.tri;
int original;
int u = 3 * (IN.tri - 85) + 17;
int u = mad(3, (IN.tri - 85), 17);
int2 uv = int2(u,37);
inttexrwtest[uv] = 100;
InterlockedXor(inttexrwtest[uv], value, original);
Expand All @@ -820,7 +820,7 @@ float4 main(v2f IN) : SV_Target0
{
int value = IN.tri;
int original;
int u = 3 * (IN.tri - 85) + 17;
int u = mad(3, (IN.tri - 85), 17);
int2 uv = int2(u,37);
inttexrwtest[uv] = 100;
InterlockedMin(inttexrwtest[uv], value, original);
Expand All @@ -830,7 +830,7 @@ float4 main(v2f IN) : SV_Target0
{
int value = IN.tri;
int original;
int u = 3 * (IN.tri - 85) + 17;
int u = mad(3, (IN.tri - 85), 17);
int2 uv = int2(u,37);
inttexrwtest[uv] = 100;
InterlockedMax(inttexrwtest[uv], value, original);
Expand All @@ -840,7 +840,7 @@ float4 main(v2f IN) : SV_Target0
{
int value = IN.tri;
int original;
int u = 3 * (IN.tri - 85) + 17;
int u = mad(3, (IN.tri - 85), 17);
int2 uv = int2(u,37);
inttexrwtest[uv] = 100;
InterlockedExchange(inttexrwtest[uv], value, original);
Expand All @@ -850,7 +850,7 @@ float4 main(v2f IN) : SV_Target0
{
int value = IN.tri;
int original;
int u = 3 * (IN.tri - 85) + 17;
int u = mad(3, (IN.tri - 85), 17);
int2 uv = int2(u,37);
inttexrwtest[uv] = 100;
InterlockedCompareExchange(inttexrwtest[uv], value, value+1, original);
Expand All @@ -859,7 +859,7 @@ float4 main(v2f IN) : SV_Target0
if(IN.tri == 93)
{
int value = IN.tri;
int u = 3 * (IN.tri - 85) + 17;
int u = mad(3, (IN.tri - 85), 17);
int2 uv = int2(u,37);
inttexrwtest[uv] = 100;
InterlockedCompareStore(inttexrwtest[uv], value, value+1);
Expand Down

0 comments on commit a40d729

Please sign in to comment.