MagnifyPixelsPS.hlsl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
  2. // RUN: %dxc -E main -T ps_6_0 %s | %D3DReflect %s | FileCheck -check-prefix=REFL %s
  3. // CHECK: sampleLevel
  4. //
  5. // Copyright (c) Microsoft. All rights reserved.
  6. // This code is licensed under the MIT License (MIT).
  7. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
  8. // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
  9. // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
  10. // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
  11. //
  12. // Developed by Minigraph
  13. //
  14. // Author: James Stanard
  15. //
  16. #include "ShaderUtility.hlsli"
  17. #include "PresentRS.hlsli"
  18. Texture2D<float3> ColorTex : register(t0);
  19. SamplerState PointSampler : register(s1);
  20. cbuffer Constants : register(b0)
  21. {
  22. float ScaleFactor;
  23. }
  24. [RootSignature(Present_RootSig)]
  25. float3 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
  26. {
  27. float2 ScaledUV = ScaleFactor * (uv - 0.5) + 0.5;
  28. return ColorTex.SampleLevel(PointSampler, ScaledUV, 0);
  29. }
  30. // REFL: InstructionCount: 21
  31. // REFL: TempArrayCount: 0
  32. // REFL: DynamicFlowControlCount: 0
  33. // REFL: ArrayInstructionCount: 0
  34. // REFL: TextureNormalInstructions: 1
  35. // REFL: TextureLoadInstructions: 0
  36. // REFL: TextureCompInstructions: 0
  37. // REFL: TextureBiasInstructions: 0
  38. // REFL: TextureGradientInstructions: 0
  39. // REFL: FloatInstructionCount: 6
  40. // REFL: IntInstructionCount: 0
  41. // REFL: UintInstructionCount: 0
  42. // REFL: CutInstructionCount: 0
  43. // REFL: EmitInstructionCount: 0
  44. // REFL: cBarrierInstructions: 0
  45. // REFL: cInterlockedInstructions: 0
  46. // REFL: cTextureStoreInstructions: 0