Commit 0b9002de authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Respect the BO buffer offset in create_buffer_texture().

parent d7ba2085
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment