summaryrefslogtreecommitdiffstats
path: root/tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05')
-rw-r--r--tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05.fx54
-rw-r--r--tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05_PS.hlsl3
-rw-r--r--tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05_VS.hlsl3
3 files changed, 60 insertions, 0 deletions
diff --git a/tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05.fx b/tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05.fx
new file mode 100644
index 000000000..b15c99e49
--- /dev/null
+++ b/tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05.fx
@@ -0,0 +1,54 @@
+//TEST_IGNORE_FILE: Currently failing due to Spire compiler issues.
+//TEST:COMPARE_HLSL: -target dxbc-assembly -profile vs_4_0 -entry VS -profile ps_4_0 -entry PS
+//--------------------------------------------------------------------------------------
+// File: Tutorial05.fx
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//--------------------------------------------------------------------------------------
+
+//--------------------------------------------------------------------------------------
+// Constant Buffer Variables
+//--------------------------------------------------------------------------------------
+cbuffer ConstantBuffer : register( b0 )
+{
+ matrix World;
+ matrix View;
+ matrix Projection;
+}
+
+//--------------------------------------------------------------------------------------
+struct VS_INPUT
+{
+ float4 Pos : POSITION;
+ float4 Color : COLOR;
+};
+
+struct PS_INPUT
+{
+ float4 Pos : SV_POSITION;
+ float4 Color : COLOR;
+};
+
+
+//--------------------------------------------------------------------------------------
+// Vertex Shader
+//--------------------------------------------------------------------------------------
+PS_INPUT VS( VS_INPUT input )
+{
+ PS_INPUT output = (PS_INPUT)0;
+ output.Pos = mul( input.Pos, World );
+ output.Pos = mul( output.Pos, View );
+ output.Pos = mul( output.Pos, Projection );
+ output.Color = input.Color;
+
+ return output;
+}
+
+
+//--------------------------------------------------------------------------------------
+// Pixel Shader
+//--------------------------------------------------------------------------------------
+float4 PS( PS_INPUT input) : SV_Target
+{
+ return input.Color;
+}
diff --git a/tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05_PS.hlsl b/tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05_PS.hlsl
new file mode 100644
index 000000000..acc900ff5
--- /dev/null
+++ b/tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05_PS.hlsl
@@ -0,0 +1,3 @@
+//TEST_IGNORE_FILE: Currently failing due to Spire compiler issues.
+//TEST:COMPARE_HLSL: -target dxbc-assembly -profile ps_4_0 -entry PS
+#include "Tutorial05.fx"
diff --git a/tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05_VS.hlsl b/tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05_VS.hlsl
new file mode 100644
index 000000000..726f05979
--- /dev/null
+++ b/tests/hlsl/dxsdk/Direct3D11Tutorials/Tutorial05/Tutorial05_VS.hlsl
@@ -0,0 +1,3 @@
+//TEST_IGNORE_FILE: Currently failing due to Spire compiler issues.
+//TEST:COMPARE_HLSL: -target dxbc-assembly -profile vs_4_0 -entry VS
+#include "Tutorial05.fx"