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
a9118ba1
Commit
a9118ba1
authored
May 21, 2010
by
Matteo Bruni
Committed by
Alexandre Julliard
May 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Use separate opcodes for TEXLDP and TEXLDB.
There is no reason we have to strictly follow D3D bytecode format in our intermediate representation.
parent
1d3f462f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
asmshader.y
dlls/d3dx9_36/asmshader.y
+2
-2
asmutils.c
dlls/d3dx9_36/asmutils.c
+4
-4
bytecodewriter.c
dlls/d3dx9_36/bytecodewriter.c
+2
-2
d3dx9_36_private.h
dlls/d3dx9_36/d3dx9_36_private.h
+2
-3
No files found.
dlls/d3dx9_36/asmshader.y
View file @
a9118ba1
...
...
@@ -724,12 +724,12 @@ instruction: INSTR_ADD omods dreg ',' sregs
| INSTR_TEXLDP omods dreg ',' sregs
{
TRACE("TEXLDP\n");
asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEX
| ( BWRITERSI_TEXLD_PROJECT << BWRITER_OPCODESPECIFICCONTROL_SHIFT )
, $2.mod, $2.shift, 0, &$3, &$5, 2);
asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEX
LDP
, $2.mod, $2.shift, 0, &$3, &$5, 2);
}
| INSTR_TEXLDB omods dreg ',' sregs
{
TRACE("TEXLDB\n");
asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEX
| ( BWRITERSI_TEXLD_BIAS << BWRITER_OPCODESPECIFICCONTROL_SHIFT )
, $2.mod, $2.shift, 0, &$3, &$5, 2);
asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEX
LDB
, $2.mod, $2.shift, 0, &$3, &$5, 2);
}
| INSTR_DSX omods dreg ',' sregs
{
...
...
dlls/d3dx9_36/asmutils.c
View file @
a9118ba1
...
...
@@ -209,8 +209,8 @@ DWORD d3d9_opcode(DWORD bwriter_opcode) {
case
BWRITERSIO_COMMENT
:
return
D3DSIO_COMMENT
;
case
BWRITERSIO_END
:
return
D3DSIO_END
;
case
BWRITERSIO_TEX
|
(
BWRITERSI_TEXLD_PROJECT
<<
BWRITER_OPCODESPECIFICCONTROL_SHIFT
):
return
D3DSIO_TEX
|
D3DSI_TEXLD_PROJECT
;
case
BWRITERSIO_TEX
|
(
BWRITERSI_TEXLD_BIAS
<<
BWRITER_OPCODESPECIFICCONTROL_SHIFT
):
return
D3DSIO_TEX
|
D3DSI_TEXLD_BIAS
;
case
BWRITERSIO_TEX
LDP
:
return
D3DSIO_TEX
|
D3DSI_TEXLD_PROJECT
;
case
BWRITERSIO_TEX
LDB
:
return
D3DSIO_TEX
|
D3DSI_TEXLD_BIAS
;
default:
FIXME
(
"Unhandled BWRITERSIO token %u
\n
"
,
bwriter_opcode
);
...
...
@@ -484,8 +484,8 @@ const char *debug_print_opcode(DWORD opcode) {
case
BWRITERSIO_TEXLDL
:
return
"texldl"
;
case
BWRITERSIO_BREAKP
:
return
"breakp"
;
case
BWRITERSIO_TEX
|
(
BWRITERSI_TEXLD_PROJECT
<<
BWRITER_OPCODESPECIFICCONTROL_SHIFT
):
return
"texldp"
;
case
BWRITERSIO_TEX
|
(
BWRITERSI_TEXLD_BIAS
<<
BWRITER_OPCODESPECIFICCONTROL_SHIFT
):
return
"texldb"
;
case
BWRITERSIO_TEX
LDP
:
return
"texldp"
;
case
BWRITERSIO_TEX
LDB
:
return
"texldb"
;
default:
return
"unknown"
;
}
...
...
dlls/d3dx9_36/bytecodewriter.c
View file @
a9118ba1
...
...
@@ -693,8 +693,8 @@ static const struct instr_handler_table ps_3_handlers[] = {
{
BWRITERSIO_TEXLDL
,
instr_handler
},
{
BWRITERSIO_TEX
,
instr_handler
},
{
BWRITERSIO_TEX
|
(
BWRITERSI_TEXLD_PROJECT
<<
BWRITER_OPCODESPECIFICCONTROL_SHIFT
),
instr_handler
},
{
BWRITERSIO_TEX
|
(
BWRITERSI_TEXLD_BIAS
<<
BWRITER_OPCODESPECIFICCONTROL_SHIFT
),
instr_handler
},
{
BWRITERSIO_TEX
LDP
,
instr_handler
},
{
BWRITERSIO_TEX
LDB
,
instr_handler
},
{
BWRITERSIO_TEXKILL
,
instr_handler
},
{
BWRITERSIO_DSX
,
instr_handler
},
{
BWRITERSIO_DSY
,
instr_handler
},
...
...
dlls/d3dx9_36/d3dx9_36_private.h
View file @
a9118ba1
...
...
@@ -462,6 +462,8 @@ typedef enum _BWRITERSHADER_INSTRUCTION_OPCODE_TYPE {
BWRITERSIO_SETP
,
BWRITERSIO_TEXLDL
,
BWRITERSIO_BREAKP
,
BWRITERSIO_TEXLDP
,
BWRITERSIO_TEXLDB
,
BWRITERSIO_COMMENT
,
BWRITERSIO_END
,
...
...
@@ -589,9 +591,6 @@ typedef enum _BWRITERDECLUSAGE {
BWRITERDECLUSAGE_SAMPLE
}
BWRITERDECLUSAGE
;
#define BWRITER_OPCODESPECIFICCONTROL_SHIFT 16
#define BWRITER_OPCODESPECIFICCONTROL_MASK (0xff << BWRITER_OPCODESPECIFICCONTROL_SHIFT)
struct
bwriter_shader
*
SlAssembleShader
(
const
char
*
text
,
char
**
messages
);
DWORD
SlWriteBytecode
(
const
struct
bwriter_shader
*
shader
,
int
dxversion
,
DWORD
**
result
);
void
SlDeleteShader
(
struct
bwriter_shader
*
shader
);
...
...
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