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
6cbd5114
Commit
6cbd5114
authored
May 13, 2010
by
Matteo Bruni
Committed by
Alexandre Julliard
May 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Add input dcl instruction support to the shader assembler.
parent
efec8bb3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
0 deletions
+37
-0
asmparser.c
dlls/d3dx9_36/asmparser.c
+10
-0
asmshader.y
dlls/d3dx9_36/asmshader.y
+24
-0
bytecodewriter.c
dlls/d3dx9_36/bytecodewriter.c
+1
-0
d3dx9_36_private.h
dlls/d3dx9_36/d3dx9_36_private.h
+2
-0
No files found.
dlls/d3dx9_36/asmparser.c
View file @
6cbd5114
...
...
@@ -51,6 +51,15 @@ 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
,
const
struct
shader_reg
*
reg
)
{
if
(
!
This
->
shader
)
return
;
if
(
!
record_declaration
(
This
->
shader
,
usage
,
num
,
FALSE
,
reg
->
regnum
,
reg
->
writemask
))
{
ERR
(
"Out of memory
\n
"
);
set_parse_status
(
This
,
PARSE_ERR
);
}
}
static
void
asmparser_instr
(
struct
asm_parser
*
This
,
DWORD
opcode
,
DWORD
mod
,
DWORD
shift
,
BWRITER_COMPARISON_TYPE
comp
,
...
...
@@ -149,6 +158,7 @@ static const struct asmparser_backend parser_vs_3 = {
asmparser_coissue_unsupported
,
asmparser_dcl_output
,
asmparser_dcl_input
,
asmparser_end
,
...
...
dlls/d3dx9_36/asmshader.y
View file @
6cbd5114
...
...
@@ -522,6 +522,30 @@ instruction: INSTR_ADD omods dreg ',' sregs
reg.writemask = $4;
asm_ctx.funcs->dcl_output(&asm_ctx, $2.dclusage, $2.regnum, ®);
}
| INSTR_DCL dclusage REG_INPUT
{
struct shader_reg reg;
TRACE("Input reg declaration\n");
ZeroMemory(®, sizeof(reg));
reg.type = BWRITERSPR_INPUT;
reg.regnum = $3;
reg.rel_reg = NULL;
reg.srcmod = 0;
reg.writemask = BWRITERSP_WRITEMASK_ALL;
asm_ctx.funcs->dcl_input(&asm_ctx, $2.dclusage, $2.regnum, ®);
}
| INSTR_DCL dclusage REG_INPUT writemask
{
struct shader_reg reg;
TRACE("Input reg declaration\n");
ZeroMemory(®, sizeof(reg));
reg.type = BWRITERSPR_INPUT;
reg.regnum = $3;
reg.rel_reg = NULL;
reg.srcmod = 0;
reg.writemask = $4;
asm_ctx.funcs->dcl_input(&asm_ctx, $2.dclusage, $2.regnum, ®);
}
| INSTR_REP sregs
{
TRACE("REP\n");
...
...
dlls/d3dx9_36/bytecodewriter.c
View file @
6cbd5114
...
...
@@ -284,6 +284,7 @@ static void sm_3_header(struct bc_writer *This, const struct bwriter_shader *sha
/* Declare the shader type and version */
put_dword
(
buffer
,
This
->
version
);
write_declarations
(
buffer
,
TRUE
,
shader
->
inputs
,
shader
->
num_inputs
,
D3DSPR_INPUT
);
write_declarations
(
buffer
,
TRUE
,
shader
->
outputs
,
shader
->
num_outputs
,
D3DSPR_OUTPUT
);
return
;
}
...
...
dlls/d3dx9_36/d3dx9_36_private.h
View file @
6cbd5114
...
...
@@ -255,6 +255,8 @@ struct asmparser_backend {
void
(
*
dcl_output
)(
struct
asm_parser
*
This
,
DWORD
usage
,
DWORD
num
,
const
struct
shader_reg
*
reg
);
void
(
*
dcl_input
)(
struct
asm_parser
*
This
,
DWORD
usage
,
DWORD
num
,
const
struct
shader_reg
*
reg
);
void
(
*
end
)(
struct
asm_parser
*
This
);
...
...
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