Hello Travis,
On 12/22/2010 10:31 PM, Travis Athougies wrote:
Tests to ensure the HLSL compiler won't crash on malformed input.
---
dlls/d3dcompiler_43/tests/hlsl.c | 87 ++++++++++++++++++++++++++++++++++++++
1 files changed, 87 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dcompiler_43/tests/hlsl.c b/dlls/d3dcompiler_43/tests/hlsl.c
index 1f8e31c..a6a6099 100644
--- a/dlls/d3dcompiler_43/tests/hlsl.c
+++ b/dlls/d3dcompiler_43/tests/hlsl.c
@@ -556,6 +556,92 @@ static void test_trig(IDirect3DDevice9 *device,
IDirect3DVertexBuffer9 *quad_geo
}
}
+static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9
*qquad_geometry,
+ IDirect3DVertexShader9 *vshader_passthru)
+{
+ static const char *undefined_variable_shader =
+ "float4 test(float2 pos: TEXCOORD0) : COLOR \
+ { \
+ return y; \
+ }";
please use proper C string literals. Escaping the newline is a gcc
extension. You can use string literal concatenation to split the string
on multiple lines. Something like this would do:
"float4 test(float2 pos: TEXCOORD0) : COLOR"
"{"
" return y;"
"}";
bye
michael