Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
be4a332e
Commit
be4a332e
authored
May 27, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Always initialize out shader pointer in CreateVertexShader().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
671f6b2a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
d3d10core.c
dlls/d3d10core/tests/d3d10core.c
+6
-0
device.c
dlls/d3d11/device.c
+4
-0
d3d11.c
dlls/d3d11/tests/d3d11.c
+6
-0
No files found.
dlls/d3d10core/tests/d3d10core.c
View file @
be4a332e
...
...
@@ -3890,14 +3890,20 @@ void main(point float4 vin[1] : POSITION, inout TriangleStream<gs_out> vout)
refcount
=
ID3D10VertexShader_Release
(
vs
);
ok
(
!
refcount
,
"Vertex shader has %u references left.
\n
"
,
refcount
);
vs
=
(
void
*
)
0xdeadbeef
;
hr
=
ID3D10Device_CreateVertexShader
(
device
,
vs_2_0
,
sizeof
(
vs_2_0
),
&
vs
);
ok
(
hr
==
E_INVALIDARG
,
"Created a SM2 vertex shader, hr %#x
\n
"
,
hr
);
ok
(
!
vs
,
"Unexpected pointer %p.
\n
"
,
vs
);
vs
=
(
void
*
)
0xdeadbeef
;
hr
=
ID3D10Device_CreateVertexShader
(
device
,
vs_3_0
,
sizeof
(
vs_3_0
),
&
vs
);
ok
(
hr
==
E_INVALIDARG
,
"Created a SM3 vertex shader, hr %#x
\n
"
,
hr
);
ok
(
!
vs
,
"Unexpected pointer %p.
\n
"
,
vs
);
vs
=
(
void
*
)
0xdeadbeef
;
hr
=
ID3D10Device_CreateVertexShader
(
device
,
ps_4_0
,
sizeof
(
ps_4_0
),
&
vs
);
ok
(
hr
==
E_INVALIDARG
,
"Created a SM4 vertex shader from a pixel shader source, hr %#x
\n
"
,
hr
);
ok
(
!
vs
,
"Unexpected pointer %p.
\n
"
,
vs
);
/* pixel shader */
expected_refcount
=
get_refcount
(
device
)
+
1
;
...
...
dlls/d3d11/device.c
View file @
be4a332e
...
...
@@ -3469,6 +3469,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateVertexShader(ID3D11Device2 *
TRACE
(
"iface %p, byte_code %p, byte_code_length %Iu, class_linkage %p, shader %p.
\n
"
,
iface
,
byte_code
,
byte_code_length
,
class_linkage
,
shader
);
*
shader
=
NULL
;
if
(
class_linkage
)
FIXME
(
"Class linkage is not implemented yet.
\n
"
);
...
...
@@ -6176,6 +6178,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateVertexShader(ID3D10Device1 *
TRACE
(
"iface %p, byte_code %p, byte_code_length %Iu, shader %p.
\n
"
,
iface
,
byte_code
,
byte_code_length
,
shader
);
*
shader
=
NULL
;
if
(
FAILED
(
hr
=
d3d_vertex_shader_create
(
device
,
byte_code
,
byte_code_length
,
&
object
)))
return
hr
;
...
...
dlls/d3d11/tests/d3d11.c
View file @
be4a332e
...
...
@@ -4849,14 +4849,20 @@ static void test_create_shader(const D3D_FEATURE_LEVEL feature_level)
ID3D11PixelShader_Release
(
ps
);
/* vertex shader */
vs
=
(
void
*
)
0xdeadbeef
;
hr
=
ID3D11Device_CreateVertexShader
(
device
,
vs_2_0
,
sizeof
(
vs_2_0
),
NULL
,
&
vs
);
ok
(
hr
==
E_INVALIDARG
,
"Feature level %#x: Got unexpected hr %#lx.
\n
"
,
feature_level
,
hr
);
ok
(
!
vs
,
"Unexpected pointer %p.
\n
"
,
vs
);
vs
=
(
void
*
)
0xdeadbeef
;
hr
=
ID3D11Device_CreateVertexShader
(
device
,
vs_3_0
,
sizeof
(
vs_3_0
),
NULL
,
&
vs
);
ok
(
hr
==
E_INVALIDARG
,
"Feature level %#x: Got unexpected hr %#lx.
\n
"
,
feature_level
,
hr
);
ok
(
!
vs
,
"Unexpected pointer %p.
\n
"
,
vs
);
vs
=
(
void
*
)
0xdeadbeef
;
hr
=
ID3D11Device_CreateVertexShader
(
device
,
ps_4_0
,
sizeof
(
ps_4_0
),
NULL
,
&
vs
);
ok
(
hr
==
E_INVALIDARG
,
"Feature level %#x: Got unexpected hr %#lx.
\n
"
,
feature_level
,
hr
);
ok
(
!
vs
,
"Unexpected pointer %p.
\n
"
,
vs
);
expected_refcount
=
get_refcount
(
device
)
+
(
feature_level
>=
D3D_FEATURE_LEVEL_10_0
);
hr
=
ID3D11Device_CreateVertexShader
(
device
,
vs_4_0
,
sizeof
(
vs_4_0
),
NULL
,
&
vs
);
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