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
bdc61326
Commit
bdc61326
authored
Nov 16, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Allocate what Validate(Vertex|Pixel)Shader return with HeapAlloc.
Fixes:
a70e3059
Fixes:
6db89702
parent
ef34d813
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
d3d8_main.c
dlls/d3d8/d3d8_main.c
+2
-2
device.c
dlls/d3d8/tests/device.c
+8
-8
No files found.
dlls/d3d8/d3d8_main.c
View file @
bdc61326
...
...
@@ -95,7 +95,7 @@ done:
if
(
!
return_error
)
message
=
""
;
message_size
=
strlen
(
message
)
+
1
;
if
(
errors
&&
(
*
errors
=
malloc
(
message_size
)))
if
(
errors
&&
(
*
errors
=
HeapAlloc
(
GetProcessHeap
(),
0
,
message_size
)))
memcpy
(
*
errors
,
message
,
message_size
);
return
hr
;
...
...
@@ -140,7 +140,7 @@ done:
if
(
!
return_error
)
message
=
""
;
message_size
=
strlen
(
message
)
+
1
;
if
(
errors
&&
(
*
errors
=
malloc
(
message_size
)))
if
(
errors
&&
(
*
errors
=
HeapAlloc
(
GetProcessHeap
(),
0
,
message_size
)))
memcpy
(
*
errors
,
message
,
message_size
);
return
hr
;
...
...
dlls/d3d8/tests/device.c
View file @
bdc61326
...
...
@@ -5051,11 +5051,11 @@ static void test_validate_vs(void)
hr
=
ValidateVertexShader
(
NULL
,
NULL
,
NULL
,
FALSE
,
&
errors
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!*
errors
,
"Got unexpected string
\"
%s
\"
.
\n
"
,
errors
);
free
(
errors
);
HeapFree
(
GetProcessHeap
(),
0
,
errors
);
hr
=
ValidateVertexShader
(
NULL
,
NULL
,
NULL
,
TRUE
,
&
errors
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!*
errors
,
"Got unexpected empty string.
\n
"
);
free
(
errors
);
HeapFree
(
GetProcessHeap
(),
0
,
errors
);
hr
=
ValidateVertexShader
(
vs_code
,
NULL
,
NULL
,
FALSE
,
NULL
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
...
...
@@ -5064,7 +5064,7 @@ static void test_validate_vs(void)
hr
=
ValidateVertexShader
(
vs_code
,
NULL
,
NULL
,
TRUE
,
&
errors
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!*
errors
,
"Got unexpected string
\"
%s
\"
.
\n
"
,
errors
);
free
(
errors
);
HeapFree
(
GetProcessHeap
(),
0
,
errors
);
hr
=
ValidateVertexShader
(
vs_code
,
declaration_valid1
,
NULL
,
FALSE
,
NULL
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
...
...
@@ -5101,11 +5101,11 @@ static void test_validate_vs(void)
hr
=
ValidateVertexShader
(
vs_code
,
NULL
,
NULL
,
FALSE
,
&
errors
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!*
errors
,
"Got unexpected string
\"
%s
\"
.
\n
"
,
errors
);
free
(
errors
);
HeapFree
(
GetProcessHeap
(),
0
,
errors
);
hr
=
ValidateVertexShader
(
vs_code
,
NULL
,
NULL
,
TRUE
,
&
errors
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!*
errors
,
"Got unexpected empty string.
\n
"
);
free
(
errors
);
HeapFree
(
GetProcessHeap
(),
0
,
errors
);
}
static
void
test_validate_ps
(
void
)
...
...
@@ -5149,7 +5149,7 @@ static void test_validate_ps(void)
hr
=
ValidatePixelShader
(
ps_1_1_code
,
NULL
,
TRUE
,
&
errors
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!*
errors
,
"Got unexpected string
\"
%s
\"
.
\n
"
,
errors
);
free
(
errors
);
HeapFree
(
GetProcessHeap
(),
0
,
errors
);
memset
(
&
caps
,
0
,
sizeof
(
caps
));
caps
.
PixelShaderVersion
=
D3DPS_VERSION
(
1
,
1
);
...
...
@@ -5179,11 +5179,11 @@ static void test_validate_ps(void)
hr
=
ValidatePixelShader
(
ps_1_1_code
,
NULL
,
FALSE
,
&
errors
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!*
errors
,
"Got unexpected string
\"
%s
\"
.
\n
"
,
errors
);
free
(
errors
);
HeapFree
(
GetProcessHeap
(),
0
,
errors
);
hr
=
ValidatePixelShader
(
ps_1_1_code
,
NULL
,
TRUE
,
&
errors
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!*
errors
,
"Got unexpected empty string.
\n
"
);
free
(
errors
);
HeapFree
(
GetProcessHeap
(),
0
,
errors
);
}
static
void
test_volume_get_container
(
void
)
...
...
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