Re: d3dx9: Implement D3DXGetShaderSize with tests 3/4
On 08/04/2008, Luis Busquets <luis.busquets(a)ilidium.com> wrote:
This patch implements the function D3DXGetShaderSize and adds tests to two simple shader which have been extrated from d3d9/tests/shader.c
+ /* We have to look for the end token 0x0000ffff which is D3DVS_END or D3DPS_END as both values are the same*/ + while (*address!=D3DVS_END()) { The comment about D3DSIO_END still stands.
+#define compare_shader_sizes(shader, exp) \ + shade=(DWORD *)shader; \ + got=D3DXGetShaderSize(shader); \ + ok(got==exp, "Expected: %d, Got: %d\n", exp, got); This is pretty ugly, but I guess it works.
+ compare_shader_sizes (simple_vs, 84); + compare_shader_sizes (simple_ps, 88); Please also test passing a NULL shader. (FWIW, sizeof(simple_vs) should also work instead of hardcoding 84 here, same for simple_ps)
participants (1)
-
H. Verbeet