53{
55 char *instr = (
char *)
buffer->desc.lpData + is;
56 unsigned int i, primitive_size;
60
62 {
63 WARN(
"Viewport %p active device is %p.\n",
66 }
67
68
70
71 TRACE(
"ExecuteData :\n");
74
75 for (;;)
76 {
80
83 instr += sizeof(*current);
84 primitive_size = 0;
85
87 {
89 {
96
99
100 instr +=
sizeof(*p) *
count;
101 break;
102 }
103
105 primitive_size = 2;
107
109 {
111 unsigned int index_pos =
buffer->index_pos, index_count;
113
115 break;
116
117 if (!primitive_size)
118 {
120 primitive_size = 3;
121 }
122
123 index_count =
count * primitive_size;
124
125 if (
buffer->index_size < index_count)
126 {
127 unsigned int new_size =
max(
buffer->index_size * 2, index_count);
130
131 desc.byte_width = new_size *
sizeof(*indices);
137 desc.structure_byte_stride = 0;
138
142
143 buffer->index_size = new_size;
146 buffer->index_buffer = new_buffer;
147 index_pos = 0;
148 }
149 else if (
buffer->index_size - index_count < index_pos)
150 {
151 index_pos = 0;
152 }
153
154 box.left = index_pos *
sizeof(*indices);
155 box.right = (index_pos + index_count) *
sizeof(*
indices);
160
162 {
164 TRACE(
" v1: %d v2: %d v3: %d\n",ci->u1.
v1, ci->u2.
v2, ci->u3.
v3);
167 {
168
170 TRACE(
"EDGEENABLE1 ");
172 TRACE(
"EDGEENABLE2 ");
174 TRACE(
"EDGEENABLE3 ");
175
185 }
186
187 switch (primitive_size)
188 {
189 case 3:
190 indices[(
i * primitive_size) + 2] = ci->u3.
v3;
191
192 case 2:
193 indices[(
i * primitive_size) + 1] = ci->u2.
v2;
195 }
197 }
198
200
207
208 buffer->index_pos = index_pos + index_count;
209 break;
210 }
211
215 break;
216
220 {
223
227
229 {
230 ERR(
"Invalid matrix handle (a %#x -> %p, b %#x -> %p, c %#x -> %p).\n",
232 }
233 else
234 {
235 TRACE(
"dst %p, src1 %p, src2 %p.\n",
a,
b,
c);
237 }
238
240 }
241 break;
242
246 {
249
252 {
253 ERR(
"Invalid matrix handle %#x.\n", ci->u2.
dwArg[0]);
254 }
255 else
256 {
265 }
266
268 }
269 break;
270
274 {
276
279 WARN(
"Failed to set light state.\n");
280
282 }
283 break;
284
288 {
290
293 WARN(
"Failed to set render state.\n");
294
296 }
297 break;
298
301
303 {
306
307 TRACE(
" start %u, dest %u, count %u, flags %#x.\n",
309
311 {
312 static int once;
313 if (!once++)
FIXME(
"D3DPROCESSVERTICES_UPDATEEXTENTS not implemented.\n");
314 }
316 FIXME(
"D3DPROCESSVERTICES_NOCOLOR not implemented.\n");
317
319 {
325 {
330 }
331 else
332 {
337 }
338
341 break;
342
347 box.bottom =
box.back = 1;
352 break;
353
354 default:
355 FIXME(
"Unhandled vertex processing op %#x.\n",
op);
356 break;
357 }
358
360 }
361 break;
362
365
367 {
370
372
375 {
377 continue;
378 }
381 {
383 continue;
384 }
385
387 }
388 break;
389
393 goto end_of_buffer;
394
398 {
400
402 {
404 {
408 break;
409 }
410 }
411 }
412 else
413 {
415 {
419 break;
420 }
421 }
422 }
423
425 }
426 break;
427
431 break;
432
436 {
439 }
440 break;
441
442 default:
443 ERR(
"Unhandled OpCode %#x.\n",
current->bOpcode);
445 break;
446 }
447 }
448
449end_of_buffer:
451}
#define IDirect3DDevice3_SetRenderState(p, a, b)
#define IDirect3DDevice3_SetLightState(p, a, b)
#define IDirect3DTexture2_Load(p, a)
#define IDirect3DDevice3_SetTransform(p, a, b)
#define D3DTRIFLAG_EDGEENABLE1
#define D3DPROCESSVERTICES_COPY
#define D3DPROCESSVERTICES_OPMASK
#define D3DPROCESSVERTICES_NOCOLOR
struct _D3DTLVERTEX D3DTLVERTEX
#define D3DPROCESSVERTICES_UPDATEEXTENTS
#define D3DPROCESSVERTICES_TRANSFORMLIGHT
#define D3DPROCESSVERTICES_TRANSFORM
#define D3DTRIFLAG_EDGEENABLE2
void multiply_matrix(D3DMATRIX *dst, const D3DMATRIX *src1, const D3DMATRIX *src2) DECLSPEC_HIDDEN
void viewport_activate(struct d3d_viewport *viewport, BOOL ignore_lights) DECLSPEC_HIDDEN
void * ddraw_get_object(struct ddraw_handle_table *t, DWORD handle, enum ddraw_handle_type type) DECLSPEC_HIDDEN
struct wined3d_vertex_declaration * ddraw_find_decl(struct ddraw *This, DWORD fvf)
const struct wined3d_parent_ops ddraw_null_wined3d_parent_ops
HRESULT CDECL wined3d_buffer_create(struct wined3d_device *device, const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer)
ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer)
struct wined3d_resource *CDECL wined3d_buffer_get_resource(struct wined3d_buffer *buffer)
void CDECL wined3d_device_set_vertex_declaration(struct wined3d_device *device, struct wined3d_vertex_declaration *declaration)
HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count)
HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *device, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box)
HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device, UINT src_start_idx, UINT dst_idx, UINT vertex_count, struct wined3d_buffer *dst_buffer, const struct wined3d_vertex_declaration *declaration, DWORD flags, DWORD dst_fvf)
void CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT start_vertex, UINT vertex_count)
void CDECL wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, DWORD value)
void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device, enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count)
HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride)
HRESULT CDECL wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
#define D3DTRANSFORMSTATE_WORLD
#define D3DTRANSFORMSTATE_VIEW
#define D3DTRANSFORMSTATE_PROJECTION
static void _dump_executedata(const D3DEXECUTEDATA *lpData)
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum const GLvoid * indices
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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
struct task_struct * current
static const WCHAR desc[]
#define DDERR_INVALIDPARAMS
D3DMATRIXHANDLE hDestMatrix
D3DMATRIXHANDLE hSrcMatrix1
D3DMATRIXHANDLE hSrcMatrix2
D3DLIGHTSTATETYPE dlstLightStateType
D3DTRANSFORMSTATETYPE dtstTransformStateType
D3DRENDERSTATETYPE drstRenderStateType
D3DTEXTUREHANDLE hSrcTexture
D3DTEXTUREHANDLE hDestTexture
struct d3d_device * active_device
#define WINED3DUSAGE_WRITEONLY
@ WINED3D_PT_TRIANGLELIST
#define WINED3D_RESOURCE_ACCESS_GPU
#define WINED3D_RESOURCE_ACCESS_MAP_R
#define WINED3D_MAP_DISCARD
#define WINED3D_MAP_WRITE
#define WINED3D_MAP_NOOVERWRITE
#define WINED3DUSAGE_DYNAMIC
#define WINED3DUSAGE_STATICDECL
#define WINED3D_BIND_INDEX_BUFFER
#define WINED3D_RESOURCE_ACCESS_MAP_W