Commit 58c680ba authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Recreate buffer textures when renaming the existing buffer storage.

parent 4e13c72f
......@@ -36148,7 +36148,7 @@ static void test_high_resource_count(void)
ID3D11DeviceContext_Unmap(context, (ID3D11Resource *)buffers[1], 0);
draw_quad(&test_context);
todo_wine_if (!damavand) check_texture_vec4(rt, &expect2, 0);
check_texture_vec4(rt, &expect2, 0);
ID3D11Texture2D_Release(rt);
ID3D11RenderTargetView_Release(rtv);
......@@ -269,7 +269,17 @@ static void create_buffer_texture(struct wined3d_gl_view *view, struct wined3d_c
view->target = GL_TEXTURE_BUFFER;
if (!view->name)
{
gl_info->gl_ops.gl.p_glGenTextures(1, &view->name);
}
else if (gl_info->supported[ARB_BINDLESS_TEXTURE])
{
/* If we already bound this view to a shader, we acquired a handle to
* it, and it's now immutable. This means we can't bind a new buffer
* storage to it, so recreate the texture. */
gl_info->gl_ops.gl.p_glDeleteTextures(1, &view->name);
gl_info->gl_ops.gl.p_glGenTextures(1, &view->name);
}
wined3d_context_gl_bind_texture(context_gl, GL_TEXTURE_BUFFER, view->name);
if (gl_info->supported[ARB_TEXTURE_BUFFER_RANGE])
......
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