Commit 5080d3c1 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Move formats from gl_info to wined3d_adapter.

parent 25c3d993
......@@ -73,7 +73,7 @@ UINT64 adapter_adjust_memory(struct wined3d_adapter *adapter, INT64 amount)
static void wined3d_adapter_cleanup(struct wined3d_adapter *adapter)
{
heap_free(adapter->gl_info.formats);
heap_free(adapter->formats);
heap_free(adapter->cfgs);
}
......@@ -2512,6 +2512,9 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int o
TRACE("Allocated LUID %08x:%08x for adapter %p.\n",
adapter->luid.HighPart, adapter->luid.LowPart, adapter);
adapter->formats = NULL;
adapter->format_count = 0;
if (wined3d_creation_flags & WINED3D_NO3D)
return wined3d_adapter_no3d_init(adapter);
return wined3d_adapter_opengl_init(adapter, wined3d_creation_flags);
......
......@@ -2656,7 +2656,6 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
if (desc->resource_type != WINED3D_RTYPE_TEXTURE_3D && !gl_info->supported[ARB_TEXTURE_RECTANGLE]
&& !gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT])
{
/* TODO: Add support for non-power-of-two compressed textures. */
if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D]
& (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_HEIGHT_SCALE))
......
......@@ -2599,9 +2599,6 @@ struct wined3d_gl_info
HGLRC (WINAPI *p_wglCreateContextAttribsARB)(HDC dc, HGLRC share, const GLint *attribs);
struct opengl_funcs gl_ops;
struct wined3d_fbo_ops fbo_ops;
struct wined3d_format *formats;
unsigned int format_count;
};
/* The driver names reflect the lowest GPU supported
......@@ -2682,6 +2679,9 @@ struct wined3d_adapter
UINT64 vram_bytes_used;
LUID luid;
struct wined3d_format *formats;
unsigned int format_count;
const struct wined3d_vertex_pipe_ops *vertex_pipe;
const struct fragment_pipeline *fragment_pipe;
const struct wined3d_shader_backend_ops *shader_backend;
......
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