mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
[WINED3D] Dereference context slightly later, as seen in wine. This prevents some crashes while applications are starting up. (f.e. ANNO1602)
svn path=/trunk/; revision=75621
This commit is contained in:
@@ -2714,12 +2714,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
|
||||
void *context_map_bo_address(struct wined3d_context *context,
|
||||
const struct wined3d_bo_address *data, size_t size, GLenum binding, DWORD flags)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
BYTE *memory;
|
||||
|
||||
if (!data->buffer_object)
|
||||
return data->addr;
|
||||
|
||||
gl_info = context->gl_info;
|
||||
|
||||
context_bind_bo(context, binding, data->buffer_object);
|
||||
|
||||
if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
|
||||
@@ -2742,11 +2744,13 @@ void *context_map_bo_address(struct wined3d_context *context,
|
||||
void context_unmap_bo_address(struct wined3d_context *context,
|
||||
const struct wined3d_bo_address *data, GLenum binding)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
|
||||
if (!data->buffer_object)
|
||||
return;
|
||||
|
||||
gl_info = context->gl_info;
|
||||
|
||||
context_bind_bo(context, binding, data->buffer_object);
|
||||
GL_EXTCALL(glUnmapBuffer(binding));
|
||||
context_bind_bo(context, binding, 0);
|
||||
|
||||
Reference in New Issue
Block a user