compiler/spirv: The spirv shader is binary, should write in binary mode
Fixes: 53265c8798 ("spirv: Add a mechanism for dumping failing shaders")
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26775>
(cherry picked from commit fd118188285d0f3b2d963b0a4807f3f4cfd0efbb)
This commit is contained in:
parent
8974222433
commit
9732d1bdcd
2 changed files with 2 additions and 2 deletions
|
|
@ -564,7 +564,7 @@
|
||||||
"description": "compiler/spirv: The spirv shader is binary, should write in binary mode",
|
"description": "compiler/spirv: The spirv shader is binary, should write in binary mode",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 1,
|
"nomination_type": 1,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "53265c8798ee83e812f2e27356c8d9affc5356ca",
|
"because_sha": "53265c8798ee83e812f2e27356c8d9affc5356ca",
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ vtn_dump_shader(struct vtn_builder *b, const char *path, const char *prefix)
|
||||||
if (len < 0 || len >= sizeof(filename))
|
if (len < 0 || len >= sizeof(filename))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FILE *f = fopen(filename, "w");
|
FILE *f = fopen(filename, "wb");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue