11//
2- // Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
2+ // Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
33//
44// Permission is hereby granted, free of charge, to any person obtaining a copy
55// of this software and associated documentation files (the "Software"), to deal
@@ -70,12 +70,8 @@ RWByteAddressBuffer AmdExtD3DShaderIntrinsicsUAV : register(u0, AmdExtD3DShaderI
7070#define AmdExtD3DShaderIntrinsicsOpcode_Swizzle 0x04
7171#define AmdExtD3DShaderIntrinsicsOpcode_Ballot 0x05
7272#define AmdExtD3DShaderIntrinsicsOpcode_MBCnt 0x06
73- #define AmdExtD3DShaderIntrinsicsOpcode_Min3U 0x07
74- #define AmdExtD3DShaderIntrinsicsOpcode_Min3F 0x08
7573#define AmdExtD3DShaderIntrinsicsOpcode_Med3U 0x09
7674#define AmdExtD3DShaderIntrinsicsOpcode_Med3F 0x0a
77- #define AmdExtD3DShaderIntrinsicsOpcode_Max3U 0x0b
78- #define AmdExtD3DShaderIntrinsicsOpcode_Max3F 0x0c
7975#define AmdExtD3DShaderIntrinsicsOpcode_BaryCoord 0x0d
8076#define AmdExtD3DShaderIntrinsicsOpcode_VtxParam 0x0e
8177#define AmdExtD3DShaderIntrinsicsOpcode_Reserved1 0x0f
@@ -470,60 +466,6 @@ uint AmdExtD3DShaderIntrinsics_MBCnt(uint2 src)
470466 return retVal;
471467}
472468
473- /**
474- ***********************************************************************************************************************
475- * AmdExtD3DShaderIntrinsics_Min3F
476- *
477- * Returns the minimum value of the three floating point source arguments.
478- *
479- * Available if CheckSupport(AmdExtD3DShaderIntrinsicsSupport_Compare3) returned S_OK.
480- *
481- ***********************************************************************************************************************
482- */
483- float AmdExtD3DShaderIntrinsics_Min3F (float src0, float src1, float src2)
484- {
485- uint minimum;
486-
487- uint instruction1 = MakeAmdShaderIntrinsicsInstruction (AmdExtD3DShaderIntrinsicsOpcode_Min3F,
488- AmdExtD3DShaderIntrinsicsOpcodePhase_0,
489- 0 );
490- AmdExtD3DShaderIntrinsicsUAV.InterlockedCompareExchange (instruction1, asuint (src0), asuint (src1), minimum);
491-
492- uint instruction2 = MakeAmdShaderIntrinsicsInstruction (AmdExtD3DShaderIntrinsicsOpcode_Min3F,
493- AmdExtD3DShaderIntrinsicsOpcodePhase_1,
494- 0 );
495- AmdExtD3DShaderIntrinsicsUAV.InterlockedCompareExchange (instruction2, asuint (src2), minimum, minimum);
496-
497- return asfloat (minimum);
498- }
499-
500- /**
501- ***********************************************************************************************************************
502- * AmdExtD3DShaderIntrinsics_Min3U
503- *
504- * Returns the minimum value of the three unsigned integer source arguments.
505- *
506- * Available if CheckSupport(AmdExtD3DShaderIntrinsicsSupport_Compare3) returned S_OK.
507- *
508- ***********************************************************************************************************************
509- */
510- uint AmdExtD3DShaderIntrinsics_Min3U (uint src0, uint src1, uint src2)
511- {
512- uint minimum;
513-
514- uint instruction1 = MakeAmdShaderIntrinsicsInstruction (AmdExtD3DShaderIntrinsicsOpcode_Min3U,
515- AmdExtD3DShaderIntrinsicsOpcodePhase_0,
516- 0 );
517- AmdExtD3DShaderIntrinsicsUAV.InterlockedCompareExchange (instruction1, src0, src1, minimum);
518-
519- uint instruction2 = MakeAmdShaderIntrinsicsInstruction (AmdExtD3DShaderIntrinsicsOpcode_Min3U,
520- AmdExtD3DShaderIntrinsicsOpcodePhase_1,
521- 0 );
522- AmdExtD3DShaderIntrinsicsUAV.InterlockedCompareExchange (instruction2, src2, minimum, minimum);
523-
524- return minimum;
525- }
526-
527469/**
528470***********************************************************************************************************************
529471* AmdExtD3DShaderIntrinsics_Med3F
@@ -578,60 +520,6 @@ uint AmdExtD3DShaderIntrinsics_Med3U(uint src0, uint src1, uint src2)
578520 return median;
579521}
580522
581- /**
582- ***********************************************************************************************************************
583- * AmdExtD3DShaderIntrinsics_Max3F
584- *
585- * Returns the maximum value of the three floating point source arguments.
586- *
587- * Available if CheckSupport(AmdExtD3DShaderIntrinsicsSupport_Compare3) returned S_OK.
588- *
589- ***********************************************************************************************************************
590- */
591- float AmdExtD3DShaderIntrinsics_Max3F (float src0, float src1, float src2)
592- {
593- uint maximum;
594-
595- uint instruction1 = MakeAmdShaderIntrinsicsInstruction (AmdExtD3DShaderIntrinsicsOpcode_Max3F,
596- AmdExtD3DShaderIntrinsicsOpcodePhase_0,
597- 0 );
598- AmdExtD3DShaderIntrinsicsUAV.InterlockedCompareExchange (instruction1, asuint (src0), asuint (src1), maximum);
599-
600- uint instruction2 = MakeAmdShaderIntrinsicsInstruction (AmdExtD3DShaderIntrinsicsOpcode_Max3F,
601- AmdExtD3DShaderIntrinsicsOpcodePhase_1,
602- 0 );
603- AmdExtD3DShaderIntrinsicsUAV.InterlockedCompareExchange (instruction2, asuint (src2), maximum, maximum);
604-
605- return asfloat (maximum);
606- }
607-
608- /**
609- ***********************************************************************************************************************
610- * AmdExtD3DShaderIntrinsics_Max3U
611- *
612- * Returns the maximum value of the three unsigned integer source arguments.
613- *
614- * Available if CheckSupport(AmdExtD3DShaderIntrinsicsSupport_Compare3) returned S_OK.
615- *
616- ***********************************************************************************************************************
617- */
618- uint AmdExtD3DShaderIntrinsics_Max3U (uint src0, uint src1, uint src2)
619- {
620- uint maximum;
621-
622- uint instruction1 = MakeAmdShaderIntrinsicsInstruction (AmdExtD3DShaderIntrinsicsOpcode_Max3U,
623- AmdExtD3DShaderIntrinsicsOpcodePhase_0,
624- 0 );
625- AmdExtD3DShaderIntrinsicsUAV.InterlockedCompareExchange (instruction1, src0, src1, maximum);
626-
627- uint instruction2 = MakeAmdShaderIntrinsicsInstruction (AmdExtD3DShaderIntrinsicsOpcode_Max3U,
628- AmdExtD3DShaderIntrinsicsOpcodePhase_1,
629- 0 );
630- AmdExtD3DShaderIntrinsicsUAV.InterlockedCompareExchange (instruction2, src2, maximum, maximum);
631-
632- return maximum;
633- }
634-
635523/**
636524***********************************************************************************************************************
637525* AmdExtD3DShaderIntrinsics_IjBarycentricCoords
@@ -3124,4 +3012,4 @@ uint4 AmdExtD3DShaderIntrinsics_WavePostfixMax(uint4 src)
31243012 src);
31253013}
31263014
3127- #endif // _AMDEXTD3DSHADERINTRINICS_HLSL
3015+ #endif // _AMDEXTD3DSHADERINTRINICS_HLSL
0 commit comments