* 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;
/* 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)}
};
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);
(*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;
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
- {
- ERR("Failed to allocate vertex declaration memory.\n");
return E_OUTOFMEMORY;
- }
hr = vertexdeclaration_init(object, device, elements);
if (FAILED(hr))