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
a74978df
Commit
a74978df
authored
Jun 08, 2010
by
Matteo Bruni
Committed by
Alexandre Julliard
Jun 10, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Check register type in dcl input instruction.
parent
5bb403ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
asmparser.c
dlls/d3dx9_36/asmparser.c
+8
-0
asm.c
dlls/d3dx9_36/tests/asm.c
+9
-0
No files found.
dlls/d3dx9_36/asmparser.c
View file @
a74978df
...
...
@@ -118,6 +118,8 @@ static void asmparser_dcl_output(struct asm_parser *This, DWORD usage, DWORD num
static
void
asmparser_dcl_input
(
struct
asm_parser
*
This
,
DWORD
usage
,
DWORD
num
,
DWORD
mod
,
const
struct
shader_reg
*
reg
)
{
struct
instruction
instr
;
if
(
!
This
->
shader
)
return
;
if
(
mod
!=
0
&&
(
This
->
shader
->
version
!=
BWRITERPS_VERSION
(
3
,
0
)
||
...
...
@@ -127,6 +129,12 @@ static void asmparser_dcl_input(struct asm_parser *This, DWORD usage, DWORD num,
set_parse_status
(
This
,
PARSE_ERR
);
return
;
}
/* Check register type and modifiers */
instr
.
dstmod
=
mod
;
instr
.
shift
=
0
;
This
->
funcs
->
dstreg
(
This
,
&
instr
,
reg
);
if
(
!
record_declaration
(
This
->
shader
,
usage
,
num
,
mod
,
FALSE
,
reg
->
regnum
,
reg
->
writemask
,
FALSE
))
{
ERR
(
"Out of memory
\n
"
);
set_parse_status
(
This
,
PARSE_ERR
);
...
...
dlls/d3dx9_36/tests/asm.c
View file @
a74978df
...
...
@@ -1365,6 +1365,15 @@ static void failure_test(void) {
/* shader 43: can't explicitely declare input registers in ps_2_0 */
"ps_2_0
\n
"
"dcl_texcoord0 t0
\n
"
,
/* shader 44: can't implicitely declare registers in vs */
"vs_2_0
\n
"
"dcl o0
\n
"
,
/* shader 45: can't implicitely declare samplers in vs */
"vs_3_0
\n
"
"dcl s2
\n
"
,
/* shader 46: no tx registers in ps_3_0 */
"ps_3_0
\n
"
"dcl t2
\n
"
,
};
HRESULT
hr
;
unsigned
int
i
;
...
...
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