mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 14:40:56 +00:00
wined3d: Return data as struct wined3d_bo_address in buffer_get_memory().
This commit is contained in:
parent
a3538a1546
commit
89bf30a25e
@ -467,10 +467,10 @@ static inline void fixup_transformed_pos(float *p)
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
const BYTE *buffer_get_memory(struct wined3d_buffer *buffer,
|
||||
const struct wined3d_gl_info *gl_info, GLuint *buffer_object)
|
||||
void buffer_get_memory(struct wined3d_buffer *buffer, const struct wined3d_gl_info *gl_info,
|
||||
struct wined3d_bo_address *data)
|
||||
{
|
||||
*buffer_object = buffer->buffer_object;
|
||||
data->buffer_object = buffer->buffer_object;
|
||||
if (!buffer->buffer_object)
|
||||
{
|
||||
if (buffer->flags & WINED3D_BUFFER_CREATEBO)
|
||||
@ -479,15 +479,16 @@ const BYTE *buffer_get_memory(struct wined3d_buffer *buffer,
|
||||
buffer->flags &= ~WINED3D_BUFFER_CREATEBO;
|
||||
if (buffer->buffer_object)
|
||||
{
|
||||
*buffer_object = buffer->buffer_object;
|
||||
return NULL;
|
||||
data->buffer_object = buffer->buffer_object;
|
||||
data->addr = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
return buffer->resource.allocatedMemory;
|
||||
data->addr = buffer->resource.allocatedMemory;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
data->addr = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ void device_stream_info_from_declaration(struct wined3d_device *device,
|
||||
else
|
||||
{
|
||||
TRACE("Stream %u isn't UP, %p\n", element->input_slot, buffer);
|
||||
data.addr = buffer_get_memory(buffer, &device->adapter->gl_info, &data.buffer_object);
|
||||
buffer_get_memory(buffer, &device->adapter->gl_info, &data);
|
||||
|
||||
/* Can't use vbo's if the base vertex index is negative. OpenGL doesn't accept negative offsets
|
||||
* (or rather offsets bigger than the vbo, because the pointer is unsigned), so use system memory
|
||||
|
@ -2405,8 +2405,8 @@ static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resourc
|
||||
return CONTAINING_RECORD(resource, struct wined3d_buffer, resource);
|
||||
}
|
||||
|
||||
const BYTE *buffer_get_memory(struct wined3d_buffer *buffer, const struct wined3d_gl_info *gl_info,
|
||||
GLuint *buffer_object) DECLSPEC_HIDDEN;
|
||||
void buffer_get_memory(struct wined3d_buffer *buffer, const struct wined3d_gl_info *gl_info,
|
||||
struct wined3d_bo_address *data) DECLSPEC_HIDDEN;
|
||||
BYTE *buffer_get_sysmem(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_rendertarget_view
|
||||
|
Loading…
Reference in New Issue
Block a user