From: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/wined3d/view.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c index b981602f1a2..0ea14531766 100644 --- a/dlls/wined3d/view.c +++ b/dlls/wined3d/view.c @@ -257,6 +257,10 @@ static void create_buffer_texture(struct wined3d_gl_view *view, struct wined3d_c return; }
+ wined3d_buffer_load_location(buffer, &context_gl->c, WINED3D_LOCATION_BUFFER); + bo_gl = wined3d_bo_gl(buffer->buffer_object); + offset += bo_gl->b.buffer_offset; + if ((offset & (gl_info->limits.texture_buffer_offset_alignment - 1))) { FIXME("Buffer offset %u is not %u byte aligned.\n", @@ -264,9 +268,6 @@ static void create_buffer_texture(struct wined3d_gl_view *view, struct wined3d_c return; }
- wined3d_buffer_load_location(buffer, &context_gl->c, WINED3D_LOCATION_BUFFER); - bo_gl = wined3d_bo_gl(buffer->buffer_object); - view->target = GL_TEXTURE_BUFFER; if (!view->name) gl_info->gl_ops.gl.p_glGenTextures(1, &view->name);