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
b7edf5b0
Commit
b7edf5b0
authored
Oct 12, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Oct 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add D3DSHADER_ADDRMODE masks to the WINED3D namespace.
parent
29aa316d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
6 deletions
+17
-6
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
baseshader.c
dlls/wined3d/baseshader.c
+2
-2
glsl_shader.c
dlls/wined3d/glsl_shader.c
+1
-1
vertexshader.c
dlls/wined3d/vertexshader.c
+1
-1
wined3d_private_types.h
dlls/wined3d/wined3d_private_types.h
+12
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
b7edf5b0
...
...
@@ -388,7 +388,7 @@ static void vshader_program_add_param(SHADER_OPCODE_ARG *arg, const DWORD param,
strcat
(
hwLine
,
tmpReg
);
break
;
case
WINED3DSPR_CONST
:
sprintf
(
tmpReg
,
"C[%s%u]"
,
(
param
&
D3DVS
_ADDRMODE_RELATIVE
)
?
"A0.x + "
:
""
,
reg
);
sprintf
(
tmpReg
,
"C[%s%u]"
,
(
param
&
WINED3DSHADER
_ADDRMODE_RELATIVE
)
?
"A0.x + "
:
""
,
reg
);
strcat
(
hwLine
,
tmpReg
);
break
;
case
WINED3DSPR_ADDR
:
/*case D3DSPR_TEXTURE:*/
...
...
dlls/wined3d/baseshader.c
View file @
b7edf5b0
...
...
@@ -102,7 +102,7 @@ int shader_get_param(
IWineD3DBaseShaderImpl
*
This
=
(
IWineD3DBaseShaderImpl
*
)
iface
;
char
rel_token
=
D3DSHADER_VERSION_MAJOR
(
This
->
baseShader
.
hex_version
)
>=
2
&&
((
*
pToken
&
D3DSHADER_ADDRESSMODE_MASK
)
==
D3DSHADER_ADDRMODE_RELATIVE
);
((
*
pToken
&
WINED3DSHADER_ADDRESSMODE_MASK
)
==
WINE
D3DSHADER_ADDRMODE_RELATIVE
);
*
param
=
*
pToken
;
*
addr_token
=
rel_token
?
*
(
pToken
+
1
)
:
0
;
...
...
@@ -480,7 +480,7 @@ static void shader_dump_arr_entry(
int
input
)
{
char
relative
=
((
param
&
D3DSHADER_ADDRESSMODE_MASK
)
==
D3DSHADER_ADDRMODE_RELATIVE
);
((
param
&
WINED3DSHADER_ADDRESSMODE_MASK
)
==
WINE
D3DSHADER_ADDRMODE_RELATIVE
);
if
(
relative
)
{
TRACE
(
"["
);
...
...
dlls/wined3d/glsl_shader.c
View file @
b7edf5b0
...
...
@@ -635,7 +635,7 @@ static void shader_glsl_get_register_name(
const
char
*
prefix
=
pshader
?
"PC"
:
"VC"
;
/* Relative addressing */
if
(
param
&
D3DVS
_ADDRMODE_RELATIVE
)
{
if
(
param
&
WINED3DSHADER
_ADDRMODE_RELATIVE
)
{
/* Relative addressing on shaders 2.0+ have a relative address token,
* prior to that, it was hard-coded as "A0.x" because there's only 1 register */
...
...
dlls/wined3d/vertexshader.c
View file @
b7edf5b0
...
...
@@ -926,7 +926,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_ExecuteSW(IWineD3DVertexShader* iface, W
p
[
i
]
=
&
input
->
V
[
reg
];
break
;
case
WINED3DSPR_CONST
:
if
(
pToken
[
i
]
&
D3DVS
_ADDRMODE_RELATIVE
)
{
if
(
pToken
[
i
]
&
WINED3DSHADER
_ADDRMODE_RELATIVE
)
{
p
[
i
]
=
&
This
->
data
->
C
[(
DWORD
)
A
[
0
].
x
+
reg
];
}
else
{
p
[
i
]
=
&
This
->
data
->
C
[
reg
];
...
...
dlls/wined3d/wined3d_private_types.h
View file @
b7edf5b0
...
...
@@ -156,7 +156,18 @@ typedef enum _WINED3DSHADER_PARAM_DSTMOD_TYPE {
#define WINED3DSP_DSTSHIFT_SHIFT 24
#define WINED3DSP_DSTSHIFT_MASK (0xF << WINED3DSP_DSTSHIFT_SHIFT)
/** opcodes types for PS and VS */
/** Register addressing modes **/
#define WINED3DSHADER_ADDRESSMODE_SHIFT 13
#define WINED3DSHADER_ADDRESSMODE_MASK (1 << WINED3DSHADER_ADDRESSMODE_SHIFT)
typedef
enum
_WINED3DSHADER_ADDRESSMODE_TYPE
{
WINED3DSHADER_ADDRMODE_ABSOLUTE
=
0
<<
WINED3DSHADER_ADDRESSMODE_SHIFT
,
WINED3DSHADER_ADDRMODE_RELATIVE
=
1
<<
WINED3DSHADER_ADDRESSMODE_SHIFT
,
WINED3DSHADER_ADDRMODE_FORCE_DWORD
=
0x7FFFFFFF
}
WINED3DSHADER_ADDRESSMODE_TYPE
;
/** Opcode types */
typedef
enum
_WINED3DSHADER_INSTRUCTION_OPCODE_TYPE
{
WINED3DSIO_NOP
=
0
,
WINED3DSIO_MOV
=
1
,
...
...
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