https://bugs.winehq.org/show_bug.cgi?id=54292
Bug ID: 54292 Summary: Dumping shaders using VKD3D_SHADER_DUMP_PATH= fails with the bundled vkd3d Product: Wine Version: 8.0-rc3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: j-r@online.de Distribution: ---
The problem is in the bundled vkd3d, couldn't find the corect component for that.
Also I'm using a PE enabled build (if that is relevant).
IIUC the bundled vkd3d code is built against the windows runtime and therefore the shader dump path requires backslash instead of slash.
The following patch seems to be enough to restore functionality
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c index 7e153bce27a..4c0aa48aa55 100644 --- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c @@ -376,7 +376,7 @@ static void vkd3d_shader_dump_blob(const char *path, const char *prefix,
id = InterlockedIncrement(&shader_id) - 1;
- snprintf(filename, ARRAY_SIZE(filename), "%s/vkd3d-shader-%s-%u.%s", path, prefix, id, suffix); + snprintf(filename, ARRAY_SIZE(filename), "%s\vkd3d-shader-%s-%u.%s", path, prefix, id, suffix); if ((f = fopen(filename, "wb"))) { if (fwrite(data, 1, size, f) != size)
I think it would also be nice to print failure details on the failure path.
https://bugs.winehq.org/show_bug.cgi?id=54292
--- Comment #1 from j-r@online.de --- To clarify: I don't think it is a bug in vkd3d (even though it' probably be fixed there), but rather a problem of bundling. But I might be wrong:-)
https://bugs.winehq.org/show_bug.cgi?id=54292
--- Comment #2 from Henri Verbeet hverbeet@gmail.com --- Windows file handling APIs (like fopen() and CreateFile()) are supposed to be able to handle slashes as separators, and VKD3D_SHADER_DUMP_PATH is indeed working for me with the bundled vkd3d. (And I tried a couple of different variants to be sure.)
Chances are that the issue you're seeing is slightly more subtle than described here. What is the specific path you're setting VKD3D_SHADER_DUMP_PATH to? Can this be reproduced with either of (the Windows builds of) the vkd3d demos "vkd3d-gears" and "vkd3d-triangle", or does this issue only occur in specific applications?
https://bugs.winehq.org/show_bug.cgi?id=54292
j-r@online.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED
--- Comment #3 from j-r@online.de --- Yes, you are right. Looking at my shell history it's clear that I was too stupid to correctly quote the dump path and accidentally did it right only after the above change. Sorry!
https://bugs.winehq.org/show_bug.cgi?id=54292
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Gijs Vermeulen gijsvrm@gmail.com --- Closing INVALID.