1
1
//
2
- // Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
2
+ // Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
3
3
//
4
4
// Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
// of this software and associated documentation files (the "Software"), to deal
@@ -70,12 +70,8 @@ RWByteAddressBuffer AmdExtD3DShaderIntrinsicsUAV : register(u0, AmdExtD3DShaderI
70
70
#define AmdExtD3DShaderIntrinsicsOpcode_Swizzle 0x04
71
71
#define AmdExtD3DShaderIntrinsicsOpcode_Ballot 0x05
72
72
#define AmdExtD3DShaderIntrinsicsOpcode_MBCnt 0x06
73
- #define AmdExtD3DShaderIntrinsicsOpcode_Min3U 0x07
74
- #define AmdExtD3DShaderIntrinsicsOpcode_Min3F 0x08
75
73
#define AmdExtD3DShaderIntrinsicsOpcode_Med3U 0x09
76
74
#define AmdExtD3DShaderIntrinsicsOpcode_Med3F 0x0a
77
- #define AmdExtD3DShaderIntrinsicsOpcode_Max3U 0x0b
78
- #define AmdExtD3DShaderIntrinsicsOpcode_Max3F 0x0c
79
75
#define AmdExtD3DShaderIntrinsicsOpcode_BaryCoord 0x0d
80
76
#define AmdExtD3DShaderIntrinsicsOpcode_VtxParam 0x0e
81
77
#define AmdExtD3DShaderIntrinsicsOpcode_Reserved1 0x0f
@@ -470,60 +466,6 @@ uint AmdExtD3DShaderIntrinsics_MBCnt(uint2 src)
470
466
return retVal;
471
467
}
472
468
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
-
527
469
/**
528
470
***********************************************************************************************************************
529
471
* AmdExtD3DShaderIntrinsics_Med3F
@@ -578,60 +520,6 @@ uint AmdExtD3DShaderIntrinsics_Med3U(uint src0, uint src1, uint src2)
578
520
return median;
579
521
}
580
522
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
-
635
523
/**
636
524
***********************************************************************************************************************
637
525
* AmdExtD3DShaderIntrinsics_IjBarycentricCoords
@@ -3124,4 +3012,4 @@ uint4 AmdExtD3DShaderIntrinsics_WavePostfixMax(uint4 src)
3124
3012
src);
3125
3013
}
3126
3014
3127
- #endif // _AMDEXTD3DSHADERINTRINICS_HLSL
3015
+ #endif // _AMDEXTD3DSHADERINTRINICS_HLSL
0 commit comments