https://bugs.winehq.org/show_bug.cgi?id=44514
Bug ID: 44514 Summary: Elder Scrolls Online (Dragon Bones update) requires more than 32 samplers in pixel shaders with D3D11 renderer Product: Wine Version: 3.1 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: ssorgatem@gmail.com Distribution: ---
Practically the same as https://bugs.winehq.org/show_bug.cgi?id=41213
Missing ground textures that make the game rather hard to play, same as in the screenshots for that patch.
The difference is that back then the game required more than 16 samplers... which was fixed, but it now requries more than 32 samplers:
fixme:d3d:context_bind_shader_resources Shader 0x7fff03eb85a0 needs 37 samplers, but only 32 are supported.
Happens in latest staging, 3.0 and 3.1
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #1 from Ivan ivan88@centrum.cz --- Created attachment 60485 --> https://bugs.winehq.org/attachment.cgi?id=60485 d3d log
I add d3d log (2.20 staging, though I also checked 3.1, no difference).
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #2 from Matteo Bruni matteo.mystral@gmail.com --- It sounds like the game started to use even more textures in a single shader... You could try to attach a (full, compressed) +d3d,d3d_shader log to make sure that this is actually the case.
The general issue is well understood, I think, and we'd need to add ARB_bindless_texture support to fix this once and for all.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #3 from Adrià Cereto i Massagué ssorgatem@gmail.com --- Created attachment 60486 --> https://bugs.winehq.org/attachment.cgi?id=60486 +d3d,d3d_shader log
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #4 from Adrià Cereto i Massagué ssorgatem@gmail.com --- For what is worth, the game works well and renders properly if using https://github.com/doitsujin/dxvk instead of wine's d3d11, and latest mesa-git, at least on AMD.
https://bugs.winehq.org/show_bug.cgi?id=44514
nick@look.ca changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@look.ca
--- Comment #5 from nick@look.ca --- (In reply to Adrià Cereto i Massagué from comment #4)
For what is worth, the game works well and renders properly if using https://github.com/doitsujin/dxvk instead of wine's d3d11, and latest mesa-git, at least on AMD.
Not worth anything in this bug report.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #6 from nick@look.ca --- There's more than enough logs and or evidence concerning this bug. Why is it still unconfirmed?
https://bugs.winehq.org/show_bug.cgi?id=44514
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #7 from Zebediah Figura z.figura12@gmail.com --- Setting confirmed as this bug affects multiple users.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #8 from nick@look.ca --- (In reply to Zebediah Figura from comment #7)
Setting confirmed as this bug affects multiple users.
Thank you.
https://bugs.winehq.org/show_bug.cgi?id=44514
James Christie james.aaron.christie@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |james.aaron.christie@gmail. | |com
https://bugs.winehq.org/show_bug.cgi?id=44514
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=44514
Chris_9 jukeller@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jukeller@gmx.de
https://bugs.winehq.org/show_bug.cgi?id=44514
jean@langmatt.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jean@langmatt.com
--- Comment #9 from jean@langmatt.com --- I investigated a bit and found that the 32 limit is an OpenGL limit which can only be bypassed by using bindless textures, but as the OpenGL wiki says, they are not safe : https://www.khronos.org/opengl/wiki/Bindless_Texture It means that to resolve this bug, textures handling may need to be entirely rewritten(not sure about this though).
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #10 from nick@look.ca --- (In reply to jean from comment #9)
I investigated a bit and found that the 32 limit is an OpenGL limit which can only be bypassed by using bindless textures, but as the OpenGL wiki says, they are not safe : https://www.khronos.org/opengl/wiki/Bindless_Texture It means that to resolve this bug, textures handling may need to be entirely rewritten(not sure about this though).
I checked with glxinfo and I have that opengl extension enable but it doesn't fix this bug so I guess it also has to be fixed through wine.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #11 from jean@langmatt.com --- (In reply to nick from comment #10)
(In reply to jean from comment #9)
I investigated a bit and found that the 32 limit is an OpenGL limit which can only be bypassed by using bindless textures, but as the OpenGL wiki says, they are not safe : https://www.khronos.org/opengl/wiki/Bindless_Texture It means that to resolve this bug, textures handling may need to be entirely rewritten(not sure about this though).
I checked with glxinfo and I have that opengl extension enable but it doesn't fix this bug so I guess it also has to be fixed through wine.
Yes, bindless textures needs to be manually implemented in wined3d's code to work.
https://bugs.winehq.org/show_bug.cgi?id=44514
Andrew Wesie awesie@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |awesie@gmail.com
--- Comment #12 from Andrew Wesie awesie@gmail.com --- Based on https://appdb.winehq.org/objectManager.php?sClass=version&iId=35677&... this also affects Quake Champions (unconfirmed).
Based on https://bugs.winehq.org/show_bug.cgi?id=45358 this also affects Assassin's Creed Syndicate (unconfirmed).
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #13 from Andrew Wesie awesie@gmail.com --- Created attachment 62452 --> https://bugs.winehq.org/attachment.cgi?id=62452 Patch to use bindless texture
This patch uses the bindless texture extension to support more than 32 bound shader resource views. I think it fixed ESO but I did not get very far into the game.
https://bugs.winehq.org/show_bug.cgi?id=44514
zzzzzyzz@hacari.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzzzzyzz@hacari.org
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #14 from nick@look.ca --- (In reply to Andrew Wesie from comment #13)
Created attachment 62452 [details] Patch to use bindless texture
This patch uses the bindless texture extension to support more than 32 bound shader resource views. I think it fixed ESO but I did not get very far into the game.
I'm on Arch Linux using wine-stagig-nine that I applied your patch, works great. :)
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #15 from Andrew Wesie awesie@gmail.com --- (In reply to nick from comment #14)
I'm on Arch Linux using wine-stagig-nine that I applied your patch, works great. :)
Are you running on a NVIDIA or AMD (Mesa) gpu? My testing shows that the patch has some performance issues on Mesa due to texture decompression.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #16 from nick@look.ca --- (In reply to Andrew Wesie from comment #15)
(In reply to nick from comment #14)
I'm on Arch Linux using wine-stagig-nine that I applied your patch, works great. :)
Are you running on a NVIDIA or AMD (Mesa) gpu? My testing shows that the patch has some performance issues on Mesa due to texture decompression.
I'm running on AMD, now that you mention this, I did notice some performance issues, I thought could be lag.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #17 from nick@look.ca --- (In reply to Andrew Wesie from comment #15)
(In reply to nick from comment #14)
I'm on Arch Linux using wine-stagig-nine that I applied your patch, works great. :)
Are you running on a NVIDIA or AMD (Mesa) gpu? My testing shows that the patch has some performance issues on Mesa due to texture decompression.
Update on using the patch, just to recap with more info, I'm running with AMD NANO aka r9 fury series on Mesa. Further testing I can say the performance issues with me anyway was with lag and that my card runs fine with texture decompression. The day before when I posted I was doing the dolmens in Auridon in the late afternoon when there's way to many people doing them hence the lag and poor performance other wise everyrthing else runs as smooth as silk, again that's with my setup, other people might have other issues. I also have the basic internet package.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #18 from Adrià Cereto i Massagué ssorgatem@gmail.com --- I've tried the patch and it seems to fix the issue.
Can't comment on performance impact, since I don't have anything to compare it to, but it seems to work well enough.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #19 from nick@look.ca --- patch failed on the new Wine 3.20
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #20 from nick@look.ca --- Sorry forgot to put the error message of why the patch failed, hee it is:
patching file dlls/kernel32/process.c Hunk #1 succeeded at 2720 (offset 291 lines). patching file dlls/wined3d/adapter_gl.c Hunk #2 succeeded at 2083 (offset 9 lines). patching file dlls/wined3d/context.c Hunk #1 succeeded at 3808 (offset 3 lines). patching file dlls/wined3d/device.c Hunk #1 succeeded at 838 (offset 1 line). patching file dlls/wined3d/glsl_shader.c Hunk #3 succeeded at 7480 (offset 3 lines). Hunk #4 succeeded at 11516 (offset 6 lines). patching file dlls/wined3d/texture.c Hunk #1 FAILED at 926. Hunk #2 succeeded at 981 with fuzz 1 (offset 31 lines). Hunk #3 succeeded at 990 (offset 31 lines). Hunk #4 succeeded at 1074 with fuzz 2 (offset 15 lines). 1 out of 4 hunks FAILED -- saving rejects to file dlls/wined3d/texture.c.rej patching file dlls/wined3d/view.c Hunk #1 succeeded at 851 with fuzz 1 (offset 7 lines). patching file dlls/wined3d/wined3d_gl.h patching file dlls/wined3d/wined3d_private.h Hunk #1 succeeded at 1426 (offset 8 lines). Hunk #2 succeeded at 2983 (offset 6 lines). Hunk #3 succeeded at 3076 (offset 1 line). Hunk #4 succeeded at 3384 (offset -33 lines). Hunk #5 succeeded at 3919 (offset 13 lines). ==> ERROR: A failure occurred in prepare(). Aborting...
https://bugs.winehq.org/show_bug.cgi?id=44514
rsrjr98@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rsrjr98@gmail.com
--- Comment #21 from rsrjr98@gmail.com --- I'm fairly new to linux, and I have no idea how to even apply the patch, could someone pls explain it to me? ;-;
https://bugs.winehq.org/show_bug.cgi?id=44514
pattietreutel katyaberezyaka@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |katyaberezyaka@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #22 from nick@look.ca --- (In reply to rsrjr98 from comment #21)
I'm fairly new to linux, and I have no idea how to even apply the patch, could someone pls explain it to me? ;-;
This patch only works with wine-3.18, any newer versions the patch breaks with an error.
Grab the source for vanilla wine. You can do this with git clone git://source.winehq.org/git/wine.git. This will clone everything into a new directory called "wine". (Again don't git clone this one because it's the newest version get 3.16)
Install all required dependencies. The way to do this varies from distro to distro, so simply look them up online.
Run ./configure in the "wine" folder. This will check all dependencies and inform you about the ones that you forgot. After ./configure terminates without errors, you can now be sure that you have all required dependencies.
Download and move or copy the patch into the wine folder
Run patch -p1 < patch -p1 < /path/to/0001-wined3d-Use-bindless-textures-for-GLSL-shaders.patch inside wine folder
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #23 from nick@look.ca --- Forgot to say in case you don't know you the need to run make to start the compilation and then sudo make install.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #24 from nick@look.ca --- Why can't you go back and edit in this thing, anyway in the brackets I noticed I put 3.16, it's 3.18
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #25 from nick@look.ca --- just tried it with 3.19 and it also works with that version but 3.20 and up it breaks.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #26 from nick@look.ca --- Unfortunately near the end of the compilation install version 3.19 breaks with:
device.c: In function ‘create_dummy_sampler_handles’: device.c:858:60: error: ‘struct wined3d_device’ has no member named ‘dummy_textures’ 858 | const struct wined3d_dummy_textures *textures = &device->dummy_textures; | ^~ make[1]: *** [Makefile:385: device.o] Error 1
So just stick with version 3.18
https://bugs.winehq.org/show_bug.cgi?id=44514
Nikita nickarhipoff@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nickarhipoff@gmail.com
--- Comment #27 from Nikita nickarhipoff@gmail.com ---
Run patch -p1 < patch -p1 < /path/to/0001-wined3d-Use-bindless-textures-for-GLSL-shaders.patch inside wine folder
I compiled WINE 3.18 amd64 and stuck on this. Patch command do not find the patch file in the WINE directory. Although I copied the patch to a directory (I created a text file, pasted the patch into it and renamed the file). What am I doing wrong?
Is there any other way to apply this patch to the game? For example, how to patch Proton 3.16 files on Steam somehow?
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #28 from nick@look.ca --- (In reply to Nikita from comment #27)
Run patch -p1 < patch -p1 < /path/to/0001-wined3d-Use-bindless-textures-for-GLSL-shaders.patch inside wine folder
I compiled WINE 3.18 amd64 and stuck on this. Patch command do not find the patch file in the WINE directory. Although I copied the patch to a directory (I created a text file, pasted the patch into it and renamed the file). What am I doing wrong?
Is there any other way to apply this patch to the game? For example, how to patch Proton 3.16 files on Steam somehow?
Yeah I tried compiling WINE 3.18 again and it failed on compilation, was gonna suggest wine-staging 3.18 but also failed, the one I have is wine-staging-nine that I complied awhile ago that works and thank god I saved that one, as for steam I neverr used it so I wouldn't know anything about that. Wine-staging-nine was discontinued, so there's no way of getting the source. My disrtro is Arch Linux and I like I said I have as saved wine-staging-nine-3.18-1-x86_64.pkg.tar.xz that would be installed like sudo pacman -U wine-staging-nine-3.18-1-x86_64.pkg.tar.xz. If there's a way I can send it to you, I don't have an ftp site setup but if you do and if you have the same distro, you're welcome to it.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #29 from nick@look.ca --- I sent it to you through gmail.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #30 from Nikita nickarhipoff@gmail.com --- (In reply to nick from comment #29)
I sent it to you through gmail.
I received your archive, thank you. But I did not succeed in installing WINE from it. I have Ubuntu 19.10 installed. I have little experience on linux. But I was able to compile WINE 3.16-18 from source. But I could not install this patch according to the instructions given here.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #31 from nick@look.ca --- (In reply to Nikita from comment #30)
(In reply to nick from comment #29)
I sent it to you through gmail.
I received your archive, thank you. But I did not succeed in installing WINE from it. I have Ubuntu 19.10 installed. I have little experience on linux. But I was able to compile WINE 3.16-18 from source. But I could not install this patch according to the instructions given here.
I sent you a compiled version for Arch Linux so no it only installs through that distro. Patch breaks on the other versions you tried to install. Looks like it's a waiting game til wine fixes this bug which is taking a lot longer than before when there was a similar bug.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #32 from Nikita nickarhipoff@gmail.com --- Comment on attachment 62452 --> https://bugs.winehq.org/attachment.cgi?id=62452 Patch to use bindless texture
From bee51d2c42a90c8146993cf77a2f76c2002b1c34 Mon Sep 17 00:00:00 2001 From: Andrew Wesie awesie@gmail.com Date: Tue, 2 Oct 2018 23:28:01 -0500 Subject: [PATCH] wined3d: Use bindless textures for GLSL shaders.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44514 Signed-off-by: Andrew Wesie awesie@gmail.com
dlls/wined3d/adapter_gl.c | 6 +++ dlls/wined3d/context.c | 6 +++ dlls/wined3d/device.c | 54 ++++++++++++++++++++ dlls/wined3d/glsl_shader.c | 113 ++++++++++++++++++++++++++++++++++++++++- dlls/wined3d/texture.c | 18 ++++--- dlls/wined3d/view.c | 29 +++++++++++ dlls/wined3d/wined3d_gl.h | 1 + dlls/wined3d/wined3d_private.h | 24 +++++++++ 8 files changed, 244 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 145f0f9..3471cb3 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -57,6 +57,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
/* ARB */ {"GL_ARB_base_instance", ARB_BASE_INSTANCE },
- {"GL_ARB_bindless_texture", ARB_BINDLESS_TEXTURE }, {"GL_ARB_blend_func_extended", ARB_BLEND_FUNC_EXTENDED }, {"GL_ARB_buffer_storage", ARB_BUFFER_STORAGE }, {"GL_ARB_clear_buffer_object", ARB_CLEAR_BUFFER_OBJECT },
@@ -2073,6 +2074,11 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) /* GL_ARB_base_instance */ USE_GL_FUNC(glDrawArraysInstancedBaseInstance) USE_GL_FUNC(glDrawElementsInstancedBaseVertexBaseInstance)
- /* GL_ARB_bindless_texture */
- USE_GL_FUNC(glGetTextureSamplerHandleARB)
- USE_GL_FUNC(glMakeTextureHandleNonResidentARB)
- USE_GL_FUNC(glMakeTextureHandleResidentARB)
- USE_GL_FUNC(glUniformHandleui64ARB) /* GL_ARB_blend_func_extended */ USE_GL_FUNC(glBindFragDataLocationIndexed) USE_GL_FUNC(glGetFragDataIndex)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index b936975..490b847 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3805,6 +3805,12 @@ static void context_bind_shader_resources(struct wined3d_context *context, if (!(shader = state->shader[shader_type])) return;
- if (device->shader_backend->shader_load_sampler_handles)
- {
device->shader_backend->shader_load_sampler_handles(device->shader_priv, context, state, shader);
return;
- }
- tex_unit_map = context_get_tex_unit_mapping(context, &shader->reg_maps.shader_version, &base, &count);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 41be0eb..eb20363 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -837,6 +837,59 @@ static void destroy_default_samplers(struct wined3d_device *device, struct wined device->null_sampler = NULL; }
+static GLuint64 create_dummy_sampler_handle(struct wined3d_device *device, struct wined3d_context *context,
GLuint texture)
+{
- const struct wined3d_gl_info *gl_info = context->gl_info;
- GLuint64 handle;
- handle = GL_EXTCALL(glGetTextureSamplerHandleARB(texture, device->default_sampler->name));
- GL_EXTCALL(glMakeTextureHandleResidentARB(handle));
- checkGLcall("glMakeTextureHandleResidentARB");
- return handle;
+}
+/* Context activation is done by the caller. */ +static void create_dummy_sampler_handles(struct wined3d_device *device, struct wined3d_context *context) +{
- const struct wined3d_gl_info *gl_info = context->gl_info;
- const struct wined3d_dummy_textures *textures = &device->dummy_textures;
- struct wined3d_dummy_sampler_handles *handles = &device->dummy_sampler_handles;
- if (!gl_info->supported[ARB_BINDLESS_TEXTURE])
return;
- if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE])
- {
handles->tex_2d_ms = create_dummy_sampler_handle(device, context, textures->tex_2d_ms);
handles->tex_2d_ms_array = create_dummy_sampler_handle(device, context, textures->tex_2d_ms_array);
- }
- if (gl_info->supported[ARB_TEXTURE_BUFFER_OBJECT])
handles->tex_buffer = create_dummy_sampler_handle(device, context, textures->tex_buffer);
- if (gl_info->supported[EXT_TEXTURE_ARRAY])
- {
handles->tex_2d_array = create_dummy_sampler_handle(device, context, textures->tex_2d_array);
handles->tex_1d_array = create_dummy_sampler_handle(device, context, textures->tex_1d_array);
- }
- if (gl_info->supported[ARB_TEXTURE_CUBE_MAP_ARRAY])
handles->tex_cube_array = create_dummy_sampler_handle(device, context, textures->tex_cube_array);
- if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
handles->tex_cube = create_dummy_sampler_handle(device, context, textures->tex_cube);
- if (gl_info->supported[EXT_TEXTURE3D])
handles->tex_3d = create_dummy_sampler_handle(device, context, textures->tex_3d);
- if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
handles->tex_rect = create_dummy_sampler_handle(device, context, textures->tex_rect);
- handles->tex_2d = create_dummy_sampler_handle(device, context, textures->tex_2d);
- handles->tex_1d = create_dummy_sampler_handle(device, context, textures->tex_1d);
+}
static LONG fullscreen_style(LONG style) { /* Make sure the window is managed, otherwise we won't get keyboard input. */ @@ -1051,6 +1104,7 @@ static void wined3d_device_create_primary_opengl_context_cs(void *object) context = context_acquire(device, target, 0); create_dummy_textures(device, context); create_default_samplers(device, context);
- create_dummy_sampler_handles(device, context); context_release(context);
}
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index ede476c..20ae4de 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -698,6 +698,112 @@ static void shader_glsl_append_sampler_binding_qualifier(struct wined3d_string_b ERR("Unmapped sampler %u.\n", sampler_idx); }
+static BOOL shader_glsl_use_bindless_texture(const struct wined3d_gl_info *gl_info,
unsigned int sampler_idx, const struct wined3d_shader_resource_info *resource_info)
+{
- return gl_info->supported[ARB_BINDLESS_TEXTURE]
&& shader_glsl_use_layout_binding_qualifier(gl_info)
&& sampler_idx >= 16
&& resource_info->type != WINED3D_SHADER_RESOURCE_BUFFER;
+}
+static GLuint64 shader_glsl_dummy_sampler_handle(struct wined3d_context *context,
enum wined3d_shader_resource_type type)
+{
- const struct wined3d_device *device = context->device;
- switch (type)
- {
- case WINED3D_SHADER_RESOURCE_BUFFER:
return device->dummy_sampler_handles.tex_buffer;
- case WINED3D_SHADER_RESOURCE_TEXTURE_1D:
return device->dummy_sampler_handles.tex_1d;
- case WINED3D_SHADER_RESOURCE_TEXTURE_2D:
return device->dummy_sampler_handles.tex_2d;
- case WINED3D_SHADER_RESOURCE_TEXTURE_3D:
return device->dummy_sampler_handles.tex_3d;
- case WINED3D_SHADER_RESOURCE_TEXTURE_CUBE:
return device->dummy_sampler_handles.tex_cube;
- case WINED3D_SHADER_RESOURCE_TEXTURE_1DARRAY:
return device->dummy_sampler_handles.tex_1d_array;
- case WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY:
return device->dummy_sampler_handles.tex_2d_array;
- case WINED3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY:
return device->dummy_sampler_handles.tex_cube_array;
- case WINED3D_SHADER_RESOURCE_TEXTURE_2DMS:
return device->dummy_sampler_handles.tex_2d_ms;
- case WINED3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY:
return device->dummy_sampler_handles.tex_2d_array;
- default:
FIXME("Unhandled resource type %#x.\n", type);
return 0;
- }
+}
+static void shader_glsl_load_sampler_handles(void *shader_priv, struct wined3d_context *context,
const struct wined3d_state *state, const struct wined3d_shader *shader)
+{
- const struct glsl_context_data *ctx_data = context->shader_backend_data;
- const struct wined3d_device *device = context->device;
- const struct wined3d_gl_info *gl_info = context->gl_info;
- struct shader_glsl_priv *priv = shader_priv;
- struct wined3d_string_buffer *sampler_name = string_buffer_get(&priv->string_buffers);
- enum wined3d_shader_type shader_type = shader->reg_maps.shader_version.type;
- const char *prefix = shader_glsl_get_prefix(shader_type);
- struct wined3d_shader_sampler_map_entry *entry;
- struct wined3d_shader_resource_view *view;
- struct wined3d_sampler *sampler;
- unsigned int bind_idx, i;
- GLint name_loc;
- for (i = 0; i < shader->reg_maps.sampler_map.count; ++i)
- {
entry = &shader->reg_maps.sampler_map.entries[i];
bind_idx = shader_glsl_map_tex_unit(context, &shader->reg_maps.shader_version, entry->bind_idx);
if (entry->sampler_idx == WINED3D_SAMPLER_DEFAULT)
sampler = device->default_sampler;
else if (!(sampler = state->sampler[shader_type][entry->sampler_idx]))
sampler = device->null_sampler;
string_buffer_sprintf(sampler_name, "%s_sampler%u", prefix, entry->bind_idx);
name_loc = GL_EXTCALL(glGetUniformLocation(ctx_data->glsl_program->id, sampler_name->buffer));
if (name_loc == -1)
{
ERR("No uniform location at %u, %s\n", i, sampler_name->buffer);
continue;
}
if (!(view = state->shader_resource_view[shader_type][entry->resource_idx]))
WARN("No resource view bound at index %u, %u.\n", shader_type, entry->resource_idx);
if (shader_glsl_use_bindless_texture(gl_info, i, &shader->reg_maps.resource_info[entry->resource_idx]))
{
GLuint64 handle;
if (view)
{
handle = wined3d_shader_resource_view_handle(view, sampler, context);
}
else
{
handle = shader_glsl_dummy_sampler_handle(context,
shader->reg_maps.resource_info[entry->resource_idx].type);
}
GL_EXTCALL(glUniformHandleui64ARB(name_loc, handle));
checkGLcall("glUniformHandleui64ARB");
}
else if (bind_idx == WINED3D_UNMAPPED_STAGE || bind_idx >= gl_info->limits.combined_samplers)
{
ERR("Trying to load sampler %s on unsupported unit %u.\n", sampler_name->buffer, bind_idx);
}
else if (view)
{
wined3d_shader_resource_view_bind(view, bind_idx, sampler, context);
}
- }
- string_buffer_release(&priv->string_buffers, sampler_name);
+}
/* Context activation is done by the caller. */ static void shader_glsl_load_samplers(const struct wined3d_context *context, struct shader_glsl_priv *priv, GLuint program_id, const struct wined3d_shader_reg_maps *reg_maps) @@ -2345,7 +2451,9 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont break; }
if (shader_glsl_use_layout_binding_qualifier(gl_info))
if (shader_glsl_use_bindless_texture(gl_info, i, ®_maps->resource_info[entry->resource_idx]))
shader_addline(buffer, "layout(bindless_sampler)\n");
else if (shader_glsl_use_layout_binding_qualifier(gl_info)) shader_glsl_append_sampler_binding_qualifier(buffer, context, version, entry->bind_idx); shader_addline(buffer, "uniform %s%s %s_sampler%u;\n", sampler_type_prefix, sampler_type, prefix, entry->bind_idx);
@@ -7369,6 +7477,8 @@ static void shader_glsl_generate_alpha_test(struct wined3d_string_buffer *buffer static void shader_glsl_enable_extensions(struct wined3d_string_buffer *buffer, const struct wined3d_gl_info *gl_info) {
- if (gl_info->supported[ARB_BINDLESS_TEXTURE])
if (gl_info->supported[ARB_CULL_DISTANCE]) shader_addline(buffer, "#extension GL_ARB_cull_distance : enable\n"); if (gl_info->supported[ARB_GPU_SHADER5])shader_addline(buffer, "#extension GL_ARB_bindless_texture : enable\n");
@@ -11400,6 +11510,7 @@ const struct wined3d_shader_backend_ops glsl_shader_backend = shader_glsl_get_caps, shader_glsl_color_fixup_supported, shader_glsl_has_ffp_proj_control,
- shader_glsl_load_sampler_handles,
};
static void glsl_vertex_pipe_vp_enable(const struct wined3d_gl_info *gl_info, BOOL enable) {} diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 67a903e..d1520f6 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -926,7 +926,7 @@ void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined }
/* Context activation is done by the caller. */ -void wined3d_texture_bind(struct wined3d_texture *texture, +GLuint wined3d_texture_get_name(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -950,10 +950,7 @@ void wined3d_texture_bind(struct wined3d_texture *texture, target = texture->target;
if (gl_tex->name)
- {
context_bind_texture(context, target, gl_tex->name);
return;
- }
return gl_tex->name;
gl_info->gl_ops.gl.p_glGenTextures(1, &gl_tex->name); checkGLcall("glGenTextures");
@@ -962,7 +959,7 @@ void wined3d_texture_bind(struct wined3d_texture *texture, if (!gl_tex->name) { ERR("Failed to generate a texture name.\n");
return;
return 0;
}
/* Initialise the state of the texture object to the OpenGL defaults, not
@@ -1062,6 +1059,15 @@ void wined3d_texture_bind(struct wined3d_texture *texture, gl_info->gl_ops.gl.p_glTexParameteriv(target, GL_TEXTURE_SWIZZLE_RGBA, &swizzle.x); checkGLcall("glTexParameteriv(GL_TEXTURE_SWIZZLE_RGBA)"); }
- return gl_tex->name;
+}
+/* Context activation is done by the caller. */ +void wined3d_texture_bind(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb)
+{
- context_bind_texture(context, texture->target, wined3d_texture_get_name(texture, context, srgb));
}
/* Context activation is done by the caller. */ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c index 145fcfa..d6647c4 100644 --- a/dlls/wined3d/view.c +++ b/dlls/wined3d/view.c @@ -844,6 +844,35 @@ void wined3d_shader_resource_view_bind(struct wined3d_shader_resource_view *view wined3d_sampler_bind(sampler, unit, texture, context); }
+GLuint64 wined3d_shader_resource_view_handle(struct wined3d_shader_resource_view *view,
struct wined3d_sampler *sampler, struct wined3d_context *context)
+{
- const struct wined3d_gl_info *gl_info = context->gl_info;
- GLuint name;
- GLuint64 handle;
- if (view->gl_view.name)
- {
name = view->gl_view.name;
- }
- else if (view->resource->type == WINED3D_RTYPE_BUFFER)
- {
FIXME("Buffer shader resources not supported.\n");
return 0;
- }
- else
- {
struct wined3d_texture *texture = wined3d_texture_from_resource(view->resource);
name = wined3d_texture_get_name(texture, context, FALSE);
- }
- handle = GL_EXTCALL(glGetTextureSamplerHandleARB(name, sampler->name));
- checkGLcall("glGetTextureSamplerHandleARB");
- GL_EXTCALL(glMakeTextureHandleResidentARB(handle));
- checkGLcall("glMakeTextureHandleResidentARB");
- return handle;
+}
/* Context activation is done by the caller. */ static void shader_resource_view_bind_and_dirtify(struct wined3d_shader_resource_view *view, struct wined3d_context *context) diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 52c7fc5..8ee75f2 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -43,6 +43,7 @@ enum wined3d_gl_extension APPLE_YCBCR_422, /* ARB */ ARB_BASE_INSTANCE,
- ARB_BINDLESS_TEXTURE, ARB_BLEND_FUNC_EXTENDED, ARB_BUFFER_STORAGE, ARB_CLEAR_BUFFER_OBJECT,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 5b5e4af..95ce08b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1418,6 +1418,8 @@ struct wined3d_shader_backend_ops void (*shader_get_caps)(const struct wined3d_gl_info *gl_info, struct shader_caps *caps); BOOL (*shader_color_fixup_supported)(struct color_fixup_desc fixup); BOOL (*shader_has_ffp_proj_control)(void *shader_priv);
- void (*shader_load_sampler_handles)(void *shader_priv, struct wined3d_context *context,
const struct wined3d_state *state, const struct wined3d_shader *shader);
};
extern const struct wined3d_shader_backend_ops glsl_shader_backend DECLSPEC_HIDDEN; @@ -2975,6 +2977,21 @@ struct wined3d_dummy_textures GLuint tex_2d_ms_array; };
+struct wined3d_dummy_sampler_handles +{
- GLuint64 tex_1d;
- GLuint64 tex_2d;
- GLuint64 tex_rect;
- GLuint64 tex_3d;
- GLuint64 tex_cube;
- GLuint64 tex_cube_array;
- GLuint64 tex_1d_array;
- GLuint64 tex_2d_array;
- GLuint64 tex_buffer;
- GLuint64 tex_2d_ms;
- GLuint64 tex_2d_ms_array;
+};
#define WINED3D_UNMAPPED_STAGE ~0u
/* Multithreaded flag. Removed from the public header to signal that @@ -3058,6 +3075,9 @@ struct wined3d_device struct wined3d_sampler *default_sampler; struct wined3d_sampler *null_sampler;
- /* Texture sampler handles for when no texture is mapped */
- struct wined3d_dummy_sampler_handles dummy_sampler_handles;
- /* Command stream */ struct wined3d_cs *cs;
@@ -3397,6 +3417,8 @@ void wined3d_texture_download_from_texture(struct wined3d_texture *dst_texture, GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN; void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_bo_address *data, DWORD locations) DECLSPEC_HIDDEN; +GLuint wined3d_texture_get_name(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_invalidate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location) DECLSPEC_HIDDEN; void wined3d_texture_load(struct wined3d_texture *texture, @@ -3884,6 +3906,8 @@ struct wined3d_shader_resource_view void shader_resource_view_generate_mipmaps(struct wined3d_shader_resource_view *view) DECLSPEC_HIDDEN; void wined3d_shader_resource_view_bind(struct wined3d_shader_resource_view *view, unsigned int unit, struct wined3d_sampler *sampler, struct wined3d_context *context) DECLSPEC_HIDDEN; +GLuint64 wined3d_shader_resource_view_handle(struct wined3d_shader_resource_view *view,
struct wined3d_sampler *sampler, struct wined3d_context *context) DECLSPEC_HIDDEN;
struct wined3d_unordered_access_view { -- 2.7.4
https://bugs.winehq.org/show_bug.cgi?id=44514
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=44514
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick@piezo-forte.be
--- Comment #33 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- (In reply to Nikita from comment #32)
Comment on attachment 62452 [details] Patch to use bindless texture
Hello,
What's the point with this long quote of a patch?
It's against the rules.
Don't do that.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #34 from Nikita nickarhipoff@gmail.com ---
Sorry for my patch quote.
This patch does not work. I tried it on wine version 3.16 staging. It installs without errors. But in the game the textures of the earth are not displayed. ESO ran through windows steam in this wine.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #35 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Created attachment 65875 --> https://bugs.winehq.org/attachment.cgi?id=65875 Patch to use bindless texture (rebased for wine 4.15)
Hello,
1. There have been many changes in wined3d code since Wine 3.*.
The attached patch is the same patch as above rebased for recent Wine versions.
It should apply cleanly on GIT wine and GIT wine-staging 4.15 to 4.21. At least it did for me.
Please, retest with recent wine/wine-staging.
2. Note that if you compile from GIT source you can use this command: $ git am "/path/to/downloaded/patch"
You can find more information about cloning Wine with GIT there: https://wiki.winehq.org/Git_Wine_Tutorial
Please, don't ask for help about building Wine here: Read the wiki and user's guide, and ask on the forums if you still need help.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #36 from nick@look.ca --- Thank you Oliver, I'll give it a try ansd test. :)
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #37 from nick@look.ca --- Just tested the new patch with wine 4.21 and wine-nine 0.5, everything works great. I'm on Arch Linux btw.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #38 from nick@look.ca --- Did some more testing and there's intermittent stuttering, now I don't know if it's the new patch or that wine-nine is buggy. Now when I use wine-staging-nine and the old patch, everything is as smooth as silk and works really well but here's the thing both wine-staging-nine and the old patch are obsolete so that's sad here unless they figure things out.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #39 from nick@look.ca --- I'm pretty sure it's wine itself, the new patch seems to be fine.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #40 from nick@look.ca --- New patch breaks on wine version 5 and up.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #41 from nick@look.ca --- Correction new patch does work on wine 5.0-1, it breaks on wine 5.1-1 and above.
https://bugs.winehq.org/show_bug.cgi?id=44514
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #65875|0 |1 is obsolete| |
--- Comment #42 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Created attachment 68472 --> https://bugs.winehq.org/attachment.cgi?id=68472 Patch to use bindless texture (rebased for wine 5.19)
Hello,
Wine 5.19 issue is still present.
+rebased patch.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #43 from nick@look.ca --- I switched to vulkan, seems to be better for me. Good luck to the rest of you guys, for me it was taking way too long.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #44 from Nikita nickarhipoff@gmail.com --- I tried patching the current proton version 6.3.2. Patch was applied with no errors. The building of the proton was successful. But textures of land didn't appear in the game (black textures). Game launch parameters: DRI_PRIME=1 PROTON_USE_WINED3D=1 %command% My video card doesn't support Vulkan (radeon 6770m). I have no other options besides wined3d.
Proton build logs: https://drive.google.com/file/d/18oVjDp9s3TskhNVQP8_lI0xRbhksYk7I/view?usp=s...
https://bugs.winehq.org/show_bug.cgi?id=44514
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #68472|0 |1 is obsolete| |
--- Comment #45 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Created attachment 69923 --> https://bugs.winehq.org/attachment.cgi?id=69923 Patch to use bindless texture (rebased for wine 6.3)
Hello,
Here is a rebased patch for wine/wine-staging 6.3.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #46 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Created attachment 69924 --> https://bugs.winehq.org/attachment.cgi?id=69924 Quake Champions with-without patch comparison screenshots
Hello,
Confirming that it affects Quake Champions.
It visibly affects the main menu loot screen (as shown on screenshots).
Other parts of the game looks strange compared to Windows but it didn't change with/without the patch so I think that is an unrelated issue.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #47 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Created attachment 69925 --> https://bugs.winehq.org/attachment.cgi?id=69925 Patch to use bindless texture (rebased for wine 6.7)
Hello,
Here is the rebased patch for wine/wine-staging 6.7.
There is a minor change from the 6.3 version.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #48 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- (In reply to nick from comment #38)
Did some more testing and there's intermittent stuttering, now I don't know
Hello,
Please test my patchset from bug 50235, it works around the FPS drop in ESO for me.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=44514
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |loki@lokis-chaos.de
--- Comment #49 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- *** Bug 43339 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=44514
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/wined3d-bindless | |-texture CC| |leslie_alistair@hotmail.com
https://bugs.winehq.org/show_bug.cgi?id=44514
Andrey Gusev andrey.goosev@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.goosev@gmail.com
--- Comment #50 from Andrey Gusev andrey.goosev@gmail.com --- Should also help for these games
(GreedFall) 0710:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 0000000030685870 needs 59 samplers, but only 32 are supported.
(Iron Harvest) 0438:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 00007FE841E14320 needs 35 samplers, but only 32 are supported.
(Mortal Shell) 05c4:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 0x6c28a00 needs 34 samplers, but only 32 are supported.
(Rise of the Tomb Raider) 0a54:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 0x1cdbdae0 needs 35 samplers, but only 32 are supported.
(Shadow of the Tomb Raider) 04cc:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 0xc7e3830 needs 38 samplers, but only 32 are supported.
(SnowRunner) 0350:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 0x7ff2540aef60 needs 64 samplers, but only 32 are supported.
(Syberia: The World Before) 068c:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 00007FD8107062A0 needs 34 samplers, but only 32 are supported. 068c:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 00007FD8105E7270 needs 33 samplers, but only 32 are supported.
(The Dark Pictures Anthology: House of Ashes) 0200:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 0x15f6a100 needs 33 samplers, but only 32 are supported.
(The Dark Pictures Anthology: Little Hope) 086c:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 0x7f9d07a4d6d0 needs 33 samplers, but only 32 are supported. 086c:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 0x7f9c7a1981c0 needs 39 samplers, but only 32 are supported.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #51 from Andrey Gusev andrey.goosev@gmail.com --- I suppose it should be 'wined3d_sampler_gl(sampler)' here
wined3d_shader_resource_view_gl_bind(wined3d_shader_resource_view_gl(view), bind_idx, sampler, context_gl);
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #52 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
Also affects V Rising.
06c8:fixme:d3d:wined3d_context_gl_bind_shader_resources Shader 00007F48124BF3D0 needs 34 samplers, but only 32 are supported.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=44514
Svyatpro svyatpro@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |svyatpro@gmail.com
--- Comment #53 from Svyatpro svyatpro@gmail.com --- These patches crashes some games at launch. Assassin's Creed Black Flag, Crysis 3. I've created a BUG: https://bugs.winehq.org/show_bug.cgi?id=54692
https://bugs.winehq.org/show_bug.cgi?id=44514
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |f6a1844dbed91b441ad69e7b15b | |5be242d063e87 Status|STAGED |RESOLVED CC| |z.figura12@gmail.com
--- Comment #54 from Zeb Figura z.figura12@gmail.com --- Fixed upstream by https://source.winehq.org/git/wine.git/commitdiff/f6a1844dbed91b441ad69e7b15b5be242d063e87.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #55 from Svyatpro svyatpro@gmail.com --- now almost every dx10/11 title crashes for me with GL_OUT_OF_MEMORY error. Yeah, I use 32bit Windows but before this patch everything was fine.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #56 from Zeb Figura z.figura12@gmail.com --- (In reply to Svyatpro from comment #55)
now almost every dx10/11 title crashes for me with GL_OUT_OF_MEMORY error. Yeah, I use 32bit Windows but before this patch everything was fine.
By "32-bit Windows" do you mean you're using wined3d.dll on windows?
Can you give an example or several of applications that you're running out of memory with?
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #57 from Svyatpro svyatpro@gmail.com --- Yes I cross-compiled complete WineD3D (wined3d.dll d3d11.dll dxgi.dll etc) binaries for Windows x86 and test them mostly on Windows XP SP3 x86 with NVIDIA GPU with full OpenGL 4.5 support.
For example, Far Cry 3 DX11 log:
farcry3_d3d11.exe 0a44:fixme:dxgi:DXGID3D10CreateDevice Ignoring flags 0x40000000. 0a44:fixme:d3d11:d3d10_device_GetCreationFlags iface 09CFEE9C stub! 0a44:fixme:d3d11:d3d10_multithread_SetMultithreadProtected iface 09CFEEA0, enable 0x1 stub! 0a44:fixme:dxgi:dxgi_output_GetDisplayModeList iface 09D2F708, format DXGI_FORMAT_R8G8B8A8_UNORM, flags 0x1, mode_count 0576F414, modes 00000000 partial stub! 0a44:fixme:dxgi:dxgi_output_GetDisplayModeList iface 09D2F708, format DXGI_FORMAT_R8G8B8A8_UNORM, flags 0x1, mode_count 0576F414, modes 03346BB0 partial stub! 0a44:fixme:d3d:wined3d_check_device_multisample_type multisample_type 24 not handled yet. 0a44:fixme:d3d11:d3d11_device_CheckFeatureSupport Returning fake threading support data. 0a70:fixme:d3d:create_texture_view Depth slice (0-1) not supported. 0a70:fixme:d3d:create_texture_view Depth slice (0-1) not supported. 0a70:fixme:d3d:create_texture_view Depth slice (0-1) not supported. 0a70:fixme:d3d:create_texture_view Depth slice (0-1) not supported. 0a70:fixme:d3d:create_texture_view Depth slice (0-1) not supported. 0a3c:fixme:dxgi:wined3d_bind_flags_from_dxgi_usage Unhandled DXGI usage 0x40. 0a74:err:d3d:wined3d_debug_callback 062AB3C0: "Unknown internal debug message. The NVIDIA OpenGL driver has encountered\nan out of memory error. This application might\nbehave inconsistently and fail. ". 0a74:err:d3d:wined3d_debug_callback 062AB3C0: "GL_OUT_OF_MEMORY error generated. Out of memory.". 0a3c:fixme:dxgi:d3d11_swapchain_GetDesc Ignoring ScanlineOrdering and Scaling. 0a70:fixme:d3d:wined3d_context_gl_check_fbo_status FBO status GL_FRAMEBUFFER_UNSUPPORTED (0x8cdd). 0a70:fixme:d3d:context_dump_fbo_attachment GL_DEPTH_ATTACHMENT: 2d texture 108, 1920x1080, 0 samples, format 0x88f0. 0a70:fixme:d3d:context_dump_fbo_attachment GL_STENCIL_ATTACHMENT: 2d texture 108, 1920x1080, 0 samples, format 0x88f0. 0a70:fixme:d3d:context_dump_fbo_attachment GL_COLOR_ATTACHMENT0: NONE. 0a70:fixme:d3d:context_dump_fbo_attachment GL_COLOR_ATTACHMENT1: NONE. 0a70:fixme:d3d:context_dump_fbo_attachment GL_COLOR_ATTACHMENT2: NONE. 0a70:fixme:d3d:context_dump_fbo_attachment GL_COLOR_ATTACHMENT3: NONE. 0a70:fixme:d3d:context_dump_fbo_attachment GL_COLOR_ATTACHMENT4: NONE. 0a70:fixme:d3d:context_dump_fbo_attachment GL_COLOR_ATTACHMENT5: NONE. 0a70:fixme:d3d:context_dump_fbo_attachment GL_COLOR_ATTACHMENT6: NONE. 0a70:fixme:d3d:context_dump_fbo_attachment GL_COLOR_ATTACHMENT7: NONE.
https://bugs.winehq.org/show_bug.cgi?id=44514
--- Comment #58 from Zeb Figura z.figura12@gmail.com --- (In reply to Svyatpro from comment #57)
Yes I cross-compiled complete WineD3D (wined3d.dll d3d11.dll dxgi.dll etc) binaries for Windows x86 and test them mostly on Windows XP SP3 x86 with NVIDIA GPU with full OpenGL 4.5 support.
For example, Far Cry 3 DX11 log:
...
0a74:err:d3d:wined3d_debug_callback 062AB3C0: "Unknown internal debug message. The NVIDIA OpenGL driver has encountered\nan out of memory error. This application might\nbehave inconsistently and fail. ". 0a74:err:d3d:wined3d_debug_callback 062AB3C0: "GL_OUT_OF_MEMORY error generated. Out of memory.".
Hrm, that's interesting. That's *not* bug 56445. It suggests that we may simply be making too many sampler handles simultaneously resident, which means we're probably going to need to track them and make them non-resident at some point.
https://bugs.winehq.org/show_bug.cgi?id=44514
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #59 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.5.