32#define WINED3D_BUFFER_HASDESC 0x01
33#define WINED3D_BUFFER_USE_BO 0x02
34#define WINED3D_BUFFER_PIN_SYSMEM 0x04
35#define WINED3D_BUFFER_DISCARD 0x08
36#define WINED3D_BUFFER_APPLESYNC 0x10
38#define VB_MAXDECLCHANGES 100
39#define VB_RESETDECLCHANGE 1000
40#define VB_MAXFULLCONVERSIONS 5
41#define VB_RESETFULLCONVS 20
47 TRACE(
"Not evicting system memory for buffer %p.\n",
buffer);
51 TRACE(
"Evicting system memory for buffer %p.\n",
buffer);
63 WARN(
"Invalid range specified, invalidating entire buffer.\n");
70 ERR(
"Failed to allocate maps array, invalidating entire buffer.\n");
80 buffer->modified_areas = 1;
81 buffer->maps[0].offset = 0;
87 This->modified_areas = 0;
92 return !!
buffer->modified_areas;
97 return buffer->modified_areas == 1
116 TRACE(
"buffer %p, location %s, offset %u, size %u.\n",
127 ERR(
"Buffer %p does not have any up to date location.\n",
buffer);
147 if (!
buffer->buffer_object)
173 if (
context->transform_feedback_active)
178 WARN(
"Deleting buffer object for buffer %p, disabling transform feedback.\n",
buffer);
186 buffer->buffer_object = 0;
193 buffer->flags &= ~WINED3D_BUFFER_APPLESYNC;
203 TRACE(
"Creating an OpenGL buffer object for wined3d_buffer %p with usage %s.\n",
237 TRACE(
"Buffer has WINED3DUSAGE_DYNAMIC set.\n");
258 buffer->buffer_object_usage = gl_usage;
265 ERR(
"Failed to create a buffer object. Continuing, but performance issues may occur.\n");
266 buffer->flags &= ~WINED3D_BUFFER_USE_BO;
288 FIXME(
"%s used with stride 0, let's hope we get the vertex stride from somewhere else.\n",
291 else if (attrib->
stride != *stride_this_run && *stride_this_run)
293 FIXME(
"Got two concurrent strides, %d and %d.\n", attrib->
stride, *stride_this_run);
297 *stride_this_run = attrib->
stride;
298 if (
buffer->stride != *stride_this_run)
303 TRACE(
"Reconverting because converted attributes occur, and the stride changed.\n");
304 buffer->stride = *stride_this_run;
312 for (
i = 0;
i <
format->attribute_size; ++
i)
315 if (
buffer->conversion_map[
idx] != conversion_type)
317 TRACE(
"Byte %lu in vertex changed:\n",
idx);
318 TRACE(
" It was type %#x, is %#x now.\n",
buffer->conversion_map[
idx], conversion_type);
320 buffer->conversion_map[
idx] = conversion_type;
327#define WINED3D_BUFFER_FIXUP_D3DCOLOR 0x01
328#define WINED3D_BUFFER_FIXUP_XYZRHW 0x02
340 if (!(si->
use_map & (1u << attrib_idx))
360 else if (
This->conversion_map)
371 UINT stride_this_run = 0;
385 TRACE(
"No fixup required.\n");
386 if(
This->conversion_map)
397 TRACE(
"Finding vertex buffer conversion information\n");
444 fixup_flags, &stride_this_run) ||
ret;
445 fixup_flags &= ~WINED3D_BUFFER_FIXUP_XYZRHW;
448 fixup_flags, &stride_this_run) ||
ret;
450 fixup_flags, &stride_this_run) ||
ret;
452 fixup_flags, &stride_this_run) ||
ret;
454 fixup_flags, &stride_this_run) ||
ret;
456 fixup_flags, &stride_this_run) ||
ret;
458 fixup_flags, &stride_this_run) ||
ret;
460 fixup_flags, &stride_this_run) ||
ret;
462 fixup_flags, &stride_this_run) ||
ret;
464 fixup_flags, &stride_this_run) ||
ret;
466 fixup_flags, &stride_this_run) ||
ret;
468 fixup_flags, &stride_this_run) ||
ret;
470 fixup_flags, &stride_this_run) ||
ret;
472 fixup_flags, &stride_this_run) ||
ret;
474 if (!stride_this_run &&
This->conversion_map)
478 ERR(
"no converted attributes found, old conversion map exists, and no declaration change?\n");
484 if (
ret)
TRACE(
"Conversion information changed\n");
491 DWORD src_color = *dst_color;
503 *dst_color |= (src_color & 0xff00ff00u);
504 *dst_color |= (src_color & 0x00ff0000u) >> 16;
505 *dst_color |= (src_color & 0x000000ffu) << 16;
507 return sizeof(*dst_color);
513 if (
p->w != 1.0f &&
p->w != 0.0f)
515 float w = 1.0f /
p->w;
529 TRACE(
"%p increasing refcount to %u.\n",
buffer, refcount);
536 const void *
data,
unsigned int data_offset,
unsigned int range_count,
const struct wined3d_map_range *ranges)
543 while (range_count--)
545 range = &ranges[range_count];
559 ERR(
"Failed to load system memory.\n");
569 ERR(
"Out of memory.\n");
573 for (range_idx = 0; range_idx <
buffer->modified_areas; ++range_idx)
583 switch (
buffer->conversion_map[
j])
596 FIXME(
"Unimplemented conversion %d in shifted conversion.\n",
buffer->conversion_map[
j]);
614 if (
buffer->resource.heap_memory)
619 ERR(
"Failed to allocate system memory.\n");
625 if (
buffer->buffer_object)
630 WARN(
"Trying to create BO for buffer %p with no WINED3D_BUFFER_USE_BO.\n",
buffer);
646 TRACE(
"buffer %p, context %p, location %s.\n",
657 ERR(
"Buffer %p does not have any up to date location.\n",
buffer);
669 TRACE(
"Buffer previously discarded, nothing to do.\n");
680 buffer->resource.heap_memory));
685 if (!
buffer->conversion_map)
710 return buffer->resource.heap_memory;
716 TRACE(
"buffer %p, data %p, locations %s.\n",
727 data->buffer_object = 0;
733 data->buffer_object = 0;
744 if (
buffer->buffer_object)
760 buffer->conversion_stride = 0;
761 buffer->flags &= ~WINED3D_BUFFER_HASDESC;
769 buffer->flags &= ~WINED3D_BUFFER_USE_BO;
778 if (
buffer->buffer_object)
795 TRACE(
"%p decreasing refcount to %u.\n",
buffer, refcount);
799 buffer->resource.parent_ops->wined3d_object_destroyed(
buffer->resource.parent);
811 return buffer->resource.parent;
839 FIXME(
"Fences not supported, dropping async buffer locks.\n");
841 ERR(
"Failed to create fence, hr %#x.\n",
hr);
846 gl_info->gl_ops.gl.p_glFinish();
860 WARN(
"Cannot synchronize buffer lock due to a thread conflict.\n");
864 ERR(
"wined3d_fence_wait() returned %u, dropping async buffer locks.\n",
ret);
875 gl_info->gl_ops.gl.p_glFinish();
877 checkGLcall(
"glBufferParameteriAPPLE(buffer->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_TRUE)");
878 buffer->flags &= ~WINED3D_BUFFER_APPLESYNC;
883 buffer->flags &= ~WINED3D_BUFFER_DISCARD;
895 if (
buffer->resource.map_count)
897 WARN(
"Buffer is mapped, skipping preload.\n");
912 ERR(
"Failed to prepare buffer location.\n");
920 DWORD fixup_flags = 0;
926 if (!
context->d3d_info->xyzrhw)
938 buffer->decl_change_count = 0;
940 buffer->full_conversion_count = 0;
950 ++
buffer->decl_change_count;
956 FIXME(
"Too many declaration changes or converting dynamic buffer, stopping converting.\n");
962 WARN(
"Reloading buffer because of a vertex declaration change.\n");
973 ++
buffer->full_conversion_count;
976 FIXME(
"Too many full buffer conversions, stopping converting.\n");
985 buffer->decl_change_count = 0;
987 buffer->full_conversion_count = 0;
992 ERR(
"Failed to load buffer location.\n");
1013 if (
buffer->buffer_object)
1015 unsigned int dirty_offset =
offset, dirty_size =
size;
1071 flags &= ~WINED3D_MAP_DISCARD;
1077 0,
buffer->resource.size, mapflags));
1103 TRACE(
"Dynamic buffer, dropping VBO.\n");
1108 TRACE(
"Falling back to doublebuffered operation.\n");
1112 TRACE(
"New pointer is %p.\n",
buffer->resource.heap_memory);
1142 if (!
buffer->resource.map_count)
1144 WARN(
"Unmap called without a previous map call.\n");
1148 if (--
buffer->resource.map_count)
1151 TRACE(
"Ignoring unmap.\n");
1168 for (
i = 0;
i <
buffer->modified_areas; ++
i)
1177 for (
i = 0;
i <
buffer->modified_areas; ++
i)
1187 gl_info->gl_ops.gl.p_glFlush();
1206 dst.addr += dst_offset;
1209 src.addr += src_offset;
1263 if (sub_resource_idx)
1265 WARN(
"Invalid sub_resource_idx %u.\n", sub_resource_idx);
1288 if (sub_resource_idx)
1290 WARN(
"Invalid sub_resource_idx %u.\n", sub_resource_idx);
1303 if (sub_resource_idx)
1305 WARN(
"Invalid sub_resource_idx %u.\n", sub_resource_idx);
1325 unsigned int bind_flags)
1341 FIXME(
"Unhandled bind flags %#x.\n", bind_flags);
1352 BOOL dynamic_buffer_ok;
1357 WARN(
"Size 0 requested, returning E_INVALIDARG.\n");
1363 WARN(
"Size %#x is not suitably aligned for constant buffers.\n",
size);
1369 WARN(
"Invalid sub-resource data specified.\n");
1376 WARN(
"Failed to initialize resource, hr %#x.\n",
hr);
1380 buffer->bind_flags = bind_flags;
1383 TRACE(
"buffer %p, size %#x, usage %#x, format %s, memory @ %p.\n",
1393 TRACE(
"Using doublebuffer mode.\n");
1404 TRACE(
"Not creating a BO because GL_ARB_vertex_buffer is not supported.\n");
1408 TRACE(
"Not creating a BO because the buffer is not GPU accessible.\n");
1412 TRACE(
"Not creating a BO because the buffer has dynamic usage and no GL support.\n");
1421 ERR(
"Out of memory.\n");
1443 TRACE(
"device %p, desc %p, data %p, parent %p, parent_ops %p, buffer %p.\n",
1446 if (!(
object = heap_alloc_zero(
sizeof(*
object))))
1452 WARN(
"Failed to initialize buffer, hr %#x.\n",
hr);
1456 object->desc = *
desc;
1458 TRACE(
"Created buffer %p.\n",
object);
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void wined3d_cs_destroy_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
static unsigned int fixup_transformed_pos(struct wined3d_vec4 *p)
#define WINED3D_BUFFER_FIXUP_D3DCOLOR
static void wined3d_buffer_destroy_object(void *object)
static void buffer_sync_apple(struct wined3d_buffer *buffer, DWORD flags, const struct wined3d_gl_info *gl_info)
DWORD wined3d_buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_bo_address *data, DWORD locations)
static void wined3d_buffer_evict_sysmem(struct wined3d_buffer *buffer)
static BOOL buffer_is_fully_dirty(const struct wined3d_buffer *buffer)
static BOOL wined3d_buffer_prepare_location(struct wined3d_buffer *buffer, struct wined3d_context *context, DWORD location)
BYTE * wined3d_buffer_load_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context)
static void buffer_clear_dirty_areas(struct wined3d_buffer *This)
static void wined3d_buffer_upload_ranges(struct wined3d_buffer *buffer, struct wined3d_context *context, const void *data, unsigned int data_offset, unsigned int range_count, const struct wined3d_map_range *ranges)
static void buffer_resource_preload(struct wined3d_resource *resource)
static BOOL buffer_is_dirty(const struct wined3d_buffer *buffer)
#define VB_RESETFULLCONVS
void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state)
static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UINT size, BYTE **data, DWORD flags)
static void wined3d_buffer_drop_bo(struct wined3d_buffer *buffer)
void wined3d_buffer_upload_data(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_box *box, const void *data)
static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct wined3d_stream_info *si, const struct wined3d_state *state, UINT attrib_idx, DWORD fixup_flags, DWORD *stride_this_run)
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)
static BOOL buffer_create_buffer_object(struct wined3d_buffer *buffer, struct wined3d_context *context)
static unsigned int fixup_d3dcolor(DWORD *dst_color)
static ULONG buffer_resource_decref(struct wined3d_resource *resource)
#define VB_MAXFULLCONVERSIONS
static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
#define WINED3D_BUFFER_PIN_SYSMEM
void *CDECL wined3d_buffer_get_parent(const struct wined3d_buffer *buffer)
#define WINED3D_BUFFER_DISCARD
static void buffer_destroy_buffer_object(struct wined3d_buffer *buffer, struct wined3d_context *context)
ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer)
static BOOL buffer_process_converted_attribute(struct wined3d_buffer *buffer, const enum wined3d_buffer_conversion_type conversion_type, const struct wined3d_stream_info_element *attrib, DWORD *stride_this_run)
ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer)
static void wined3d_buffer_unmap(struct wined3d_buffer *buffer)
#define WINED3D_BUFFER_APPLESYNC
static HRESULT buffer_resource_sub_resource_map_info(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_info *info, DWORD flags)
static const struct wined3d_resource_ops buffer_resource_ops
#define VB_RESETDECLCHANGE
#define WINED3D_BUFFER_FIXUP_XYZRHW
#define WINED3D_BUFFER_HASDESC
static BOOL buffer_find_decl(struct wined3d_buffer *This, const struct wined3d_stream_info *si, const struct wined3d_state *state, DWORD fixup_flags)
static void buffer_bind(struct wined3d_buffer *buffer, struct wined3d_context *context)
struct wined3d_resource *CDECL wined3d_buffer_get_resource(struct wined3d_buffer *buffer)
static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
static void wined3d_buffer_invalidate_range(struct wined3d_buffer *buffer, DWORD location, unsigned int offset, unsigned int size)
static void buffer_invalidate_bo_range(struct wined3d_buffer *buffer, unsigned int offset, unsigned int size)
static void wined3d_buffer_validate_location(struct wined3d_buffer *buffer, DWORD location)
void wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset, struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size)
static ULONG buffer_resource_incref(struct wined3d_resource *resource)
static void buffer_mark_used(struct wined3d_buffer *buffer)
BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer, struct wined3d_context *context, DWORD location)
static void buffer_unload(struct wined3d_resource *resource)
#define VB_MAXDECLCHANGES
static void buffer_conversion_upload(struct wined3d_buffer *buffer, struct wined3d_context *context)
#define WINED3D_BUFFER_USE_BO
void wined3d_buffer_invalidate_location(struct wined3d_buffer *buffer, DWORD location)
static GLenum buffer_type_hint_from_bind_flags(const struct wined3d_gl_info *gl_info, unsigned int bind_flags)
void context_bind_bo(struct wined3d_context *context, GLenum binding, GLuint name)
struct wined3d_context * context_acquire(const struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
void context_end_transform_feedback(struct wined3d_context *context)
void context_copy_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *dst, GLenum dst_binding, const struct wined3d_bo_address *src, GLenum src_binding, size_t size)
void context_release(struct wined3d_context *context)
void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int depth_pitch)
void device_invalidate_state(const struct wined3d_device *device, DWORD state)
void wined3d_fence_destroy(struct wined3d_fence *fence)
enum wined3d_fence_result wined3d_fence_wait(const struct wined3d_fence *fence, const struct wined3d_device *device)
HRESULT wined3d_fence_create(struct wined3d_device *device, struct wined3d_fence **fence)
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device, enum wined3d_resource_type type, const struct wined3d_format *format, enum wined3d_multisample_type multisample_type, unsigned int multisample_quality, unsigned int usage, unsigned int access, unsigned int width, unsigned int height, unsigned int depth, unsigned int size, void *parent, const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops)
void wined3d_resource_free_sysmem(struct wined3d_resource *resource)
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags)
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource)
void resource_cleanup(struct wined3d_resource *resource)
void resource_unload(struct wined3d_resource *resource)
const struct wined3d_format * wined3d_get_format(const struct wined3d_gl_info *gl_info, enum wined3d_format_id format_id, unsigned int resource_usage)
const char * debug_d3dformat(enum wined3d_format_id format_id)
const char * debug_d3dusage(DWORD usage)
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
const char * debug_glerror(GLenum error)
const char * wined3d_debug_location(DWORD location)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define GL_BUFFER_SERIALIZED_MODIFY_APPLE
#define GL_UNIFORM_BUFFER
GLsizei const GLint * locations
#define GL_TEXTURE_BUFFER
GLuint GLint GLboolean GLint GLenum access
#define GL_TRANSFORM_FEEDBACK_BUFFER
#define GL_BUFFER_FLUSHING_UNMAP_APPLE
#define GL_ELEMENT_ARRAY_BUFFER
GLubyte GLubyte GLubyte GLubyte w
#define GL_STREAM_DRAW_ARB
GLsizeiptr const GLvoid GLenum usage
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
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 GLint GLint j
#define location(file, line)
#define memcpy(s1, s2, n)
static const WCHAR desc[]
static void * heap_calloc(SIZE_T count, SIZE_T size)
struct wined3d_resource resource
const struct wined3d_gl_info * gl_info
unsigned int sub_resource_idx
BOOL supported[WINED3D_GL_EXT_COUNT]
struct opengl_funcs gl_ops
BOOL strict_draw_ordering
const struct wined3d_format * format
struct wined3d_bo_address data
DWORD position_transformed
struct wined3d_stream_info_element elements[MAX_ATTRIBS]
@ WINED3D_MULTISAMPLE_NONE
#define WINED3D_BIND_VERTEX_BUFFER
#define WINED3D_RESOURCE_ACCESS_GPU
#define WINED3D_BIND_UNORDERED_ACCESS
#define WINED3DERR_NOTAVAILABLE
#define WINED3D_BIND_SHADER_RESOURCE
@ WINED3DFMT_B8G8R8A8_UNORM
@ WINED3DFMT_R32G32B32A32_FLOAT
#define WINED3D_MAP_DISCARD
#define WINED3D_MAP_WRITE
#define WINED3D_MAP_NOOVERWRITE
#define WINED3DCREATE_SOFTWARE_VERTEXPROCESSING
#define WINED3DUSAGE_DYNAMIC
#define WINED3DUSAGE_STATICDECL
#define WINED3D_BIND_CONSTANT_BUFFER
#define WINED3D_BIND_STREAM_OUTPUT
#define WINED3D_BIND_INDEX_BUFFER
@ ARB_TEXTURE_BUFFER_OBJECT
@ APPLE_FLUSH_BUFFER_RANGE
@ ARB_VERTEX_BUFFER_OBJECT
#define WINED3D_CONSTANT_BUFFER_ALIGNMENT
#define STATE_CONSTANT_BUFFER(a)
@ WINED3D_FFP_BLENDWEIGHT
@ WINED3D_FFP_BLENDINDICES
#define WINED3D_LOCATION_SYSMEM
#define STATE_STREAM_OUTPUT
static BOOL use_vs(const struct wined3d_state *state)
#define WINED3D_LOCATION_BUFFER
#define RESOURCE_ALIGNMENT
static BOOL wined3d_resource_access_is_managed(unsigned int access)
wined3d_buffer_conversion_type
@ WINED3D_SHADER_TYPE_HULL
@ WINED3D_SHADER_TYPE_PIXEL
@ WINED3D_SHADER_TYPE_GEOMETRY
@ WINED3D_SHADER_TYPE_DOMAIN
@ WINED3D_SHADER_TYPE_COMPUTE
@ WINED3D_SHADER_TYPE_VERTEX
#define WINED3D_LOCATION_DISCARDED
@ WINED3D_FENCE_WRONG_THREAD
@ WINED3D_FENCE_NOT_STARTED
#define STATE_INDEXBUFFER
static void wined3d_resource_wait_idle(struct wined3d_resource *resource)
static struct wined3d_buffer * buffer_from_resource(struct wined3d_resource *resource)