31#define WINED3D_BUFFER_HASDESC 0x01
32#define WINED3D_BUFFER_USE_BO 0x02
34#define SB_MIN_SIZE (512 * 1024)
46 if (
buffer->resource.pin_sysmem)
48 TRACE(
"Not evicting system memory for buffer %p.\n",
buffer);
52 TRACE(
"Evicting system memory for buffer %p.\n",
buffer);
64 WARN(
"Invalid range specified, invalidating entire buffer.\n");
69 buffer->dirty_range_count + 1,
sizeof(*
buffer->dirty_ranges)))
71 ERR(
"Failed to allocate dirty ranges array, invalidating entire buffer.\n");
77 ++
buffer->dirty_range_count;
81 buffer->dirty_range_count = 1;
82 buffer->dirty_ranges[0].offset = 0;
88 buffer->dirty_range_count = 0;
93 return !!
buffer->dirty_range_count;
98 return buffer->dirty_range_count == 1
99 && !
buffer->dirty_ranges[0].offset &&
buffer->dirty_ranges[0].size ==
buffer->resource.size;
117 TRACE(
"buffer %p, location %s, offset %u, size %u.\n",
128 ERR(
"Buffer %p does not have any up to date location.\n",
buffer);
163 FIXME(
"Unhandled bind flags %#x.\n", bind_flags);
175 if (!buffer_gl->
b.buffer_object)
189 WARN(
"Deleting buffer object for buffer %p, disabling transform feedback.\n", buffer_gl);
193 if (buffer_gl->
b.bo_user.valid)
195 buffer_gl->
b.bo_user.valid =
false;
198 if (!--bo_gl->
b.refcount)
203 buffer_gl->
b.buffer_object =
NULL;
215 bool coherent =
true;
219 TRACE(
"Creating an OpenGL buffer object for wined3d buffer %p with usage %s.\n",
222 if (!(bo =
malloc(
sizeof(*bo))))
225 size = buffer_gl->
b.resource.size;
235 ERR(
"Failed to create OpenGL buffer object.\n");
236 buffer_gl->
b.flags &= ~WINED3D_BUFFER_USE_BO;
242 buffer_gl->
b.buffer_object = &bo->
b;
252 TRACE(
"%p increasing refcount to %u.\n",
buffer, refcount);
275 TRACE(
"buffer %p, context %p, location %s.\n",
286 ERR(
"Buffer %p does not have any up to date location.\n",
buffer);
298 TRACE(
"Buffer previously discarded, nothing to do.\n");
315 src.buffer_object =
buffer->buffer_object;
335 dst.buffer_object =
buffer->buffer_object;
344 buffer->dirty_range_count,
buffer->dirty_ranges, map_flags);
365 buffer->resource.pin_sysmem = 1;
366 return buffer->resource.heap_memory;
374 TRACE(
"buffer %p, context %p, data %p, locations %s.\n",
382 data->buffer_object = 0;
395 data->buffer_object = 0;
401 data->buffer_object = 0;
412 if (
buffer->buffer_object)
425 buffer->flags &= ~WINED3D_BUFFER_HASDESC;
433 buffer->flags &= ~WINED3D_BUFFER_USE_BO;
444 if (
buffer->buffer_object)
463 TRACE(
"%p decreasing refcount to %u.\n",
buffer, refcount);
468 buffer->resource.parent_ops->wined3d_object_destroyed(
buffer->resource.parent);
469 buffer->resource.device->adapter->adapter_ops->adapter_destroy_buffer(
buffer);
480 return buffer->resource.parent;
491 FIXME(
"Buffer is mapped through buffer object, not loading.\n");
494 else if (
buffer->resource.map_count)
496 WARN(
"Loading mapped buffer.\n");
504 ERR(
"Failed to prepare buffer location.\n");
517 ERR(
"Failed to load buffer location.\n");
530 if (sub_resource_idx)
532 WARN(
"Invalid sub_resource_idx %u.\n", sub_resource_idx);
538 desc->multisample_quality = 0;
550 unsigned int sub_resource_idx,
unsigned int *row_pitch,
unsigned int *slice_pitch)
559 unsigned int offset,
size, dirty_offset, dirty_size;
566 TRACE(
"resource %p, sub_resource_idx %u, map_ptr %p, box %s, flags %#x.\n",
586 ||
buffer->resource.pin_sysmem
637 if (
context->d3d_info->persistent_map)
652 TRACE(
"Dynamic buffer, dropping VBO.\n");
657 TRACE(
"Falling back to doublebuffered operation.\n");
659 buffer->resource.pin_sysmem = 1;
671 TRACE(
"Returning memory at %p (base %p, offset %u).\n", *map_ptr,
base,
offset);
683 TRACE(
"resource %p, sub_resource_idx %u.\n",
resource, sub_resource_idx);
685 if (sub_resource_idx)
687 WARN(
"Invalid sub_resource_idx %u.\n", sub_resource_idx);
693 WARN(
"Unmap called without a previous map call.\n");
700 TRACE(
"Ignoring unmap.\n");
737 bo_user->
valid =
false;
747 buffer->buffer_object = bo;
756 if (!(bo =
buffer->buffer_object))
763 TRACE(
"Performing copy-on-write for BO %p.\n", bo);
778 dst.buffer_object =
buffer->buffer_object;
780 src.buffer_object = bo;
800 dst_addr.
addr += dst_offset;
814 TRACE(
"dst_buffer %p, dst_offset %u, src_buffer %p, src_offset %u, size %u.\n",
815 dst_buffer, dst_offset, src_buffer, src_offset,
size);
820 src.addr += src_offset;
940 TRACE(
"buffer %p, device %p, desc byte_width %u, usage %s, bind_flags %s, "
941 "access %s, data %p, parent %p, parent_ops %p.\n",
945 if (!
desc->byte_width)
947 WARN(
"Size 0 requested, returning E_INVALIDARG.\n");
953 WARN(
"Size %#x is not suitably aligned for constant buffers.\n",
desc->byte_width);
959 WARN(
"Invalid sub-resource data specified.\n");
971 WARN(
"Failed to initialize resource, hr %#lx.\n",
hr);
974 buffer->buffer_ops = buffer_ops;
975 buffer->structure_byte_stride =
desc->structure_byte_stride;
978 TRACE(
"buffer %p, size %#x, usage %#x, memory @ %p.\n",
987 TRACE(
"Pinning system memory.\n");
988 buffer->resource.pin_sysmem = 1;
999 &
buffer->dirty_ranges_capacity, 1,
sizeof(*
buffer->dirty_ranges)))
1001 ERR(
"Out of memory.\n");
1044 TRACE(
"buffer_no3d %p, device %p, desc %p, data %p, parent %p, parent_ops %p.\n",
1062 if (
buffer->buffer_object)
1067 WARN(
"Trying to create BO for buffer %p with no WINED3D_BUFFER_USE_BO.\n",
buffer);
1107 TRACE(
"buffer_gl %p, device %p, desc %p, data %p, parent %p, parent_ops %p.\n",
1114 TRACE(
"Not creating a BO because the buffer is not GPU accessible.\n");
1116 TRACE(
"Not creating a BO because GL_ARB_vertex_buffer is not supported.\n");
1119 TRACE(
"Not creating a BO because the buffer has dynamic usage and no GL support.\n");
1146 FIXME(
"Ignoring some bind flags %#x.\n", bind_flags);
1169 if (!(bo_vk =
malloc(
sizeof(*bo_vk))))
1176 WARN(
"Failed to create Vulkan buffer.\n");
1181 buffer_vk->
b.buffer_object = &bo_vk->
b;
1191 if (buffer_vk->
b.bo_user.valid)
1196 buffer_vk->
buffer_info.range = buffer_vk->
b.resource.size;
1211 if (
buffer->buffer_object)
1233 if (
buffer->bo_user.valid)
1235 buffer->bo_user.valid =
false;
1238 if (!--bo_vk->
b.refcount)
1264 TRACE(
"buffer_vk %p, device %p, desc %p, data %p, parent %p, parent_ops %p.\n",
1270 WARN(
"The Vulkan implementation does not support transform feedback.\n");
1285 TRACE(
"buffer_vk %p, context_vk %p, bind_mask %s.\n",
1296 else if ((buffer_vk->
bind_mask & bind_mask) != bind_mask)
1298 src_bind_mask = buffer_vk->
bind_mask & ~WINED3D_READ_ONLY_BIND_MASK;
1308 TRACE(
" %s -> %s.\n",
1320 vk_barrier.offset = bo->
b.buffer_offset;
1321 vk_barrier.size = buffer_vk->
b.resource.size;
1325 0, 0,
NULL, 1, &vk_barrier, 0,
NULL));
1333 TRACE(
"device %p, desc %p, data %p, parent %p, parent_ops %p, buffer %p.\n",
1356 TRACE(
"Growing buffer to %u bytes.\n",
size);
1362 desc.misc_flags = 0;
1363 desc.structure_byte_stride = 0;
1377 unsigned int *ret_pos,
void **ret_data)
1386 TRACE(
"device %p, buffer %p, size %u, stride %u, ret_pos %p, ret_data %p.\n",
1411 *ret_data = map_desc.
data;
1423 const void *
data,
unsigned int size,
unsigned int stride,
unsigned int *ret_pos)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_init(struct list_entry *head)
void wined3d_context_gl_destroy_bo(struct wined3d_context_gl *context_gl, struct wined3d_bo_gl *bo)
void wined3d_context_gl_end_transform_feedback(struct wined3d_context_gl *context_gl)
BOOL wined3d_context_vk_create_bo(struct wined3d_context_vk *context_vk, VkDeviceSize size, VkBufferUsageFlags usage, VkMemoryPropertyFlags memory_type, struct wined3d_bo_vk *bo)
void wined3d_context_vk_end_current_render_pass(struct wined3d_context_vk *context_vk)
VkCommandBuffer wined3d_context_vk_get_command_buffer(struct wined3d_context_vk *context_vk)
void wined3d_context_vk_destroy_bo(struct wined3d_context_vk *context_vk, const struct wined3d_bo_vk *bo)
void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int slice_pitch)
void wined3d_cs_destroy_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
static void wined3d_buffer_set_bo(struct wined3d_buffer *buffer, struct wined3d_context *context, struct wined3d_bo *bo)
static HRESULT wined3d_buffer_init(struct wined3d_buffer *buffer, 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, const struct wined3d_buffer_ops *buffer_ops)
static void wined3d_buffer_init_data(struct wined3d_buffer *buffer, struct wined3d_device *device, const struct wined3d_sub_resource_data *data)
HRESULT wined3d_buffer_gl_init(struct wined3d_buffer_gl *buffer_gl, 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)
static void buffer_resource_unload(struct wined3d_resource *resource)
BOOL wined3d_buffer_prepare_location(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
const VkDescriptorBufferInfo * wined3d_buffer_vk_get_buffer_info(struct wined3d_buffer_vk *buffer_vk)
static void buffer_resource_sub_resource_get_map_pitch(struct wined3d_resource *resource, unsigned int sub_resource_idx, unsigned int *row_pitch, unsigned int *slice_pitch)
HRESULT CDECL wined3d_streaming_buffer_upload(struct wined3d_device *device, struct wined3d_streaming_buffer *buffer, const void *data, unsigned int size, unsigned int stride, unsigned int *ret_pos)
static void wined3d_buffer_destroy_object(void *object)
void wined3d_buffer_update_sub_resource(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct upload_bo *upload_bo, unsigned int offset, unsigned int size)
static BOOL wined3d_buffer_vk_prepare_location(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
static void wined3d_buffer_evict_sysmem(struct wined3d_buffer *buffer)
static BOOL wined3d_buffer_gl_prepare_location(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer, struct wined3d_context *context, uint32_t location)
static BOOL buffer_is_fully_dirty(const struct wined3d_buffer *buffer)
static void wined3d_buffer_gl_destroy_buffer_object(struct wined3d_buffer_gl *buffer_gl, struct wined3d_context_gl *context_gl)
GLenum wined3d_buffer_gl_binding_from_bind_flags(const struct wined3d_gl_info *gl_info, uint32_t bind_flags)
VkMemoryPropertyFlags vk_memory_type_from_access_flags(uint32_t access, uint32_t usage)
static void buffer_resource_preload(struct wined3d_resource *resource)
static BOOL buffer_is_dirty(const struct wined3d_buffer *buffer)
static void buffer_clear_dirty_areas(struct wined3d_buffer *buffer)
void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state)
static void wined3d_buffer_drop_bo(struct wined3d_buffer *buffer)
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 ULONG buffer_resource_decref(struct wined3d_resource *resource)
static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
void wined3d_buffer_acquire_bo_for_write(struct wined3d_buffer *buffer, struct wined3d_context *context)
void *CDECL wined3d_buffer_get_parent(const struct wined3d_buffer *buffer)
DWORD wined3d_buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *context, struct wined3d_bo_address *data)
ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer)
ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer)
static BOOL wined3d_buffer_no3d_prepare_location(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
void wined3d_buffer_invalidate_location(struct wined3d_buffer *buffer, uint32_t location)
static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx, void **map_ptr, const struct wined3d_box *box, uint32_t flags)
static void wined3d_buffer_gl_unload_location(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
static HRESULT wined3d_streaming_buffer_prepare(struct wined3d_device *device, struct wined3d_streaming_buffer *buffer, unsigned int min_size)
void wined3d_buffer_validate_location(struct wined3d_buffer *buffer, uint32_t location)
static const struct wined3d_resource_ops buffer_resource_ops
HRESULT wined3d_buffer_vk_init(struct wined3d_buffer_vk *buffer_vk, 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)
#define WINED3D_BUFFER_HASDESC
void wined3d_buffer_vk_barrier(struct wined3d_buffer_vk *buffer_vk, struct wined3d_context_vk *context_vk, uint32_t bind_mask)
static void wined3d_buffer_no3d_unload_location(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
struct wined3d_resource *CDECL wined3d_buffer_get_resource(struct wined3d_buffer *buffer)
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 const struct wined3d_buffer_ops wined3d_buffer_gl_ops
static const struct wined3d_buffer_ops wined3d_buffer_no3d_ops
static const struct wined3d_buffer_ops wined3d_buffer_vk_ops
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)
void CDECL wined3d_streaming_buffer_unmap(struct wined3d_streaming_buffer *buffer)
HRESULT wined3d_buffer_no3d_init(struct wined3d_buffer *buffer_no3d, 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)
void wined3d_buffer_cleanup(struct wined3d_buffer *buffer)
void * wined3d_buffer_load_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context)
static void wined3d_buffer_unload_location(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
static BOOL wined3d_buffer_vk_create_buffer_object(struct wined3d_buffer_vk *buffer_vk, struct wined3d_context_vk *context_vk)
void wined3d_buffer_copy_bo_address(struct wined3d_buffer *dst_buffer, struct wined3d_context *context, unsigned int dst_offset, const struct wined3d_const_bo_address *src_addr, unsigned int size)
static BOOL wined3d_buffer_gl_create_buffer_object(struct wined3d_buffer_gl *buffer_gl, struct wined3d_context_gl *context_gl)
static void wined3d_buffer_vk_unload_location(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
#define WINED3D_BUFFER_USE_BO
VkBufferUsageFlags vk_buffer_usage_from_bind_flags(uint32_t bind_flags)
HRESULT CDECL wined3d_streaming_buffer_map(struct wined3d_device *device, struct wined3d_streaming_buffer *buffer, unsigned int size, unsigned int stride, unsigned int *ret_pos, void **ret_data)
static HRESULT buffer_resource_sub_resource_get_desc(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_sub_resource_desc *desc)
bool wined3d_device_gl_create_bo(struct wined3d_device_gl *device_gl, struct wined3d_context_gl *context_gl, GLsizeiptr size, GLenum binding, GLenum usage, bool coherent, GLbitfield flags, struct wined3d_bo_gl *bo)
VkPipelineStageFlags vk_pipeline_stage_mask_from_bind_flags(uint32_t bind_flags)
GLbitfield wined3d_resource_gl_storage_flags(const struct wined3d_resource *resource)
VkAccessFlags vk_access_mask_from_bind_flags(uint32_t bind_flags)
HRESULT CDECL wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
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, uint32_t usage, unsigned int bind_flags, 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)
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, uint32_t flags)
void wined3d_resource_free_sysmem(struct wined3d_resource *resource)
void resource_cleanup(struct wined3d_resource *resource)
BOOL wined3d_resource_prepare_sysmem(struct wined3d_resource *resource)
void resource_unload(struct wined3d_resource *resource)
const char * debug_d3dusage(uint32_t usage)
const char * wined3d_debug_bind_flags(uint32_t bind_flags)
const char * debug_box(const struct wined3d_box *box)
const char * wined3d_debug_location(uint32_t location)
const char * wined3d_debug_resource_access(uint32_t access)
const struct wined3d_format * wined3d_get_format(const struct wined3d_adapter *adapter, enum wined3d_format_id format_id, unsigned int bind_flags)
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define GL_UNIFORM_BUFFER
GLsizei const GLint * locations
#define GL_TEXTURE_BUFFER
GLenum const GLvoid * addr
GLuint GLint GLboolean GLint GLenum access
#define GL_TRANSFORM_FEEDBACK_BUFFER
#define GL_ELEMENT_ARRAY_BUFFER
#define GL_STREAM_DRAW_ARB
GLsizeiptr const GLvoid GLenum usage
#define GL_DRAW_INDIRECT_BUFFER
#define GL_PIXEL_UNPACK_BUFFER
#define location(file, line)
#define memcpy(s1, s2, n)
D3D11_SHADER_VARIABLE_DESC desc
static RPC_BINDING_HANDLE binding
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
VkAccessFlags srcAccessMask
VkAccessFlags dstAccessMask
uint32_t srcQueueFamilyIndex
uint32_t dstQueueFamilyIndex
struct wined3d_const_bo_address addr
struct wined3d_gl_info gl_info
struct wined3d_vk_info vk_info
BOOL(* buffer_prepare_location)(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
void(* buffer_unload_location)(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
VkDescriptorBufferInfo buffer_info
struct wined3d_resource resource
const struct wined3d_gl_info * gl_info
const struct wined3d_vk_info * vk_info
BOOL supported[WINED3D_GL_EXT_COUNT]
const struct wined3d_parent_ops * parent_ops
BOOL supported[WINED3D_VK_EXT_COUNT]
VkFlags VkMemoryPropertyFlags
@ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
@ VK_MEMORY_PROPERTY_HOST_CACHED_BIT
@ VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
VkFlags VkBufferUsageFlags
@ VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
@ VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
@ VK_BUFFER_USAGE_TRANSFER_DST_BIT
@ VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT
@ VK_BUFFER_USAGE_INDEX_BUFFER_BIT
@ VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT
@ VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT
@ VK_BUFFER_USAGE_VERTEX_BUFFER_BIT
@ VK_BUFFER_USAGE_TRANSFER_SRC_BIT
void VKAPI_CALL vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers)
#define VK_QUEUE_FAMILY_IGNORED
@ VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
const struct wined3d_parent_ops wined3d_null_parent_ops
@ WINED3D_MULTISAMPLE_NONE
#define WINED3D_BIND_VERTEX_BUFFER
#define WINED3D_RESOURCE_ACCESS_GPU
#define WINED3D_BIND_UNORDERED_ACCESS
#define WINED3D_BIND_SHADER_RESOURCE
#define WINED3D_BIND_INDIRECT_BUFFER
#define WINED3D_BIND_DEPTH_STENCIL
static void wined3d_box_set(struct wined3d_box *box, unsigned int left, unsigned int top, unsigned int right, unsigned int bottom, unsigned int front, unsigned int back)
#define WINED3D_RESOURCE_ACCESS_MAP_R
#define WINED3DUSAGE_MANAGED
#define WINED3D_MAP_DISCARD
#define WINED3D_MAP_WRITE
#define WINED3D_MAP_NOOVERWRITE
#define WINED3D_BIND_RENDER_TARGET
#define WINED3DCREATE_SOFTWARE_VERTEXPROCESSING
#define WINED3DUSAGE_DYNAMIC
#define WINED3DERR_INVALIDCALL
#define WINED3D_BIND_CONSTANT_BUFFER
#define WINED3D_BIND_STREAM_OUTPUT
#define WINED3D_BIND_INDEX_BUFFER
#define WINED3D_RESOURCE_ACCESS_MAP_W
@ ARB_TEXTURE_BUFFER_OBJECT
@ APPLE_FLUSH_BUFFER_RANGE
@ ARB_VERTEX_BUFFER_OBJECT
void WINAPI wined3d_mutex_unlock(void)
void WINAPI wined3d_mutex_lock(void)
static bool wined3d_context_is_graphics_state_dirty(const struct wined3d_context *context, unsigned int state_id)
#define UPLOAD_BO_RENAME_ON_UNMAP
#define WINED3D_CONSTANT_BUFFER_ALIGNMENT
#define WINED3D_LOCATION_SYSMEM
#define STATE_STREAM_OUTPUT
static void wined3d_resource_wait_idle(const struct wined3d_resource *resource)
#define WINED3D_LOCATION_BUFFER
static void context_release(struct wined3d_context *context)
#define RESOURCE_ALIGNMENT
static void wined3d_buffer_validate_user(struct wined3d_buffer *buffer)
#define CLIENT_BO_DISCARDED
static size_t align(size_t addr, size_t alignment)
static void wined3d_context_unmap_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *data, unsigned int range_count, const struct wined3d_range *ranges)
#define WINED3D_LOCATION_CLEARED
#define WINED3D_LOCATION_DISCARDED
static void * wined3d_context_map_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *data, size_t size, uint32_t map_flags)
static void wined3d_context_destroy_bo(struct wined3d_context *context, struct wined3d_bo *bo)
static struct wined3d_context * context_acquire(struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
static void wined3d_context_copy_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *dst, const struct wined3d_bo_address *src, unsigned int range_count, const struct wined3d_range *ranges, uint32_t map_flags)
static struct wined3d_buffer * buffer_from_resource(struct wined3d_resource *resource)
static const uint32_t WINED3D_READ_ONLY_BIND_MASK
@ WINED3D_VK_EXT_TRANSFORM_FEEDBACK