wined3d: Get rid of vram_bytes from struct wined3d_adapter.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3e0148cab0
commit
f17544a77c
|
@ -3845,9 +3845,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
||||||
TRACE("Reporting (fake) driver version 0x%08x-0x%08x.\n",
|
TRACE("Reporting (fake) driver version 0x%08x-0x%08x.\n",
|
||||||
driver_info->version_high, driver_info->version_low);
|
driver_info->version_high, driver_info->version_low);
|
||||||
|
|
||||||
adapter->vram_bytes = driver_info->vram_bytes;
|
|
||||||
adapter->vram_bytes_used = 0;
|
adapter->vram_bytes_used = 0;
|
||||||
TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->vram_bytes));
|
TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(driver_info->vram_bytes));
|
||||||
|
|
||||||
gl_ext_emul_mask = adapter->vertex_pipe->vp_get_emul_mask(gl_info)
|
gl_ext_emul_mask = adapter->vertex_pipe->vp_get_emul_mask(gl_info)
|
||||||
| adapter->fragment_pipe->get_emul_mask(gl_info);
|
| adapter->fragment_pipe->get_emul_mask(gl_info);
|
||||||
|
|
|
@ -1302,14 +1302,18 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device)
|
||||||
|
|
||||||
UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device *device)
|
UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device *device)
|
||||||
{
|
{
|
||||||
|
const struct wined3d_driver_info *driver_info;
|
||||||
|
|
||||||
TRACE("device %p.\n", device);
|
TRACE("device %p.\n", device);
|
||||||
|
|
||||||
TRACE("Emulating 0x%s bytes. 0x%s used, returning 0x%s left.\n",
|
driver_info = &device->adapter->driver_info;
|
||||||
wine_dbgstr_longlong(device->adapter->vram_bytes),
|
|
||||||
wine_dbgstr_longlong(device->adapter->vram_bytes_used),
|
|
||||||
wine_dbgstr_longlong(device->adapter->vram_bytes - device->adapter->vram_bytes_used));
|
|
||||||
|
|
||||||
return min(UINT_MAX, device->adapter->vram_bytes - device->adapter->vram_bytes_used);
|
TRACE("Emulating 0x%s bytes. 0x%s used, returning 0x%s left.\n",
|
||||||
|
wine_dbgstr_longlong(driver_info->vram_bytes),
|
||||||
|
wine_dbgstr_longlong(device->adapter->vram_bytes_used),
|
||||||
|
wine_dbgstr_longlong(driver_info->vram_bytes - device->adapter->vram_bytes_used));
|
||||||
|
|
||||||
|
return min(UINT_MAX, driver_info->vram_bytes - device->adapter->vram_bytes_used);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDECL wined3d_device_set_stream_output(struct wined3d_device *device, UINT idx,
|
void CDECL wined3d_device_set_stream_output(struct wined3d_device *device, UINT idx,
|
||||||
|
|
|
@ -1199,7 +1199,7 @@ HRESULT CDECL wined3d_get_adapter_identifier(const struct wined3d *wined3d,
|
||||||
memcpy(&identifier->device_identifier, &IID_D3DDEVICE_D3DUID, sizeof(identifier->device_identifier));
|
memcpy(&identifier->device_identifier, &IID_D3DDEVICE_D3DUID, sizeof(identifier->device_identifier));
|
||||||
identifier->whql_level = (flags & WINED3DENUM_NO_WHQL_LEVEL) ? 0 : 1;
|
identifier->whql_level = (flags & WINED3DENUM_NO_WHQL_LEVEL) ? 0 : 1;
|
||||||
memcpy(&identifier->adapter_luid, &adapter->luid, sizeof(identifier->adapter_luid));
|
memcpy(&identifier->adapter_luid, &adapter->luid, sizeof(identifier->adapter_luid));
|
||||||
identifier->video_memory = min(~(SIZE_T)0, adapter->vram_bytes);
|
identifier->video_memory = min(~(SIZE_T)0, adapter->driver_info.vram_bytes);
|
||||||
|
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
@ -2491,9 +2491,8 @@ static BOOL wined3d_adapter_no3d_init(struct wined3d_adapter *adapter, DWORD win
|
||||||
TRACE("adapter %p.\n", adapter);
|
TRACE("adapter %p.\n", adapter);
|
||||||
|
|
||||||
wined3d_driver_info_init(&adapter->driver_info, &gpu_description, 0);
|
wined3d_driver_info_init(&adapter->driver_info, &gpu_description, 0);
|
||||||
adapter->vram_bytes = adapter->driver_info.vram_bytes;
|
|
||||||
adapter->vram_bytes_used = 0;
|
adapter->vram_bytes_used = 0;
|
||||||
TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->vram_bytes));
|
TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->driver_info.vram_bytes));
|
||||||
|
|
||||||
if (!wined3d_adapter_no3d_init_format_info(adapter))
|
if (!wined3d_adapter_no3d_init_format_info(adapter))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -2674,13 +2674,12 @@ struct wined3d_adapter
|
||||||
struct wined3d_gl_info gl_info;
|
struct wined3d_gl_info gl_info;
|
||||||
struct wined3d_d3d_info d3d_info;
|
struct wined3d_d3d_info d3d_info;
|
||||||
struct wined3d_driver_info driver_info;
|
struct wined3d_driver_info driver_info;
|
||||||
unsigned int cfg_count;
|
|
||||||
struct wined3d_pixel_format *cfgs;
|
|
||||||
UINT64 vram_bytes;
|
|
||||||
UINT64 vram_bytes_used;
|
UINT64 vram_bytes_used;
|
||||||
LUID luid;
|
LUID luid;
|
||||||
|
|
||||||
WCHAR device_name[CCHDEVICENAME]; /* for use with e.g. ChangeDisplaySettings() */
|
WCHAR device_name[CCHDEVICENAME]; /* for use with e.g. ChangeDisplaySettings() */
|
||||||
|
unsigned int cfg_count;
|
||||||
|
struct wined3d_pixel_format *cfgs;
|
||||||
|
|
||||||
void *formats;
|
void *formats;
|
||||||
size_t format_size;
|
size_t format_size;
|
||||||
|
|
Loading…
Reference in New Issue