Pauli Nieminen wrote:
- if( version <= caps->VertexShaderVersion )
- {
ok(hret == D3D_OK && vshader_ptr != NULL, "Vertex shader (0x%x) creation failed but d3dcaps claim to support it. hret = 0x%x, vshader_ptr = %p", version, hret, vshader_ptr);
IDirect3DVertexShader9_Release(vshader_ptr);
- } else {
ok(hret == D3DERR_INVALIDCALL && vshader_ptr == NULL,"Vertex shader (0x%x) creation succesed but d3dcaps claim not to support it. hret = 0x%x, vshader_ptr = %p", version, hret, vshader_ptr);
- }
Hi,
Just some style issues I've seen. You should be using a:
if () { } else { }
block to stick with the style.
+/**
- checks if shader version supported that is required by new
- shader.
- */
+static inline BOOL is_pshader_version_supported(IWineD3DDeviceImpl *deviceImpl, const DWORD *byte_code) +{
- struct shader_caps shader_caps;
- const DWORD shader_version = *byte_code; /* First instruction should be shader version */
- const WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info;
- deviceImpl->shader_backend->shader_get_caps(deviceImpl->devType ,gl_info, &shader_caps);
- // Check which shader this is
Please use C-style comments, not C++.
- if(shader_is_pshader_version(shader_version))
- {
// Check if high enough shader version is supported
And there are a few others of those.
if () { } else { }
block to stick with the style.
Actually most of WineD3D's code uses the style the patch uses, but its not 100% consistent :-/
2008/12/17 Stefan Dösinger stefan@codeweavers.com:
if () { } else { }
block to stick with the style.
Actually most of WineD3D's code uses the style the patch uses, but its not 100% consistent :-/
Most of the tests don't.
Henri Verbeet wrote:
2008/12/17 Stefan Dösinger stefan@codeweavers.com:
if () { } else { }
block to stick with the style.
Actually most of WineD3D's code uses the style the patch uses, but its not 100% consistent :-/
Most of the tests don't.
So that leaves the C++ comments?
2008/12/17 Paul Vriens paul.vriens.wine@gmail.com:
So that leaves the C++ comments?
No, the code you quoted was in d3d9/tests/shader.c, so I think your comment was right, even though it's a pretty minor issue.