Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/adapter_gl.c | 3 +-- dlls/wined3d/device.c | 10 +++++++--- dlls/wined3d/directx.c | 5 ++--- dlls/wined3d/wined3d_private.h | 5 ++--- 4 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 99df19cc3172..2a3514a1bef3 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -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", driver_info->version_high, driver_info->version_low);
- adapter->vram_bytes = driver_info->vram_bytes; 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) | adapter->fragment_pipe->get_emul_mask(gl_info); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 2ae9235b0675..a89a33d676e7 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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) { + const struct wined3d_driver_info *driver_info; + TRACE("device %p.\n", device);
+ driver_info = &device->adapter->driver_info; + TRACE("Emulating 0x%s bytes. 0x%s used, returning 0x%s left.\n", - wine_dbgstr_longlong(device->adapter->vram_bytes), + wine_dbgstr_longlong(driver_info->vram_bytes), wine_dbgstr_longlong(device->adapter->vram_bytes_used), - wine_dbgstr_longlong(device->adapter->vram_bytes - device->adapter->vram_bytes_used)); + wine_dbgstr_longlong(driver_info->vram_bytes - device->adapter->vram_bytes_used));
- return min(UINT_MAX, device->adapter->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, diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index afbc5cb95e5b..e41da8d95296 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -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)); identifier->whql_level = (flags & WINED3DENUM_NO_WHQL_LEVEL) ? 0 : 1; 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; } @@ -2491,9 +2491,8 @@ static BOOL wined3d_adapter_no3d_init(struct wined3d_adapter *adapter, DWORD win TRACE("adapter %p.\n", adapter);
wined3d_driver_info_init(&adapter->driver_info, &gpu_description, 0); - adapter->vram_bytes = adapter->driver_info.vram_bytes; 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)) return FALSE; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d493e9f57582..668bbc7030be 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2674,13 +2674,12 @@ struct wined3d_adapter struct wined3d_gl_info gl_info; struct wined3d_d3d_info d3d_info; struct wined3d_driver_info driver_info; - unsigned int cfg_count; - struct wined3d_pixel_format *cfgs; - UINT64 vram_bytes; UINT64 vram_bytes_used; LUID luid;
WCHAR device_name[CCHDEVICENAME]; /* for use with e.g. ChangeDisplaySettings() */ + unsigned int cfg_count; + struct wined3d_pixel_format *cfgs;
void *formats; size_t format_size;
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=44702
Your paranoid android.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)