Re: include: flesh out d3d11.idl (try 4)

2013-01-22 Thread Dmitry Timoshkov
Austin English austinengl...@gmail.com wrote:

 try 4: only include enough to add a stub for D3D11CreateDevice,

You could also try to make it work for compilers that don't suppport
anonymous unions.

-- 
Dmitry.




Re: include: flesh out d3d11.idl (try 2)

2013-01-14 Thread Austin English
On Fri, Jan 11, 2013 at 8:42 PM, Dmitry Timoshkov dmi...@baikal.ru wrote:
 Austin English austinengl...@gmail.com wrote:

  +/* Forward declarations */
 
  You've copied too much from the PSDK version, better leave it to someone
  else, and do it step by step when particular functionality gets 
  implemented.

 The forward declarations are necessary due to the convoluted nature of
 the interfaces. My end goal is to add a stub for D3D11CreateDevice,
 which fixes http://bugs.winehq.org/show_bug.cgi?id=32520 (so users
 don't have to disable d3d11). However, adding a stub requires
 ID3D11Device and ID3D11DeviceContext, which are 158 and 413 lines
 respectively. If I only add what is needed, it saves ~600 lines (1650
 vs 2230), so I went ahead and added the rest.

 I meant that you not only copied structures, declarations and definitions
 without even slight attempt to make them a bit different from PSDK, but
 also copied the comments. That approach clearly is not acceptable.

Indentation was changed to match other wine headers / make it
different from the PSDK. The interface formats were also changed
(quite a bit) to match d3d10.idl.

There's only so many ways to word 'forward declarations'.

-- 
-Austin




Re: include: flesh out d3d11.idl (try 2)

2013-01-12 Thread Henri Verbeet
On 12 January 2013 03:47, Austin English austinengl...@gmail.com wrote:
 The forward declarations are necessary due to the convoluted nature of
 the interfaces. My end goal is to add a stub for D3D11CreateDevice,
 which fixes http://bugs.winehq.org/show_bug.cgi?id=32520 (so users
 don't have to disable d3d11). However, adding a stub requires
 ID3D11Device and ID3D11DeviceContext, which are 158 and 413 lines
If you're only adding a stub, just the forward declarations for those
are enough, actually, as long as you never dereference the pointers.
There's something to be said for doing things right the first time
though.




Re: include: flesh out d3d11.idl (try 2)

2013-01-11 Thread Austin English
On Thu, Jan 10, 2013 at 8:18 PM, Dmitry Timoshkov dmi...@baikal.ru wrote:
 Austin English austinengl...@gmail.com wrote:

 Try 2:
 Remove L suffixes, C++ comment.

 +/* Forward declarations */

 You've copied too much from the PSDK version, better leave it to someone
 else, and do it step by step when particular functionality gets implemented.

The forward declarations are necessary due to the convoluted nature of
the interfaces. My end goal is to add a stub for D3D11CreateDevice,
which fixes http://bugs.winehq.org/show_bug.cgi?id=32520 (so users
don't have to disable d3d11). However, adding a stub requires
ID3D11Device and ID3D11DeviceContext, which are 158 and 413 lines
respectively. If I only add what is needed, it saves ~600 lines (1650
vs 2230), so I went ahead and added the rest.

-- 
-Austin




Re: include: flesh out d3d11.idl (try 2)

2013-01-11 Thread Dmitry Timoshkov
Austin English austinengl...@gmail.com wrote:

  +/* Forward declarations */
 
  You've copied too much from the PSDK version, better leave it to someone
  else, and do it step by step when particular functionality gets implemented.
 
 The forward declarations are necessary due to the convoluted nature of
 the interfaces. My end goal is to add a stub for D3D11CreateDevice,
 which fixes http://bugs.winehq.org/show_bug.cgi?id=32520 (so users
 don't have to disable d3d11). However, adding a stub requires
 ID3D11Device and ID3D11DeviceContext, which are 158 and 413 lines
 respectively. If I only add what is needed, it saves ~600 lines (1650
 vs 2230), so I went ahead and added the rest.

I meant that you not only copied structures, declarations and definitions
without even slight attempt to make them a bit different from PSDK, but
also copied the comments. That approach clearly is not acceptable.

-- 
Dmitry.




Re: include: flesh out d3d11.idl

2013-01-10 Thread Nikolay Sivov

On 1/10/2013 22:35, Austin English wrote:

Some minor things.



+typedef enum D3D11_RESOURCE_DIMENSION
+{
+D3D11_RESOURCE_DIMENSION_UNKNOWN = 0,
+D3D11_RESOURCE_DIMENSION_BUFFER = 1,
+D3D11_RESOURCE_DIMENSION_TEXTURE1D = 2,
+D3D11_RESOURCE_DIMENSION_TEXTURE2D = 3,
+D3D11_RESOURCE_DIMENSION_TEXTURE3D = 4,
+} D3D11_RESOURCE_DIMENSION;
+

You could remove values in cases like that, result will be the same.


+D3D11_BIND_VERTEX_BUFFER = 0x0001L,

I think L suffix could be omitted.


+//FIXME:

...





Re: include: flesh out d3d11.idl (try 2)

2013-01-10 Thread Dmitry Timoshkov
Austin English austinengl...@gmail.com wrote:

 Try 2:
 Remove L suffixes, C++ comment.

 +/* Forward declarations */

You've copied too much from the PSDK version, better leave it to someone
else, and do it step by step when particular functionality gets implemented.

-- 
Dmitry.