55 char *instr = (
char *)
buffer->desc.lpData + is;
56 unsigned int i, primitive_size;
61 if (viewport->active_device !=
device)
63 WARN(
"Viewport %p active device is %p.\n",
64 viewport, viewport->active_device);
71 TRACE(
"ExecuteData :\n");
83 instr +=
sizeof(*current);
100 instr +=
sizeof(*p) *
count;
111 unsigned int index_pos =
buffer->index_pos, index_count;
123 index_count =
count * primitive_size;
125 if (
buffer->index_size < index_count)
127 unsigned int new_size =
max(
buffer->index_size * 2, index_count);
131 desc.byte_width = new_size *
sizeof(*indices);
137 desc.structure_byte_stride = 0;
143 buffer->index_size = new_size;
146 buffer->index_buffer = new_buffer;
149 else if (
buffer->index_size - index_count < index_pos)
154 box.left = index_pos *
sizeof(*indices);
155 box.right = (index_pos + index_count) *
sizeof(*
indices);
164 TRACE(
" v1: %d v2: %d v3: %d\n",ci->u1.
v1, ci->u2.
v2, ci->u3.
v3);
170 TRACE(
"EDGEENABLE1 ");
172 TRACE(
"EDGEENABLE2 ");
174 TRACE(
"EDGEENABLE3 ");
187 switch (primitive_size)
190 indices[(
i * primitive_size) + 2] = ci->u3.
v3;
193 indices[(
i * primitive_size) + 1] = ci->u2.
v2;
208 buffer->index_pos = index_pos + index_count;
230 ERR(
"Invalid matrix handle (a %#x -> %p, b %#x -> %p, c %#x -> %p).\n",
235 TRACE(
"dst %p, src1 %p, src2 %p.\n",
a,
b,
c);
253 ERR(
"Invalid matrix handle %#x.\n", ci->u2.
dwArg[0]);
279 WARN(
"Failed to set light state.\n");
293 WARN(
"Failed to set render state.\n");
307 TRACE(
" start %u, dest %u, count %u, flags %#x.\n",
313 if (!once++)
FIXME(
"D3DPROCESSVERTICES_UPDATEEXTENTS not implemented.\n");
316 FIXME(
"D3DPROCESSVERTICES_NOCOLOR not implemented.\n");
347 box.bottom =
box.back = 1;
355 FIXME(
"Unhandled vertex processing op %#x.\n",
op);
443 ERR(
"Unhandled OpCode %#x.\n",
current->bOpcode);
517 if (
buffer->dst_vertex_buffer)
564 TRACE(
"iface %p, desc %p.\n", iface,
desc);
571 TRACE(
" Returning description :\n");
588 TRACE(
"iface %p.\n", iface);
614 TRACE(
"iface %p, data %p.\n", iface,
data);
619 if (
buffer->vertex_size <
data->dwVertexCount)
621 unsigned int new_size =
max(
data->dwVertexCount,
buffer->vertex_size * 2);
630 desc.structure_byte_stride = 0;
647 if (
buffer->dst_vertex_buffer)
652 buffer->src_vertex_buffer = src_buffer;
653 buffer->dst_vertex_buffer = dst_buffer;
654 buffer->vertex_size = new_size;
655 buffer->src_vertex_pos = 0;
657 else if (
buffer->vertex_size -
data->dwVertexCount <
buffer->src_vertex_pos)
659 buffer->src_vertex_pos = 0;
662 if (
data->dwVertexCount)
701 TRACE(
"iface %p, data %p.\n", iface,
data);
708 TRACE(
"Returning data :\n");
731 TRACE(
"iface %p, offset %p, callback %p, context %p, reserved %#x.\n",
734 WARN(
"Not implemented.\n");
756 WARN(
"Not implemented.\n");
779 execute_buffer->
ref = 1;
799 ERR(
"Failed to allocate execute buffer data.\n");
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define IDirect3DDevice3_SetRenderState(p, a, b)
#define IDirect3DDevice3_SetLightState(p, a, b)
#define IDirect3DExecuteBuffer_AddRef(p)
#define IDirect3DTexture2_Load(p, a)
#define IDirect3DDevice3_SetTransform(p, a, b)
struct _D3DVERTEX D3DVERTEX
#define D3DTRIFLAG_EDGEENABLE1
#define D3DPROCESSVERTICES_COPY
#define D3DPROCESSVERTICES_OPMASK
#define D3DPROCESSVERTICES_NOCOLOR
HRESULT(CALLBACK * LPD3DVALIDATECALLBACK)(void *ctx, DWORD offset)
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
HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d_device *device, struct d3d_viewport *viewport)
static ULONG WINAPI d3d_execute_buffer_Release(IDirect3DExecuteBuffer *iface)
static HRESULT WINAPI d3d_execute_buffer_QueryInterface(IDirect3DExecuteBuffer *iface, REFIID iid, void **out)
static HRESULT WINAPI d3d_execute_buffer_Lock(IDirect3DExecuteBuffer *iface, D3DEXECUTEBUFFERDESC *desc)
HRESULT d3d_execute_buffer_init(struct d3d_execute_buffer *execute_buffer, struct d3d_device *device, D3DEXECUTEBUFFERDESC *desc)
static HRESULT WINAPI d3d_execute_buffer_SetExecuteData(IDirect3DExecuteBuffer *iface, D3DEXECUTEDATA *data)
static struct d3d_execute_buffer * impl_from_IDirect3DExecuteBuffer(IDirect3DExecuteBuffer *iface)
static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc)
static HRESULT WINAPI d3d_execute_buffer_Unlock(IDirect3DExecuteBuffer *iface)
static void _dump_executedata(const D3DEXECUTEDATA *lpData)
static HRESULT WINAPI d3d_execute_buffer_Initialize(IDirect3DExecuteBuffer *iface, IDirect3DDevice *device, D3DEXECUTEBUFFERDESC *desc)
struct d3d_execute_buffer * unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExecuteBuffer *iface)
static HRESULT WINAPI d3d_execute_buffer_Validate(IDirect3DExecuteBuffer *iface, DWORD *offset, LPD3DVALIDATECALLBACK callback, void *context, DWORD reserved)
static HRESULT WINAPI d3d_execute_buffer_GetExecuteData(IDirect3DExecuteBuffer *iface, D3DEXECUTEDATA *data)
static const struct IDirect3DExecuteBufferVtbl d3d_execute_buffer_vtbl
static HRESULT WINAPI d3d_execute_buffer_Optimize(IDirect3DExecuteBuffer *iface, DWORD reserved)
static ULONG WINAPI d3d_execute_buffer_AddRef(IDirect3DExecuteBuffer *iface)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
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
#define memcpy(s1, s2, n)
struct task_struct * current
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static IPrintDialogCallback callback
static const WCHAR desc[]
#define IsEqualGUID(rguid1, rguid2)
#define DDERR_OUTOFMEMORY
#define DDERR_UNSUPPORTED
#define DDERR_INVALIDPARAMS
DWORD dwInstructionOffset
DWORD dwInstructionLength
D3DMATRIXHANDLE hDestMatrix
D3DMATRIXHANDLE hSrcMatrix1
D3DMATRIXHANDLE hSrcMatrix2
D3DLIGHTSTATETYPE dlstLightStateType
D3DTRANSFORMSTATETYPE dtstTransformStateType
D3DRENDERSTATETYPE drstRenderStateType
D3DTEXTUREHANDLE hSrcTexture
D3DTEXTUREHANDLE hDestTexture
IDirect3DExecuteBuffer IDirect3DExecuteBuffer_iface
D3DEXECUTEBUFFERDESC desc
struct d3d_device * d3ddev
#define CONTAINING_RECORD(address, type, field)
#define WINED3DUSAGE_WRITEONLY
@ WINED3D_PT_TRIANGLELIST
#define WINED3D_BIND_VERTEX_BUFFER
#define WINED3D_RESOURCE_ACCESS_GPU
#define WINED3D_RESOURCE_ACCESS_CPU
#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