[AMSTREAM] We don't need to define WIDL_C_INLINE_WRAPPERS here anymore.
[reactos.git] / dll / directx / wine / d3d9 / vertexdeclaration.c
index 0eab463..e9248be 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <config.h>
 #include "d3d9_private.h"
 
-WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
-
 static const struct
 {
     enum wined3d_format_id format;
@@ -45,8 +42,8 @@ d3d_dtype_lookup[] =
     /* D3DDECLTYPE_SHORT4N   */ {WINED3DFMT_R16G16B16A16_SNORM, 4, sizeof(short int)},
     /* D3DDECLTYPE_USHORT2N  */ {WINED3DFMT_R16G16_UNORM,       2, sizeof(short int)},
     /* D3DDECLTYPE_USHORT4N  */ {WINED3DFMT_R16G16B16A16_UNORM, 4, sizeof(short int)},
-    /* D3DDECLTYPE_UDEC3     */ {WINED3DFMT_R10G10B10A2_UINT,   3, sizeof(short int)},
-    /* D3DDECLTYPE_DEC3N     */ {WINED3DFMT_R10G10B10A2_SNORM,  3, sizeof(short int)},
+    /* D3DDECLTYPE_UDEC3     */ {WINED3DFMT_R10G10B10X2_UINT,   3, sizeof(short int)},
+    /* D3DDECLTYPE_DEC3N     */ {WINED3DFMT_R10G10B10X2_SNORM,  3, sizeof(short int)},
     /* D3DDECLTYPE_FLOAT16_2 */ {WINED3DFMT_R16G16_FLOAT,       2, sizeof(short int)},
     /* D3DDECLTYPE_FLOAT16_4 */ {WINED3DFMT_R16G16B16A16_FLOAT, 4, sizeof(short int)}
 };
@@ -326,7 +323,7 @@ static HRESULT convert_to_wined3d_declaration(const D3DVERTEXELEMENT9 *d3d9_elem
     UINT count = 1;
     UINT i;
 
-    TRACE("d3d9_elements %p, wined3d_elements %p\n", d3d9_elements, wined3d_elements);
+    TRACE("d3d9_elements %p, wined3d_elements %p, element_count %p\n", d3d9_elements, wined3d_elements, element_count);
 
     element = d3d9_elements;
     while (element++->Stream != 0xff && count++ < 128);
@@ -353,7 +350,9 @@ static HRESULT convert_to_wined3d_declaration(const D3DVERTEXELEMENT9 *d3d9_elem
         (*wined3d_elements)[i].format = d3d_dtype_lookup[d3d9_elements[i].Type].format;
         (*wined3d_elements)[i].input_slot = d3d9_elements[i].Stream;
         (*wined3d_elements)[i].offset = d3d9_elements[i].Offset;
-        (*wined3d_elements)[i].output_slot = ~0U;
+        (*wined3d_elements)[i].output_slot = WINED3D_OUTPUT_SLOT_SEMANTIC;
+        (*wined3d_elements)[i].input_slot_class = WINED3D_INPUT_PER_VERTEX_DATA;
+        (*wined3d_elements)[i].instance_data_step_rate = 0;
         (*wined3d_elements)[i].method = d3d9_elements[i].Method;
         (*wined3d_elements)[i].usage = d3d9_elements[i].Usage;
         (*wined3d_elements)[i].usage_idx = d3d9_elements[i].UsageIndex;