Re: [PATCH] d3dx9_36: Filter out D3DCompile warning messages that are not present with D3DCompileShader.

2013-07-31 Thread Stefan Dösinger
Am 2013-07-31 16:01, schrieb Christian Costa:
> AFAIK no. My localization is french and I get english messages. Any
> idea how I can check that?
Should be ok then.

> The parsing code handles missing null byte as well as both
> unix/dos text formats but maybe I can just simplify it by using
> strtok_r and assume dos format with null byte.
Is there any reason why the format would change?

> I'm afraid this is the only solution. AFAIK there is no option
> that disable this warning.
As far as my reserch goes, D3DCompileShader() is d3dx9's function and
d3dcompiler.dll only has D3DCompile(), is that correct? If so, parsing
the warnings is probably the least bad option.

The obvious alternative is to ignore the mix of builtin d3dx9 and
native d3dcompiler - but at some point we may want to write the same
warnings from our d3dcompiler and the problem returns.

In either case, please write some tests that demonstrate that d3dx9
does not generate those warnings.





Re: [PATCH] d3dx9_36: Filter out D3DCompile warning messages that are not present with D3DCompileShader.

2013-07-31 Thread Christian Costa
Hi Stefan,

2013/7/31 Stefan Dösinger 

> Hi,
>
> Am 31.07.2013 um 09:10 schrieb Christian Costa :
>
> +if (!(strstr(line_out, "warning X3206:") &&
> strstr(line_out, "implicit truncation of vector type")))
> +line_out += line_size;
>
> msvc localizes compiler errors and warnings. Are you sure d3dcompiler.dll
> doesn't do that?
>

AFAIK no. My localization is french and I get english messages. Any idea
how I can check that?


>
> Wrt the parsing code, wouldn't it be nicer to use strtok_r to split the
> buffer into separate lines?
>

 The parsing code handles missing null byte as well as both unix/dos text
formats but maybe I can just simplify it by using strtok_r and assume dos
format with null byte.


> I am not sure that parsing the errors and warnings like that is a good
> thing, but I don't know d3dx9 and d3dcompiler well enough to give a final
> judgement on that.
>
>
I'm afraid this is the only solution. AFAIK there is no option that disable
this warning.

Cheers
Christian



Re: [PATCH] d3dx9_36: Filter out D3DCompile warning messages that are not present with D3DCompileShader.

2013-07-31 Thread Stefan Dösinger
Hi,

Am 31.07.2013 um 09:10 schrieb Christian Costa :

> +if (!(strstr(line_out, "warning X3206:") && strstr(line_out, 
> "implicit truncation of vector type")))
> +line_out += line_size;
msvc localizes compiler errors and warnings. Are you sure d3dcompiler.dll 
doesn't do that?

Wrt the parsing code, wouldn't it be nicer to use strtok_r to split the buffer 
into separate lines?

I am not sure that parsing the errors and warnings like that is a good thing, 
but I don't know d3dx9 and d3dcompiler well enough to give a final judgement on 
that.