Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- v2: Simplify, consider usage rather than access flags.
dlls/d3d9/buffer.c | 18 ++++++++++++------ dlls/d3d9/d3d9_private.h | 5 +++-- dlls/d3d9/device.c | 6 +++--- dlls/d3d9/surface.c | 2 +- dlls/d3d9/volume.c | 2 +- 5 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/dlls/d3d9/buffer.c b/dlls/d3d9/buffer.c index b6cd646dee2..83cf4010450 100644 --- a/dlls/d3d9/buffer.c +++ b/dlls/d3d9/buffer.c @@ -189,6 +189,7 @@ static HRESULT WINAPI d3d9_vertexbuffer_Lock(IDirect3DVertexBuffer9 *iface, UINT void **data, DWORD flags) { struct d3d9_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer9(iface); + struct wined3d_resource *wined3d_resource; struct wined3d_map_desc wined3d_map_desc; struct wined3d_box wined3d_box = {0}; HRESULT hr; @@ -199,8 +200,9 @@ static HRESULT WINAPI d3d9_vertexbuffer_Lock(IDirect3DVertexBuffer9 *iface, UINT wined3d_box.left = offset; wined3d_box.right = offset + size; wined3d_mutex_lock(); - hr = wined3d_resource_map(wined3d_buffer_get_resource(buffer->wined3d_buffer), - 0, &wined3d_map_desc, &wined3d_box, wined3dmapflags_from_d3dmapflags(flags)); + wined3d_resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); + hr = wined3d_resource_map(wined3d_resource, 0, &wined3d_map_desc, &wined3d_box, + wined3dmapflags_from_d3dmapflags(flags, buffer->usage)); wined3d_mutex_unlock(); *data = wined3d_map_desc.data;
@@ -236,7 +238,7 @@ static HRESULT WINAPI d3d9_vertexbuffer_GetDesc(IDirect3DVertexBuffer9 *iface,
desc->Format = D3DFMT_VERTEXDATA; desc->Type = D3DRTYPE_VERTEXBUFFER; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = buffer->usage; desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->Size = wined3d_desc.size; desc->FVF = buffer->fvf; @@ -302,6 +304,7 @@ HRESULT vertexbuffer_init(struct d3d9_vertexbuffer *buffer, struct d3d9_device *
buffer->IDirect3DVertexBuffer9_iface.lpVtbl = &d3d9_vertexbuffer_vtbl; buffer->fvf = fvf; + buffer->usage = usage; d3d9_resource_init(&buffer->resource);
desc.byte_width = size; @@ -515,6 +518,7 @@ static HRESULT WINAPI d3d9_indexbuffer_Lock(IDirect3DIndexBuffer9 *iface, UINT offset, UINT size, void **data, DWORD flags) { struct d3d9_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer9(iface); + struct wined3d_resource *wined3d_resource; struct wined3d_map_desc wined3d_map_desc; struct wined3d_box wined3d_box = {0}; HRESULT hr; @@ -525,8 +529,9 @@ static HRESULT WINAPI d3d9_indexbuffer_Lock(IDirect3DIndexBuffer9 *iface, wined3d_box.left = offset; wined3d_box.right = offset + size; wined3d_mutex_lock(); - hr = wined3d_resource_map(wined3d_buffer_get_resource(buffer->wined3d_buffer), - 0, &wined3d_map_desc, &wined3d_box, wined3dmapflags_from_d3dmapflags(flags)); + wined3d_resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); + hr = wined3d_resource_map(wined3d_resource, 0, &wined3d_map_desc, &wined3d_box, + wined3dmapflags_from_d3dmapflags(flags, buffer->usage)); wined3d_mutex_unlock(); *data = wined3d_map_desc.data;
@@ -561,7 +566,7 @@ static HRESULT WINAPI d3d9_indexbuffer_GetDesc(IDirect3DIndexBuffer9 *iface, D3D
desc->Format = d3dformat_from_wined3dformat(buffer->format); desc->Type = D3DRTYPE_INDEXBUFFER; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = buffer->usage; desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->Size = wined3d_desc.size;
@@ -637,6 +642,7 @@ HRESULT indexbuffer_init(struct d3d9_indexbuffer *buffer, struct d3d9_device *de
buffer->IDirect3DIndexBuffer9_iface.lpVtbl = &d3d9_indexbuffer_vtbl; buffer->format = wined3dformat_from_d3dformat(format); + buffer->usage = usage; d3d9_resource_init(&buffer->resource);
wined3d_mutex_lock(); diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index a4dc3abb7a6..e520b604e9a 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -54,7 +54,7 @@ HRESULT vdecl_convert_fvf(DWORD FVF, D3DVERTEXELEMENT9 **ppVertexElements) DECLS D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN; BOOL is_gdi_compat_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN; enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN; -unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags) DECLSPEC_HIDDEN; +unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags, unsigned int usage) DECLSPEC_HIDDEN; void present_parameters_from_wined3d_swapchain_desc(D3DPRESENT_PARAMETERS *present_parameters, const struct wined3d_swapchain_desc *swapchain_desc, DWORD presentation_interval) DECLSPEC_HIDDEN; void d3dcaps_from_wined3dcaps(D3DCAPS9 *caps, const struct wined3d_caps *wined3d_caps) DECLSPEC_HIDDEN; @@ -187,7 +187,7 @@ struct d3d9_vertexbuffer struct wined3d_buffer *wined3d_buffer; IDirect3DDevice9Ex *parent_device; struct wined3d_buffer *draw_buffer; - DWORD fvf; + DWORD fvf, usage; };
HRESULT vertexbuffer_init(struct d3d9_vertexbuffer *buffer, struct d3d9_device *device, @@ -202,6 +202,7 @@ struct d3d9_indexbuffer IDirect3DDevice9Ex *parent_device; struct wined3d_buffer *draw_buffer; enum wined3d_format_id format; + DWORD usage; };
HRESULT indexbuffer_init(struct d3d9_indexbuffer *buffer, struct d3d9_device *device, diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 83db304d6a4..49a86c0159a 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -169,7 +169,7 @@ enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) } }
-unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags) +unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags, unsigned int usage) { static const unsigned int handled = D3DLOCK_NOSYSLOCK | D3DLOCK_NOOVERWRITE @@ -179,12 +179,12 @@ unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags) unsigned int wined3d_flags;
wined3d_flags = flags & handled; - if (!(flags & (D3DLOCK_NOOVERWRITE | D3DLOCK_DISCARD))) + if (~usage & D3DUSAGE_WRITEONLY && !(flags & (D3DLOCK_NOOVERWRITE | D3DLOCK_DISCARD))) wined3d_flags |= WINED3D_MAP_READ; if (!(flags & D3DLOCK_READONLY)) wined3d_flags |= WINED3D_MAP_WRITE; if (!(wined3d_flags & (WINED3D_MAP_READ | WINED3D_MAP_WRITE))) - wined3d_flags |= WINED3D_MAP_READ | WINED3D_MAP_WRITE; + wined3d_flags |= WINED3D_MAP_WRITE; flags &= ~(handled | D3DLOCK_READONLY);
if (flags) diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c index ded7dc4f490..9aa2154a9c3 100644 --- a/dlls/d3d9/surface.c +++ b/dlls/d3d9/surface.c @@ -250,7 +250,7 @@ static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface,
wined3d_mutex_lock(); hr = wined3d_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx, - &map_desc, rect ? &box : NULL, wined3dmapflags_from_d3dmapflags(flags)); + &map_desc, rect ? &box : NULL, wined3dmapflags_from_d3dmapflags(flags, 0)); wined3d_mutex_unlock();
if (SUCCEEDED(hr)) diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c index 7bf12570a89..cdc4761963f 100644 --- a/dlls/d3d9/volume.c +++ b/dlls/d3d9/volume.c @@ -149,7 +149,7 @@ static HRESULT WINAPI d3d9_volume_LockBox(IDirect3DVolume9 *iface, wined3d_mutex_lock(); if (FAILED(hr = wined3d_resource_map(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx, &map_desc, (const struct wined3d_box *)box, - wined3dmapflags_from_d3dmapflags(flags)))) + wined3dmapflags_from_d3dmapflags(flags, 0)))) map_desc.data = NULL; wined3d_mutex_unlock();
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- v2: Same changes as the d3d9 version.
dlls/d3d8/buffer.c | 18 ++++++++++++------ dlls/d3d8/d3d8_private.h | 5 +++-- dlls/d3d8/device.c | 6 +++--- dlls/d3d8/surface.c | 2 +- dlls/d3d8/volume.c | 2 +- 5 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/dlls/d3d8/buffer.c b/dlls/d3d8/buffer.c index 0a6767be70e..5454d5712a1 100644 --- a/dlls/d3d8/buffer.c +++ b/dlls/d3d8/buffer.c @@ -188,6 +188,7 @@ static HRESULT WINAPI d3d8_vertexbuffer_Lock(IDirect3DVertexBuffer8 *iface, UINT BYTE **data, DWORD flags) { struct d3d8_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer8(iface); + struct wined3d_resource *wined3d_resource; struct wined3d_map_desc wined3d_map_desc; struct wined3d_box wined3d_box = {0}; HRESULT hr; @@ -198,8 +199,9 @@ static HRESULT WINAPI d3d8_vertexbuffer_Lock(IDirect3DVertexBuffer8 *iface, UINT wined3d_box.left = offset; wined3d_box.right = offset + size; wined3d_mutex_lock(); - hr = wined3d_resource_map(wined3d_buffer_get_resource(buffer->wined3d_buffer), - 0, &wined3d_map_desc, &wined3d_box, wined3dmapflags_from_d3dmapflags(flags)); + wined3d_resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); + hr = wined3d_resource_map(wined3d_resource, 0, &wined3d_map_desc, &wined3d_box, + wined3dmapflags_from_d3dmapflags(flags, buffer->usage)); wined3d_mutex_unlock(); *data = wined3d_map_desc.data;
@@ -235,7 +237,7 @@ static HRESULT WINAPI d3d8_vertexbuffer_GetDesc(IDirect3DVertexBuffer8 *iface,
desc->Format = D3DFMT_VERTEXDATA; desc->Type = D3DRTYPE_VERTEXBUFFER; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = buffer->usage; desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->Size = wined3d_desc.size; desc->FVF = buffer->fvf; @@ -296,6 +298,7 @@ HRESULT vertexbuffer_init(struct d3d8_vertexbuffer *buffer, struct d3d8_device * buffer->IDirect3DVertexBuffer8_iface.lpVtbl = &Direct3DVertexBuffer8_Vtbl; d3d8_resource_init(&buffer->resource); buffer->fvf = fvf; + buffer->usage = usage;
desc.byte_width = size; desc.usage = usage & WINED3DUSAGE_MASK; @@ -509,6 +512,7 @@ static HRESULT WINAPI d3d8_indexbuffer_Lock(IDirect3DIndexBuffer8 *iface, UINT o BYTE **data, DWORD flags) { struct d3d8_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer8(iface); + struct wined3d_resource *wined3d_resource; struct wined3d_map_desc wined3d_map_desc; struct wined3d_box wined3d_box = {0}; HRESULT hr; @@ -519,8 +523,9 @@ static HRESULT WINAPI d3d8_indexbuffer_Lock(IDirect3DIndexBuffer8 *iface, UINT o wined3d_box.left = offset; wined3d_box.right = offset + size; wined3d_mutex_lock(); - hr = wined3d_resource_map(wined3d_buffer_get_resource(buffer->wined3d_buffer), - 0, &wined3d_map_desc, &wined3d_box, wined3dmapflags_from_d3dmapflags(flags)); + wined3d_resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); + hr = wined3d_resource_map(wined3d_resource, 0, &wined3d_map_desc, &wined3d_box, + wined3dmapflags_from_d3dmapflags(flags, buffer->usage)); wined3d_mutex_unlock(); *data = wined3d_map_desc.data;
@@ -556,7 +561,7 @@ static HRESULT WINAPI d3d8_indexbuffer_GetDesc(IDirect3DIndexBuffer8 *iface,
desc->Format = d3dformat_from_wined3dformat(buffer->format); desc->Type = D3DRTYPE_INDEXBUFFER; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = buffer->usage; desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->Size = wined3d_desc.size;
@@ -627,6 +632,7 @@ HRESULT indexbuffer_init(struct d3d8_indexbuffer *buffer, struct d3d8_device *de buffer->IDirect3DIndexBuffer8_iface.lpVtbl = &d3d8_indexbuffer_vtbl; d3d8_resource_init(&buffer->resource); buffer->format = wined3dformat_from_d3dformat(format); + buffer->usage = usage;
wined3d_mutex_lock(); hr = wined3d_buffer_create(device->wined3d_device, &desc, NULL, buffer, parent_ops, &buffer->wined3d_buffer); diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index 81f4e2009fd..955de86b80d 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -208,7 +208,7 @@ struct d3d8_vertexbuffer struct wined3d_buffer *wined3d_buffer; IDirect3DDevice8 *parent_device; struct wined3d_buffer *draw_buffer; - DWORD fvf; + DWORD fvf, usage; };
HRESULT vertexbuffer_init(struct d3d8_vertexbuffer *buffer, struct d3d8_device *device, @@ -223,6 +223,7 @@ struct d3d8_indexbuffer IDirect3DDevice8 *parent_device; struct wined3d_buffer *draw_buffer; enum wined3d_format_id format; + DWORD usage; };
HRESULT indexbuffer_init(struct d3d8_indexbuffer *buffer, struct d3d8_device *device, @@ -282,7 +283,7 @@ HRESULT d3d8_pixel_shader_init(struct d3d8_pixel_shader *shader, struct d3d8_dev
D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN; enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN; -unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags) DECLSPEC_HIDDEN; +unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags, unsigned int usage) DECLSPEC_HIDDEN; void load_local_constants(const DWORD *d3d8_elements, struct wined3d_shader *wined3d_vertex_shader) DECLSPEC_HIDDEN; size_t parse_token(const DWORD *pToken) DECLSPEC_HIDDEN;
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index a113e57f580..0a7f4775c96 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -142,7 +142,7 @@ enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) } }
-unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags) +unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags, unsigned int usage) { static const unsigned int handled = D3DLOCK_NOSYSLOCK | D3DLOCK_NOOVERWRITE @@ -151,12 +151,12 @@ unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags) unsigned int wined3d_flags;
wined3d_flags = flags & handled; - if (!(flags & (D3DLOCK_NOOVERWRITE | D3DLOCK_DISCARD))) + if (~usage & D3DUSAGE_WRITEONLY && !(flags & (D3DLOCK_NOOVERWRITE | D3DLOCK_DISCARD))) wined3d_flags |= WINED3D_MAP_READ; if (!(flags & D3DLOCK_READONLY)) wined3d_flags |= WINED3D_MAP_WRITE; if (!(wined3d_flags & (WINED3D_MAP_READ | WINED3D_MAP_WRITE))) - wined3d_flags |= WINED3D_MAP_READ | WINED3D_MAP_WRITE; + wined3d_flags |= WINED3D_MAP_WRITE; flags &= ~(handled | D3DLOCK_READONLY);
if (flags) diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c index 0d8793788d7..2edc51da38b 100644 --- a/dlls/d3d8/surface.c +++ b/dlls/d3d8/surface.c @@ -245,7 +245,7 @@ static HRESULT WINAPI d3d8_surface_LockRect(IDirect3DSurface8 *iface, }
hr = wined3d_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx, - &map_desc, rect ? &box : NULL, wined3dmapflags_from_d3dmapflags(flags)); + &map_desc, rect ? &box : NULL, wined3dmapflags_from_d3dmapflags(flags, 0)); wined3d_mutex_unlock();
if (SUCCEEDED(hr)) diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c index 00dd78a533e..26e0617b7cd 100644 --- a/dlls/d3d8/volume.c +++ b/dlls/d3d8/volume.c @@ -149,7 +149,7 @@ static HRESULT WINAPI d3d8_volume_LockBox(IDirect3DVolume8 *iface, wined3d_mutex_lock(); if (FAILED(hr = wined3d_resource_map(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx, &map_desc, (const struct wined3d_box *)box, - wined3dmapflags_from_d3dmapflags(flags)))) + wined3dmapflags_from_d3dmapflags(flags, 0)))) map_desc.data = NULL; wined3d_mutex_unlock();
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=46977
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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3d9/buffer.c | 6 ++---- dlls/d3d9/d3d9_private.h | 22 ++++++++++++++-------- dlls/d3d9/device.c | 2 +- dlls/d3d9/texture.c | 6 +++--- 4 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/dlls/d3d9/buffer.c b/dlls/d3d9/buffer.c index 83cf4010450..fa3431a808b 100644 --- a/dlls/d3d9/buffer.c +++ b/dlls/d3d9/buffer.c @@ -310,8 +310,7 @@ HRESULT vertexbuffer_init(struct d3d9_vertexbuffer *buffer, struct d3d9_device * desc.byte_width = size; desc.usage = usage & WINED3DUSAGE_MASK; desc.bind_flags = 0; - desc.access = wined3daccess_from_d3dpool(pool, usage) - | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + desc.access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_VERTEXBUFFER); desc.misc_flags = 0; desc.structure_byte_stride = 0;
@@ -629,8 +628,7 @@ HRESULT indexbuffer_init(struct d3d9_indexbuffer *buffer, struct d3d9_device *de desc.byte_width = size; desc.usage = (usage & WINED3DUSAGE_MASK) | WINED3DUSAGE_STATICDECL; desc.bind_flags = 0; - desc.access = wined3daccess_from_d3dpool(pool, usage) - | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + desc.access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_INDEXBUFFER); desc.misc_flags = 0; desc.structure_byte_stride = 0;
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index e520b604e9a..1d64b368086 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -325,23 +325,29 @@ static inline D3DPOOL d3dpool_from_wined3daccess(unsigned int access, unsigned i } }
-static inline unsigned int wined3daccess_from_d3dpool(D3DPOOL pool, unsigned int usage) +static inline unsigned int wined3daccess_from_d3dpool(D3DPOOL pool, unsigned int usage, D3DRESOURCETYPE type) { + unsigned int access; + switch (pool) { case D3DPOOL_DEFAULT: - if (usage & D3DUSAGE_DYNAMIC) - return WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; - return WINED3D_RESOURCE_ACCESS_GPU; + access = WINED3D_RESOURCE_ACCESS_GPU; + break; case D3DPOOL_MANAGED: - return WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU - | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU; + break; case D3DPOOL_SYSTEMMEM: case D3DPOOL_SCRATCH: - return WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + access = WINED3D_RESOURCE_ACCESS_CPU; + break; default: - return 0; + access = 0; } + if (type == D3DRTYPE_VERTEXBUFFER || type == D3DRTYPE_INDEXBUFFER + || pool != D3DPOOL_DEFAULT || usage & D3DUSAGE_DYNAMIC) + access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + return access; }
static inline unsigned int wined3d_bind_flags_from_d3d9_usage(DWORD usage) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 49a86c0159a..0a716e524ce 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1842,7 +1842,7 @@ static HRESULT WINAPI d3d9_device_CreateOffscreenPlainSurface(IDirect3DDevice9Ex usage = 0; if (pool == D3DPOOL_SCRATCH) usage |= WINED3DUSAGE_SCRATCH; - access = wined3daccess_from_d3dpool(pool, usage) + access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_SURFACE) | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
return d3d9_device_create_surface(device, 0, wined3dformat_from_d3dformat(format), diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index 8dc1ceea698..010434d66aa 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -1321,7 +1321,7 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device, if (pool == D3DPOOL_SCRATCH) desc.usage |= WINED3DUSAGE_SCRATCH; desc.bind_flags = wined3d_bind_flags_from_d3d9_usage(usage) | WINED3D_BIND_SHADER_RESOURCE; - desc.access = wined3daccess_from_d3dpool(pool, usage); + desc.access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_TEXTURE); desc.width = width; desc.height = height; desc.depth = 1; @@ -1410,7 +1410,7 @@ HRESULT cubetexture_init(struct d3d9_texture *texture, struct d3d9_device *devic if (pool == D3DPOOL_SCRATCH) desc.usage |= WINED3DUSAGE_SCRATCH; desc.bind_flags = wined3d_bind_flags_from_d3d9_usage(usage) | WINED3D_BIND_SHADER_RESOURCE; - desc.access = wined3daccess_from_d3dpool(pool, usage); + desc.access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_CUBETEXTURE); desc.width = edge_length; desc.height = edge_length; desc.depth = 1; @@ -1487,7 +1487,7 @@ HRESULT volumetexture_init(struct d3d9_texture *texture, struct d3d9_device *dev if (pool == D3DPOOL_SCRATCH) desc.usage |= WINED3DUSAGE_SCRATCH; desc.bind_flags = wined3d_bind_flags_from_d3d9_usage(usage) | WINED3D_BIND_SHADER_RESOURCE; - desc.access = wined3daccess_from_d3dpool(pool, usage); + desc.access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_VOLUMETEXTURE); desc.width = width; desc.height = height; desc.depth = depth;
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=46978
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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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)
On Wed, 30 Jan 2019 at 18:56, Matteo Bruni mbruni@codeweavers.com wrote:
dlls/d3d9/buffer.c | 6 ++---- dlls/d3d9/d3d9_private.h | 22 ++++++++++++++-------- dlls/d3d9/device.c | 2 +- dlls/d3d9/texture.c | 6 +++--- 4 files changed, 20 insertions(+), 16 deletions(-)
I don't know, maybe. You use this in 5/6 of course, but I'd be tempted to just introduce e.g. a "map_access_from_usage()" helper, and use that in vertexbuffer_init() and indexbuffer_init().
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3d8/buffer.c | 6 ++---- dlls/d3d8/d3d8_private.h | 22 ++++++++++++++-------- dlls/d3d8/texture.c | 6 +++--- 3 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/dlls/d3d8/buffer.c b/dlls/d3d8/buffer.c index 5454d5712a1..328fcad85d4 100644 --- a/dlls/d3d8/buffer.c +++ b/dlls/d3d8/buffer.c @@ -303,8 +303,7 @@ HRESULT vertexbuffer_init(struct d3d8_vertexbuffer *buffer, struct d3d8_device * desc.byte_width = size; desc.usage = usage & WINED3DUSAGE_MASK; desc.bind_flags = 0; - desc.access = wined3daccess_from_d3dpool(pool, usage) - | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + desc.access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_VERTEXBUFFER); desc.misc_flags = 0; desc.structure_byte_stride = 0;
@@ -618,8 +617,7 @@ HRESULT indexbuffer_init(struct d3d8_indexbuffer *buffer, struct d3d8_device *de desc.byte_width = size; desc.usage = (usage & WINED3DUSAGE_MASK) | WINED3DUSAGE_STATICDECL; desc.bind_flags = 0; - desc.access = wined3daccess_from_d3dpool(pool, usage) - | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + desc.access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_INDEXBUFFER); desc.misc_flags = 0; desc.structure_byte_stride = 0;
diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index 955de86b80d..d436ed87270 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -313,23 +313,29 @@ static inline D3DPOOL d3dpool_from_wined3daccess(unsigned int access, unsigned i } }
-static inline unsigned int wined3daccess_from_d3dpool(D3DPOOL pool, unsigned int usage) +static inline unsigned int wined3daccess_from_d3dpool(D3DPOOL pool, unsigned int usage, D3DRESOURCETYPE type) { + unsigned int access; + switch (pool) { case D3DPOOL_DEFAULT: - if (usage & D3DUSAGE_DYNAMIC) - return WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; - return WINED3D_RESOURCE_ACCESS_GPU; + access = WINED3D_RESOURCE_ACCESS_GPU; + break; case D3DPOOL_MANAGED: - return WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU - | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU; + break; case D3DPOOL_SYSTEMMEM: case D3DPOOL_SCRATCH: - return WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + access = WINED3D_RESOURCE_ACCESS_CPU; + break; default: - return 0; + access = 0; } + if (type == D3DRTYPE_VERTEXBUFFER || type == D3DRTYPE_INDEXBUFFER + || pool != D3DPOOL_DEFAULT || usage & D3DUSAGE_DYNAMIC) + access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + return access; }
static inline unsigned int wined3d_bind_flags_from_d3d8_usage(DWORD usage) diff --git a/dlls/d3d8/texture.c b/dlls/d3d8/texture.c index 6f17e9da5fd..6a7e6b4203c 100644 --- a/dlls/d3d8/texture.c +++ b/dlls/d3d8/texture.c @@ -1111,7 +1111,7 @@ HRESULT texture_init(struct d3d8_texture *texture, struct d3d8_device *device, if (pool == D3DPOOL_SCRATCH) desc.usage |= WINED3DUSAGE_SCRATCH; desc.bind_flags = wined3d_bind_flags_from_d3d8_usage(usage) | WINED3D_BIND_SHADER_RESOURCE; - desc.access = wined3daccess_from_d3dpool(pool, usage); + desc.access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_TEXTURE); desc.width = width; desc.height = height; desc.depth = 1; @@ -1156,7 +1156,7 @@ HRESULT cubetexture_init(struct d3d8_texture *texture, struct d3d8_device *devic if (pool == D3DPOOL_SCRATCH) desc.usage |= WINED3DUSAGE_SCRATCH; desc.bind_flags = wined3d_bind_flags_from_d3d8_usage(usage) | WINED3D_BIND_SHADER_RESOURCE; - desc.access = wined3daccess_from_d3dpool(pool, usage); + desc.access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_CUBETEXTURE); desc.width = edge_length; desc.height = edge_length; desc.depth = 1; @@ -1203,7 +1203,7 @@ HRESULT volumetexture_init(struct d3d8_texture *texture, struct d3d8_device *dev if (pool == D3DPOOL_SCRATCH) desc.usage |= WINED3DUSAGE_SCRATCH; desc.bind_flags = wined3d_bind_flags_from_d3d8_usage(usage) | WINED3D_BIND_SHADER_RESOURCE; - desc.access = wined3daccess_from_d3dpool(pool, usage); + desc.access = wined3daccess_from_d3dpool(pool, usage, D3DRTYPE_VOLUMETEXTURE); desc.width = width; desc.height = height; desc.depth = depth;
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=46979
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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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)
Always allow read and write mapping of ddraw buffers: test_vb_writeonly() depends on that.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- v2: Rebase on top of the changed patches 1 and 2.
dlls/d3d8/d3d8_private.h | 12 ++++++++++-- dlls/d3d8/device.c | 4 ++-- dlls/d3d8/surface.c | 2 +- dlls/d3d8/texture.c | 6 +++--- dlls/d3d8/volume.c | 2 +- dlls/d3d9/d3d9_private.h | 12 ++++++++++-- dlls/d3d9/device.c | 4 ++-- dlls/d3d9/surface.c | 2 +- dlls/d3d9/volume.c | 2 +- dlls/ddraw/device.c | 4 ++-- dlls/ddraw/executebuffer.c | 2 +- dlls/ddraw/vertexbuffer.c | 2 -- dlls/wined3d/resource.c | 13 ++++++------- dlls/wined3d/utils.c | 1 - include/wine/wined3d.h | 3 +-- 15 files changed, 41 insertions(+), 30 deletions(-)
diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index d436ed87270..96633a22c34 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -287,13 +287,17 @@ unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags, unsigned int u void load_local_constants(const DWORD *d3d8_elements, struct wined3d_shader *wined3d_vertex_shader) DECLSPEC_HIDDEN; size_t parse_token(const DWORD *pToken) DECLSPEC_HIDDEN;
-static inline DWORD d3dusage_from_wined3dusage(unsigned int wined3d_usage, unsigned int bind_flags) +static inline DWORD d3dusage_from_wined3dusage(unsigned int wined3d_usage, unsigned int bind_flags, + unsigned int access) { DWORD usage = wined3d_usage & WINED3DUSAGE_MASK; + if (bind_flags & WINED3D_BIND_RENDER_TARGET) usage |= D3DUSAGE_RENDERTARGET; if (bind_flags & WINED3D_BIND_DEPTH_STENCIL) usage |= D3DUSAGE_DEPTHSTENCIL; + if ((access & (WINED3D_RESOURCE_ACCESS_MAP_W | WINED3D_RESOURCE_ACCESS_MAP_R)) == WINED3D_RESOURCE_ACCESS_MAP_W) + usage |= D3DUSAGE_WRITEONLY; return usage; }
@@ -334,7 +338,11 @@ static inline unsigned int wined3daccess_from_d3dpool(D3DPOOL pool, unsigned int } if (type == D3DRTYPE_VERTEXBUFFER || type == D3DRTYPE_INDEXBUFFER || pool != D3DPOOL_DEFAULT || usage & D3DUSAGE_DYNAMIC) - access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + { + access |= WINED3D_RESOURCE_ACCESS_MAP_W; + if (~usage & D3DUSAGE_WRITEONLY) + access |= WINED3D_RESOURCE_ACCESS_MAP_R; + } return access; }
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 0a7f4775c96..d367f4200cc 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2383,7 +2383,7 @@ static HRESULT d3d8_device_prepare_vertex_buffer(struct d3d8_device *device, UIN TRACE("Growing vertex buffer to %u bytes\n", size);
desc.byte_width = size; - desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY; + desc.usage = WINED3DUSAGE_DYNAMIC; desc.bind_flags = WINED3D_BIND_VERTEX_BUFFER; desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; desc.misc_flags = 0; @@ -2478,7 +2478,7 @@ static HRESULT d3d8_device_prepare_index_buffer(struct d3d8_device *device, UINT TRACE("Growing index buffer to %u bytes\n", size);
desc.byte_width = size; - desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_STATICDECL; + desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_STATICDECL; desc.bind_flags = WINED3D_BIND_INDEX_BUFFER; desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; desc.misc_flags = 0; diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c index 2edc51da38b..c5ce87fd6f8 100644 --- a/dlls/d3d8/surface.c +++ b/dlls/d3d8/surface.c @@ -192,7 +192,7 @@ static HRESULT WINAPI d3d8_surface_GetDesc(IDirect3DSurface8 *iface, D3DSURFACE_
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); desc->Type = D3DRTYPE_SURFACE; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags, wined3d_desc.access); desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->Size = wined3d_desc.size; desc->MultiSampleType = wined3d_desc.multisample_type; diff --git a/dlls/d3d8/texture.c b/dlls/d3d8/texture.c index 6a7e6b4203c..e29924a259e 100644 --- a/dlls/d3d8/texture.c +++ b/dlls/d3d8/texture.c @@ -254,7 +254,7 @@ static HRESULT WINAPI d3d8_texture_2d_GetLevelDesc(IDirect3DTexture8 *iface, UIN { desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); desc->Type = D3DRTYPE_SURFACE; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags, wined3d_desc.access); desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->Size = wined3d_desc.size; desc->MultiSampleType = wined3d_desc.multisample_type; @@ -601,7 +601,7 @@ static HRESULT WINAPI d3d8_texture_cube_GetLevelDesc(IDirect3DCubeTexture8 *ifac { desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); desc->Type = D3DRTYPE_SURFACE; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags, wined3d_desc.access); desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->Size = wined3d_desc.size; desc->MultiSampleType = wined3d_desc.multisample_type; @@ -946,7 +946,7 @@ static HRESULT WINAPI d3d8_texture_3d_GetLevelDesc(IDirect3DVolumeTexture8 *ifac { desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); desc->Type = D3DRTYPE_VOLUME; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags, wined3d_desc.access); desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->Size = wined3d_desc.size; desc->Width = wined3d_desc.width; diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c index 26e0617b7cd..2a0e4a4b768 100644 --- a/dlls/d3d8/volume.c +++ b/dlls/d3d8/volume.c @@ -126,7 +126,7 @@ static HRESULT WINAPI d3d8_volume_GetDesc(IDirect3DVolume8 *iface, D3DVOLUME_DES
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); desc->Type = D3DRTYPE_VOLUME; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags, wined3d_desc.access); desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->Size = wined3d_desc.size; desc->Width = wined3d_desc.width; diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 1d64b368086..856913c88bf 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -299,13 +299,17 @@ static inline struct d3d9_device *impl_from_IDirect3DDevice9Ex(IDirect3DDevice9E return CONTAINING_RECORD(iface, struct d3d9_device, IDirect3DDevice9Ex_iface); }
-static inline DWORD d3dusage_from_wined3dusage(unsigned int wined3d_usage, unsigned int bind_flags) +static inline DWORD d3dusage_from_wined3dusage(unsigned int wined3d_usage, unsigned int bind_flags, + unsigned int access) { DWORD usage = wined3d_usage & WINED3DUSAGE_MASK; + if (bind_flags & WINED3D_BIND_RENDER_TARGET) usage |= D3DUSAGE_RENDERTARGET; if (bind_flags & WINED3D_BIND_DEPTH_STENCIL) usage |= D3DUSAGE_DEPTHSTENCIL; + if ((access & (WINED3D_RESOURCE_ACCESS_MAP_W | WINED3D_RESOURCE_ACCESS_MAP_R)) == WINED3D_RESOURCE_ACCESS_MAP_W) + usage |= D3DUSAGE_WRITEONLY; return usage; }
@@ -346,7 +350,11 @@ static inline unsigned int wined3daccess_from_d3dpool(D3DPOOL pool, unsigned int } if (type == D3DRTYPE_VERTEXBUFFER || type == D3DRTYPE_INDEXBUFFER || pool != D3DPOOL_DEFAULT || usage & D3DUSAGE_DYNAMIC) - access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + { + access |= WINED3D_RESOURCE_ACCESS_MAP_W; + if (~usage & D3DUSAGE_WRITEONLY) + access |= WINED3D_RESOURCE_ACCESS_MAP_R; + } return access; }
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 0a716e524ce..63a65359aec 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2854,7 +2854,7 @@ static HRESULT d3d9_device_prepare_vertex_buffer(struct d3d9_device *device, UIN TRACE("Growing vertex buffer to %u bytes.\n", size);
desc.byte_width = size; - desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY; + desc.usage = WINED3DUSAGE_DYNAMIC; desc.bind_flags = WINED3D_BIND_VERTEX_BUFFER; desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; desc.misc_flags = 0; @@ -2959,7 +2959,7 @@ static HRESULT d3d9_device_prepare_index_buffer(struct d3d9_device *device, UINT TRACE("Growing index buffer to %u bytes.\n", size);
desc.byte_width = size; - desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_STATICDECL; + desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_STATICDECL; desc.bind_flags = WINED3D_BIND_INDEX_BUFFER; desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; desc.misc_flags = 0; diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c index 9aa2154a9c3..44246dd8a68 100644 --- a/dlls/d3d9/surface.c +++ b/dlls/d3d9/surface.c @@ -224,7 +224,7 @@ static HRESULT WINAPI d3d9_surface_GetDesc(IDirect3DSurface9 *iface, D3DSURFACE_
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); desc->Type = D3DRTYPE_SURFACE; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags, wined3d_desc.access); desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->MultiSampleType = wined3d_desc.multisample_type; desc->MultiSampleQuality = wined3d_desc.multisample_quality; diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c index cdc4761963f..606c9b75d4c 100644 --- a/dlls/d3d9/volume.c +++ b/dlls/d3d9/volume.c @@ -127,7 +127,7 @@ static HRESULT WINAPI d3d9_volume_GetDesc(IDirect3DVolume9 *iface, D3DVOLUME_DES
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); desc->Type = D3DRTYPE_VOLUME; - desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); + desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags, wined3d_desc.access); desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); desc->Width = wined3d_desc.width; desc->Height = wined3d_desc.height; diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 4b58b75f3c2..af9f28d8cbf 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -3469,7 +3469,7 @@ static HRESULT d3d_device_prepare_vertex_buffer(struct d3d_device *device, UINT TRACE("Growing vertex buffer to %u bytes\n", size);
desc.byte_width = size; - desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY; + desc.usage = WINED3DUSAGE_DYNAMIC; desc.bind_flags = WINED3D_BIND_VERTEX_BUFFER; desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; desc.misc_flags = 0; @@ -3661,7 +3661,7 @@ static HRESULT d3d_device_prepare_index_buffer(struct d3d_device *device, UINT m TRACE("Growing index buffer to %u bytes\n", size);
desc.byte_width = size; - desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_STATICDECL; + desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_STATICDECL; desc.bind_flags = WINED3D_BIND_INDEX_BUFFER; desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; desc.misc_flags = 0; diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c index 4b4af63b915..f9082dc028c 100644 --- a/dlls/ddraw/executebuffer.c +++ b/dlls/ddraw/executebuffer.c @@ -129,7 +129,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct wined3d_buffer_desc desc;
desc.byte_width = new_size * sizeof(*indices); - desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_STATICDECL; + desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_STATICDECL; desc.bind_flags = WINED3D_BIND_INDEX_BUFFER; desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; desc.misc_flags = 0; diff --git a/dlls/ddraw/vertexbuffer.c b/dlls/ddraw/vertexbuffer.c index 3ad8f7e1bdd..d2c2f8ff804 100644 --- a/dlls/ddraw/vertexbuffer.c +++ b/dlls/ddraw/vertexbuffer.c @@ -119,8 +119,6 @@ static HRESULT d3d_vertex_buffer_create_wined3d_buffer(struct d3d_vertex_buffer
desc.byte_width = buffer->size; desc.usage = WINED3DUSAGE_STATICDECL; - if (buffer->Caps & D3DVBCAPS_WRITEONLY) - desc.usage |= WINED3DUSAGE_WRITEONLY; if (dynamic) desc.usage |= WINED3DUSAGE_DYNAMIC; desc.bind_flags = WINED3D_BIND_VERTEX_BUFFER; diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 82e9019a0ed..90025e9648b 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -28,10 +28,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
-static void resource_check_usage(DWORD usage) +static void resource_check_usage(DWORD usage, unsigned int access) { - static const DWORD handled = WINED3DUSAGE_WRITEONLY - | WINED3DUSAGE_DYNAMIC + static const DWORD handled = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_STATICDECL | WINED3DUSAGE_OVERLAY | WINED3DUSAGE_SCRATCH @@ -39,7 +38,7 @@ static void resource_check_usage(DWORD usage) | WINED3DUSAGE_LEGACY_CUBEMAP | ~WINED3DUSAGE_MASK;
- /* WINED3DUSAGE_WRITEONLY is supposed to result in write-combined mappings + /* Write-only CPU access is supposed to result in write-combined mappings * being returned. OpenGL doesn't give us explicit control over that, but * the hints and access flags we set for typical access patterns on * dynamic resources should in theory have the same effect on the OpenGL @@ -47,8 +46,8 @@ static void resource_check_usage(DWORD usage)
if (usage & ~handled) FIXME("Unhandled usage flags %#x.\n", usage & ~handled); - if ((usage & (WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY)) == WINED3DUSAGE_DYNAMIC) - WARN_(d3d_perf)("WINED3DUSAGE_DYNAMIC used without WINED3DUSAGE_WRITEONLY.\n"); + if (usage & WINED3DUSAGE_DYNAMIC && access & WINED3D_RESOURCE_ACCESS_MAP_R) + WARN_(d3d_perf)("WINED3DUSAGE_DYNAMIC used with WINED3D_RESOURCE_ACCESS_MAP_R.\n"); }
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device, @@ -82,7 +81,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * {WINED3D_RTYPE_TEXTURE_3D, 0, WINED3D_GL_RES_TYPE_TEX_3D}, };
- resource_check_usage(usage); + resource_check_usage(usage, access);
if (usage & WINED3DUSAGE_SCRATCH && access & WINED3D_RESOURCE_ACCESS_GPU) { diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index dd70d3fc2d5..7b422022138 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -4515,7 +4515,6 @@ const char *debug_d3dusage(DWORD usage)
init_debug_buffer(&buffer, "0"); #define WINED3DUSAGE_TO_STR(x) if (usage & x) { debug_append(&buffer, #x, " | "); usage &= ~x; } - WINED3DUSAGE_TO_STR(WINED3DUSAGE_WRITEONLY); WINED3DUSAGE_TO_STR(WINED3DUSAGE_SOFTWAREPROCESSING); WINED3DUSAGE_TO_STR(WINED3DUSAGE_DONOTCLIP); WINED3DUSAGE_TO_STR(WINED3DUSAGE_POINTS); diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 06f4f76ef21..e09e4e1fce2 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -914,7 +914,6 @@ enum wined3d_shader_type #define WINED3D_BIND_DEPTH_STENCIL 0x00000040 #define WINED3D_BIND_UNORDERED_ACCESS 0x00000080
-#define WINED3DUSAGE_WRITEONLY 0x00000008 #define WINED3DUSAGE_SOFTWAREPROCESSING 0x00000010 #define WINED3DUSAGE_DONOTCLIP 0x00000020 #define WINED3DUSAGE_POINTS 0x00000040 @@ -926,7 +925,7 @@ enum wined3d_shader_type #define WINED3DUSAGE_RESTRICT_SHARED_RESOURCE 0x00002000 #define WINED3DUSAGE_DMAP 0x00004000 #define WINED3DUSAGE_TEXTAPI 0x10000000 -#define WINED3DUSAGE_MASK 0x10007bf8 +#define WINED3DUSAGE_MASK 0x10007bf0
#define WINED3DUSAGE_SCRATCH 0x00400000 #define WINED3DUSAGE_PRIVATE 0x00800000
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=46980
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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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)
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3dcompiler_43/reflection.c | 1 + dlls/d3dcompiler_43/tests/Makefile.in | 1 + 2 files changed, 2 insertions(+)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index b36631b9855..d10d0b1b0b3 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -21,6 +21,7 @@ #include "config.h" #include "wine/port.h"
+#include "initguid.h" #include "d3dcompiler_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler); diff --git a/dlls/d3dcompiler_43/tests/Makefile.in b/dlls/d3dcompiler_43/tests/Makefile.in index 55b14ad7b94..3b4b7a5a42f 100644 --- a/dlls/d3dcompiler_43/tests/Makefile.in +++ b/dlls/d3dcompiler_43/tests/Makefile.in @@ -1,5 +1,6 @@ TESTDLL = d3dcompiler_43.dll IMPORTS = d3d9 d3dx9 user32 +EXTRADEFS = -DD3D_COMPILER_VERSION=43
C_SRCS = \ asm.c \
On Wed, Jan 30, 2019 at 4:27 PM Matteo Bruni mbruni@codeweavers.com wrote:
Signed-off-by: Matteo Bruni mbruni@codeweavers.com
I forgot to mention that this was spotted by Andrey Gusev, lots of thanks to him :)
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=46981
Your paranoid android.
=== debian9 (32 bit report) ===
d3dcompiler_43: reflection.c:85: Test failed: D3DReflect failed, got 80004002, expected 0 Unhandled exception: page fault on read access to 0x00000040 in 32-bit code (0x7ed3d76c).
Report errors: d3dcompiler_43:reflection crashed (c0000005)
=== debian9 (32 bit Chinese:China report) ===
d3dcompiler_43: reflection.c:85: Test failed: D3DReflect failed, got 80004002, expected 0 Unhandled exception: page fault on read access to 0x00000040 in 32-bit code (0x7eb9f76c).
Report errors: d3dcompiler_43:reflection crashed (c0000005)
=== 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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 (32 bit WoW report) ===
d3dcompiler_43: reflection.c:85: Test failed: D3DReflect failed, got 80004002, expected 0 Unhandled exception: page fault on read access to 0x00000040 in 32-bit code (0x7ed3d76c).
Report errors: d3dcompiler_43:reflection crashed (c0000005)
=== debian9 (64 bit WoW report) ===
d3dcompiler_43: reflection.c:85: Test failed: D3DReflect failed, got 80004002, expected 0 Unhandled exception: page fault on read access to 0xffffffffffffffff in 64-bit code (0x00007fe45a8f83df).
Report errors: d3dcompiler_43:reflection crashed (c0000005)
=== 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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)
On Wed, Jan 30, 2019 at 5:42 PM Marvin testbot@winehq.org wrote:
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=46981
Your paranoid android.
=== debian9 (32 bit report) ===
d3dcompiler_43: reflection.c:85: Test failed: D3DReflect failed, got 80004002, expected 0 Unhandled exception: page fault on read access to 0x00000040 in 32-bit code (0x7ed3d76c).
FWIW I get this crash if I don't rebuild the tests with -DD3D_COMPILER_VERSION=43. I suspect the testbot didn't rerun configure and thus regenerate d3dcompiler_43/tests/Makefile.
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=46976
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) 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) 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) 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) 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) 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) 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)