ReactOS  0.4.12-dev-708-g95ed44e
vertexdeclaration.c File Reference
#include "config.h"
#include "d3d8_private.h"
Include dependency graph for vertexdeclaration.c:

Go to the source code of this file.

Macros

#define D3DVSDT_TYPE_TO_STR(u)   case u: return #u
 
#define D3DVSDE_REGISTER_TO_STR(u)   case u: return #u
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (d3d8)
 
static const chardebug_d3dvsdt_type (D3DVSDT_TYPE d3dvsdt_type)
 
static const chardebug_d3dvsde_register (D3DVSDE_REGISTER d3dvsde_register)
 
size_t parse_token (const DWORD *pToken)
 
void load_local_constants (const DWORD *d3d8_elements, struct wined3d_shader *wined3d_vertex_shader)
 
static UINT convert_to_wined3d_declaration (const DWORD *d3d8_elements, DWORD *d3d8_elements_size, struct wined3d_vertex_element **wined3d_elements)
 
static void STDMETHODCALLTYPE d3d8_vertexdeclaration_wined3d_object_destroyed (void *parent)
 
void d3d8_vertex_declaration_destroy (struct d3d8_vertex_declaration *declaration)
 
HRESULT d3d8_vertex_declaration_init (struct d3d8_vertex_declaration *declaration, struct d3d8_device *device, const DWORD *elements, DWORD shader_handle)
 
HRESULT d3d8_vertex_declaration_init_fvf (struct d3d8_vertex_declaration *declaration, struct d3d8_device *device, DWORD fvf)
 

Variables

static const size_t wined3d_type_sizes []
 
static enum wined3d_format_id wined3d_format_lookup []
 
struct {
   BYTE   usage
 
