d3dx9_36: Implements D3DXGetShaderVersion

Ivan Gyurdiev ivg231 at gmail.com
Sun Mar 16 09:32:51 CDT 2008

Luis C. Busquets Pérez wrote:
> This functions gets the Version Token of a binary shader. This Token 
> is the first of the binary stream so it is as easy as picling the 
> pointed DWORD. This is all public information available to the public.
What happens when the shader is NULL?
Yours will crash - MSDN says otherwise.

Does this work on Pixel and Vertex shaders ?
Does it always return back the first dword as is - what happens if an 
invalid shader version is passed in.

> To implement a test would be far more complicated as it would mean to 
> include a binary shader. Anyway, I have tested the results with Civ4 
> (by making a derivation on d3dx9_32 with this function and using the 
> original d3dx9_36.D3DXGetShaderVersion function) and the results where 
> the same for all the shaders that where present.
I would suggest an automated test across [ vs: 1.0, 1.1, 2.0, 2.1, 3.0 ] 
, [ ps: 1.0, 1.1, 1.2, 1.3, 1.4,  2.0, 2.1, 3.0 ] , NULL, and an invalid 
You can see some binary shaders in the d3d9 tests.


More information about the wine-devel mailing list