Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45279 Signed-off-by: Andrew Wesie awesie@gmail.com --- dlls/wined3d/buffer.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index e7b05157cc..247db45bb7 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1399,6 +1399,10 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device * (Half-Life 2 and others.) */ dynamic_buffer_ok = gl_info->supported[APPLE_FLUSH_BUFFER_RANGE] || gl_info->supported[ARB_MAP_BUFFER_RANGE];
+ /* We need vertex buffer objects in OpenGL core profiles. Force GPU access. */ + if (bind_flags & WINED3D_BIND_VERTEX_BUFFER) + access |= WINED3D_RESOURCE_ACCESS_GPU; + if (!gl_info->supported[ARB_VERTEX_BUFFER_OBJECT]) { TRACE("Not creating a BO because GL_ARB_vertex_buffer is not supported.\n");
On Mon, 15 Oct 2018 at 08:06, Andrew Wesie awesie@gmail.com wrote:
- /* We need vertex buffer objects in OpenGL core profiles. Force GPU access. */
- if (bind_flags & WINED3D_BIND_VERTEX_BUFFER)
access |= WINED3D_RESOURCE_ACCESS_GPU;
I don't think that's correct. If anything, I think we should be failing resource creation for resources with BIND_VERTEX_BUFFER without RESOURCE_ACCESS_GPU. We have d3d11 tests to prove that, and the only reason we currently don't reject these in wined3d is because we already reject them in d3d11 instead.
From the logs I've seen for this, one (45486) was using d3d9 with
software vertex processing, in which case we probably should either just set RESOURCE_ACCESS_GPU on resources in the system memory pool, or actually implement software vertex processing. The other (45279) was using ddraw. I think it was using a TnLHalDevice, but in ddraw often anything goes, except when it doesn't. The log from bug 45987 didn't contain the CreateDevice() flags.