   BYTE   usage_idx
 
wined3d_usage_lookup []
 
static const struct wined3d_parent_ops d3d8_vertexdeclaration_wined3d_parent_ops
 

Macro Definition Documentation

◆ D3DVSDE_REGISTER_TO_STR

#define D3DVSDE_REGISTER_TO_STR (   u)    case u: return #u

◆ D3DVSDT_TYPE_TO_STR

#define D3DVSDT_TYPE_TO_STR (   u)    case u: return #u

Function Documentation

◆ convert_to_wined3d_declaration()

static UINT convert_to_wined3d_declaration ( const DWORD d3d8_elements,
DWORD d3d8_elements_size,
struct wined3d_vertex_element **  wined3d_elements 
)
static

Definition at line 256 of file vertexdeclaration.c.

258 {
260  const DWORD *token = d3d8_elements;
261  D3DVSD_TOKENTYPE token_type;
262  unsigned int element_count = 0;
263  WORD stream = 0;
264  int offset = 0;
265 
266  TRACE("d3d8_elements %p, d3d8_elements_size %p, wined3d_elements %p\n", d3d8_elements, d3d8_elements_size, wined3d_elements);
267 
268  /* 128 should be enough for anyone... */
269  *wined3d_elements = heap_alloc_zero(128 * sizeof(**wined3d_elements));
270  while (D3DVSD_END() != *token)
271  {
272  token_type = ((*token & D3DVSD_TOKENTYPEMASK) >> D3DVSD_TOKENTYPESHIFT);
273 
274  if (token_type == D3DVSD_TOKEN_STREAM && !(*token & D3DVSD_STREAMTESSMASK))
275  {
277  offset = 0;
278  } else if (token_type == D3DVSD_TOKEN_STREAMDATA && !(*token & D3DVSD_DATALOADTYPEMASK)) {
281 
282  TRACE("Adding element %d:\n", element_count);
283 
284  element = *wined3d_elements + element_count++;
286  element->input_slot = stream;
287  element->offset = offset;
288  element->output_slot = reg;
289  element->input_slot_class = WINED3D_INPUT_PER_VERTEX_DATA;
290  element->instance_data_step_rate = 0;
292  element->usage = wined3d_usage_lookup[reg].usage;
293  element->usage_idx = wined3d_usage_lookup[reg].usage_idx;
294 
296  } else if (token_type == D3DVSD_TOKEN_STREAMDATA && (*token & D3DVSD_DATALOADTYPEMASK)) {
297  TRACE(" 0x%08x SKIP(%u)\n", token_type, ((token_type & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT));
298  offset += sizeof(DWORD) * ((token_type & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT);
299  }
300 
301  if (element_count >= 127) {
302  ERR("More than 127 elements?\n");
303  break;
304  }
305 
306  token += parse_token(token);
307  }
308 
309  *d3d8_elements_size = (++token - d3d8_elements) * sizeof(DWORD);
310 
311  return element_count;
312 }
#define D3DVSD_STREAMNUMBERSHIFT
Definition: d3d8types.h:242
#define D3DVSD_DATATYPESHIFT
Definition: d3d8types.h:245
#define DWORD
Definition: msvc.h:34
#define D3DVSD_TOKENTYPEMASK
Definition: d3d8types.h:266
GLintptr offset
Definition: glext.h:5920
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define D3DVSD_STREAMNUMBERMASK
Definition: d3d8types.h:256
#define D3DVSD_SKIPCOUNTMASK
Definition: d3d8types.h:260
#define D3DVSD_END()
Definition: d3d8types.h:275
#define D3DVSD_SKIPCOUNTSHIFT
Definition: d3d8types.h:246
#define D3DVSD_VERTEXREGMASK
Definition: d3d8types.h:257
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
size_t parse_token(const DWORD *pToken)
#define TRACE(s)
Definition: solgame.cpp:4
static enum wined3d_format_id wined3d_format_lookup[]
#define D3DVSD_TOKENTYPESHIFT
Definition: d3d8types.h:252
unsigned short WORD
Definition: ntddk_ex.h:93
static const size_t wined3d_type_sizes[]
unsigned long DWORD
Definition: ntddk_ex.h:95
#define D3DVSD_DATALOADTYPEMASK
Definition: d3d8types.h:264
static const struct @217 wined3d_usage_lookup[]
Definition: parse.h:22
GLuint GLuint stream
Definition: glext.h:7522
#define D3DVSD_VERTEXREGSHIFT
Definition: d3d8types.h:243
#define ERR(fmt,...)
Definition: debug.h:109
#define D3DVSD_DATATYPEMASK
Definition: d3d8types.h:259
static int reg
Definition: i386-dis.c:1275
enum _D3DVSD_TOKENTYPE D3DVSD_TOKENTYPE
#define D3DVSD_STREAMTESSMASK
Definition: d3d8types.h:265

Referenced by d3d8_vertex_declaration_init().

◆ d3d8_vertex_declaration_destroy()

void d3d8_vertex_declaration_destroy ( struct d3d8_vertex_declaration declaration)

Definition at line 321 of file vertexdeclaration.c.

322 {
323  TRACE("declaration %p.\n", declaration);
324 
326  wined3d_vertex_declaration_decref(declaration->wined3d_vertex_declaration);
328 }
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:360
ULONG CDECL wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration *declaration)
#define TRACE(s)
Definition: solgame.cpp:4
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:365

Referenced by d3d8_device_get_fvf_declaration(), d3d8_device_Release(), d3d8_vertex_shader_init(), and d3d8_vertexshader_wined3d_object_destroyed().

◆ d3d8_vertex_declaration_init()

HRESULT d3d8_vertex_declaration_init ( struct d3d8_vertex_declaration declaration,
struct d3d8_device device,
const DWORD elements,
DWORD  shader_handle 
)

Definition at line 335 of file vertexdeclaration.c.

337 {
338  struct wined3d_vertex_element *wined3d_elements;
339  UINT wined3d_element_count;
340  HRESULT hr;
341 
342  declaration->shader_handle = shader_handle;
343 
344  wined3d_element_count = convert_to_wined3d_declaration(elements, &declaration->elements_size, &wined3d_elements);
345  if (!(declaration->elements = heap_alloc(declaration->elements_size)))
346  {
347  ERR("Failed to allocate vertex declaration elements memory.\n");
348  heap_free(wined3d_elements);
349  return E_OUTOFMEMORY;
350  }
351 
352  memcpy(declaration->elements, elements, declaration->elements_size);
353 
355  hr = wined3d_vertex_declaration_create(device->wined3d_device, wined3d_elements, wined3d_element_count,
356  declaration, &d3d8_vertexdeclaration_wined3d_parent_ops, &declaration->wined3d_vertex_declaration);
358  heap_free(wined3d_elements);
359  if (FAILED(hr))
360  {
361  WARN("Failed to create wined3d vertex declaration, hr %#x.\n", hr);
362  heap_free(declaration->elements);
363  return hr;
364  }
365 
366  return D3D_OK;
367 }
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:360
HRESULT CDECL wined3d_vertex_declaration_create(struct wined3d_device *device, const struct wined3d_vertex_element *elements, UINT element_count, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration)
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
Definition: devices.h:37
static const struct wined3d_parent_ops d3d8_vertexdeclaration_wined3d_parent_ops
LONG HRESULT
Definition: typedefs.h:77
unsigned int UINT
Definition: ndis.h:50
static UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size, struct wined3d_vertex_element **wined3d_elements)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ERR(fmt,...)
Definition: debug.h:109
#define D3D_OK
Definition: d3d.h:106
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:365
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by d3d8_vertexshader_create_vertexdeclaration().

◆ d3d8_vertex_declaration_init_fvf()

HRESULT d3d8_vertex_declaration_init_fvf ( struct d3d8_vertex_declaration declaration,
struct d3d8_device device,
DWORD  fvf 
)

Definition at line 369 of file vertexdeclaration.c.

371 {
372  HRESULT hr;
373 
374  declaration->elements = NULL;
375  declaration->elements_size = 0;
376  declaration->shader_handle = fvf;
377 
379  &d3d8_vertexdeclaration_wined3d_parent_ops, &declaration->wined3d_vertex_declaration);
380  if (FAILED(hr))
381  {
382  WARN("Failed to create wined3d vertex declaration, hr %#x.\n", hr);
383  return hr;
384  }
385 
386  return D3D_OK;
387 }
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
Definition: devices.h:37
HRESULT CDECL wined3d_vertex_declaration_create_from_fvf(struct wined3d_device *device, DWORD fvf, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration)
smooth NULL
Definition: ftsmooth.c:416
static const struct wined3d_parent_ops d3d8_vertexdeclaration_wined3d_parent_ops
LONG HRESULT
Definition: typedefs.h:77
#define D3D_OK
Definition: d3d.h:106

