Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
5231c8c8
Commit
5231c8c8
authored
Mar 18, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Allow D3DCompile2() to succeed with null output shader blob pointer.
parent
472d802a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
compiler.c
dlls/d3dcompiler_43/compiler.c
+1
-1
hlsl_d3d9.c
dlls/d3dcompiler_43/tests/hlsl_d3d9.c
+17
-0
No files found.
dlls/d3dcompiler_43/compiler.c
View file @
5231c8c8
...
...
@@ -556,7 +556,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
vkd3d_shader_free_messages
(
messages
);
}
if
(
!
ret
)
if
(
!
ret
&&
shader_blob
)
{
if
(
FAILED
(
hr
=
D3DCreateBlob
(
byte_code
.
size
,
shader_blob
)))
{
...
...
dlls/d3dcompiler_43/tests/hlsl_d3d9.c
View file @
5231c8c8
...
...
@@ -1742,6 +1742,22 @@ static void test_include(void)
delete_directory
(
L"include"
);
}
static
void
test_no_output_blob
(
void
)
{
static
const
char
vs_source
[]
=
"float4 main(float4 pos : POSITION, inout float2 texcoord : TEXCOORD0) : POSITION
\n
"
"{
\n
"
" return pos;
\n
"
"}"
;
ID3D10Blob
*
errors
;
HRESULT
hr
;
errors
=
(
void
*
)
0xdeadbeef
;
hr
=
D3DCompile
(
vs_source
,
strlen
(
vs_source
),
NULL
,
NULL
,
NULL
,
"main"
,
"vs_2_0"
,
0
,
0
,
NULL
,
&
errors
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!
errors
,
"Unexpected errors blob.
\n
"
);
}
START_TEST
(
hlsl_d3d9
)
{
HMODULE
mod
;
...
...
@@ -1770,4 +1786,5 @@ START_TEST(hlsl_d3d9)
test_constant_table
();
test_fail
();
test_include
();
test_no_output_blob
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment