[PATCH] d3dcompiler_43/tests: Added error tests to HLSL test suite
Rico Schüller
kgbricola at web.de
Thu Dec 23 04:13:34 CST 2010
Am 23.12.2010 00:37, schrieb Michael Stefaniuc:
> 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
>
>
>
You probably may use ID3D10Blob_Release() instead of
IUnknown_Release(). This way you could drop the cast.
What happens to the ID3D10Blob *compiled? Is it still NULL after each
call to D3DCompile or is it an valid blob which has to be released?
Cheers
Rico
More information about the wine-devel
mailing list