Referenced by d3d8_device_get_fvf_declaration().

◆ d3d8_vertexdeclaration_wined3d_object_destroyed()

static void STDMETHODCALLTYPE d3d8_vertexdeclaration_wined3d_object_destroyed ( void parent)
static

Definition at line 314 of file vertexdeclaration.c.

315 {
317  heap_free(declaration->elements);
319 }
r parent
Definition: btrfs.c:2659
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ debug_d3dvsde_register()

static const char* debug_d3dvsde_register ( D3DVSDE_REGISTER  d3dvsde_register)
static

Definition at line 49 of file vertexdeclaration.c.

50 {
51  switch (d3dvsde_register)
52  {
53 #define D3DVSDE_REGISTER_TO_STR(u) case u: return #u
71 #undef D3DVSDE_REGISTER_TO_STR
72  default:
73  FIXME("Unrecognized D3DVSDE_REGISTER %#x\n", d3dvsde_register);
74  return "unrecognized";
75  }
76 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define D3DVSDE_REGISTER_TO_STR(u)

Referenced by parse_token().

◆ debug_d3dvsdt_type()

static const char* debug_d3dvsdt_type ( D3DVSDT_TYPE  d3dvsdt_type)
static

Definition at line 29 of file vertexdeclaration.c.

30 {
31  switch (d3dvsdt_type)
32  {
33 #define D3DVSDT_TYPE_TO_STR(u) case u: return #u
42 #undef D3DVSDT_TYPE_TO_STR
43  default:
44  FIXME("Unrecognized D3DVSDT_TYPE %#x\n", d3dvsdt_type);
45  return "unrecognized";
46  }
47 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define D3DVSDT_TYPE_TO_STR(u)

Referenced by parse_token().

◆ load_local_constants()

void load_local_constants ( const DWORD d3d8_elements,
struct wined3d_shader wined3d_vertex_shader 
)

Definition at line 152 of file vertexdeclaration.c.

153 {
154  const DWORD *token = d3d8_elements;
155 
156  while (*token != D3DVSD_END())
157  {
159  {
162  HRESULT hr;
163 
164  if (TRACE_ON(d3d8))
165  {
166  DWORD i;
167  for (i = 0; i < count; ++i)
168  {
169  TRACE("c[%u] = (%8f, %8f, %8f, %8f)\n",
170  constant_idx,
171  *(const float *)(token + i * 4 + 1),
172  *(const float *)(token + i * 4 + 2),
173  *(const float *)(token + i * 4 + 3),
174  *(const float *)(token + i * 4 + 4));
175  }
176  }
178  constant_idx, (const float *)token + 1, count);
179  if (FAILED(hr)) ERR("Failed setting shader constants\n");
180  }
181 
182  token += parse_token(token);
183  }
184 }
HRESULT hr
Definition: shlfolder.c:183
#define D3DVSD_CONSTADDRESSMASK
Definition: d3d8types.h:254
#define D3DVSD_TOKENTYPEMASK
Definition: d3d8types.h:266
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define D3DVSD_CONSTCOUNTMASK
Definition: d3d8types.h:263
#define D3DVSD_END()
Definition: d3d8types.h:275
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
HRESULT CDECL wined3d_shader_set_local_constants_float(struct wined3d_shader *shader, UINT start_idx, const float *src_data, UINT count)
Definition: shader.c:3468
size_t parse_token(const DWORD *pToken)
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define D3DVSD_TOKENTYPESHIFT
Definition: d3d8types.h:252
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ERR(fmt,...)
Definition: debug.h:109
#define TRACE_ON(x)
Definition: compat.h:65
#define D3DVSD_CONSTCOUNTSHIFT
Definition: d3d8types.h:249
#define D3DVSD_CONSTADDRESSSHIFT
Definition: d3d8types.h:240

Referenced by d3d8_vertex_shader_init().

◆ parse_token()

size_t parse_token ( const DWORD pToken)

Definition at line 78 of file vertexdeclaration.c.

79 {
80  const DWORD token = *pToken;
81  size_t tokenlen = 1;
82 
83  switch ((token & D3DVSD_TOKENTYPEMASK) >> D3DVSD_TOKENTYPESHIFT) { /* maybe a macro to inverse ... */
84  case D3DVSD_TOKEN_NOP:
85  TRACE(" 0x%08x NOP()\n", token);
86  break;
87 
90  {
91  TRACE(" 0x%08x STREAM_TESS()\n", token);
92  } else {
93  TRACE(" 0x%08x STREAM(%u)\n", token, ((token & D3DVSD_STREAMNUMBERMASK) >> D3DVSD_STREAMNUMBERSHIFT));
94  }
95  break;
96 
98  if (token & 0x10000000)
99  {
100  TRACE(" 0x%08x SKIP(%u)\n", token, ((token & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT));
101  } else {
104  TRACE(" 0x%08x REG(%s, %s)\n", token, debug_d3dvsde_register(reg), debug_d3dvsdt_type(type));
105  }
106  break;
107 
109  if (token & 0x10000000)
110  {
113  TRACE(" 0x%08x TESSUV(%s) as %s\n", token, debug_d3dvsde_register(reg), debug_d3dvsdt_type(type));
114  } else {
118  TRACE(" 0x%08x TESSNORMAL(%s, %s) as %s\n", token, debug_d3dvsde_register(regin),
120  }
121  break;
122 
124  {
126  tokenlen = (4 * count) + 1;
127  }
128  break;
129 
130  case D3DVSD_TOKEN_EXT:
131  {
134  TRACE(" 0x%08x EXT(%u, %u)\n", token, count, extinfo);
135  /* todo ... print extension */
136  tokenlen = count + 1;
137  }
138  break;
139 
140  case D3DVSD_TOKEN_END:
141  TRACE(" 0x%08x END()\n", token);
142  break;
143 
144  default:
145  TRACE(" 0x%08x UNKNOWN\n", token);
146  /* arg error */
147  }
148 
149  return tokenlen;
150 }
#define D3DVSD_EXTINFOMASK
Definition: d3d8types.h:255
#define D3DVSD_STREAMNUMBERSHIFT
Definition: d3d8types.h:242
#define D3DVSD_DATATYPESHIFT
Definition: d3d8types.h:245
#define D3DVSD_TOKENTYPEMASK
Definition: d3d8types.h:266
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define D3DVSD_CONSTCOUNTMASK
Definition: d3d8types.h:263
#define D3DVSD_STREAMNUMBERMASK
Definition: d3d8types.h:256
#define D3DVSD_SKIPCOUNTMASK
Definition: d3d8types.h:260
#define D3DVSD_SKIPCOUNTSHIFT
Definition: d3d8types.h:246
#define D3DVSD_VERTEXREGMASK
Definition: d3d8types.h:257
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DVSD_TOKENTYPESHIFT
Definition: d3d8types.h:252
unsigned long DWORD
Definition: ntddk_ex.h:95
#define D3DVSD_VERTEXREGSHIFT
Definition: d3d8types.h:243
#define D3DVSD_VERTEXREGINSHIFT
Definition: d3d8types.h:247
#define D3DVSD_VERTEXREGINMASK
Definition: d3d8types.h:262
#define D3DVSD_EXTINFOSHIFT
Definition: d3d8types.h:241
#define D3DVSD_DATATYPEMASK
Definition: d3d8types.h:259
static int reg
Definition: i386-dis.c:1275
static const char * debug_d3dvsdt_type(D3DVSDT_TYPE d3dvsdt_type)
#define D3DVSD_STREAMTESSMASK
Definition: d3d8types.h:265
#define D3DVSD_CONSTCOUNTSHIFT
Definition: d3d8types.h:249
static const char * debug_d3dvsde_register(D3DVSDE_REGISTER d3dvsde_register)

Referenced by convert_to_wined3d_declaration(), d3d8_vertex_shader_init(), and load_local_constants().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( d3d8  )

Variable Documentation

◆ d3d8_vertexdeclaration_wined3d_parent_ops

const struct wined3d_parent_ops d3d8_vertexdeclaration_wined3d_parent_ops
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d8_vertexdeclaration_wined3d_object_destroyed(void *parent)

Definition at line 330 of file vertexdeclaration.c.

Referenced by d3d8_vertex_declaration_init(), and d3d8_vertex_declaration_init_fvf().

◆ usage

Definition at line 231 of file vertexdeclaration.c.

Referenced by append_decl_element().

◆ usage_idx

◆ wined3d_format_lookup

enum wined3d_format_id wined3d_format_lookup[]
static

◆ wined3d_type_sizes

const size_t wined3d_type_sizes[]
static
Initial value:
=
{
1 * sizeof(float),
2 * sizeof(float),
3 * sizeof(float),
4 * sizeof(float),
4 * sizeof(BYTE),
4 * sizeof(BYTE),
2 * sizeof(short int),
4 * sizeof(short int),
4 * sizeof(BYTE),
2 * sizeof(short int),
4 * sizeof(short int),
2 * sizeof(short int),
4 * sizeof(short int),
3 * sizeof(short int),
3 * sizeof(short int),
2 * sizeof(short int),
4 * sizeof(short int)
}
unsigned char BYTE
Definition: mem.h:68
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29

Definition at line 187 of file vertexdeclaration.c.

Referenced by convert_to_wined3d_declaration().

◆ wined3d_usage_lookup