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
6f66c1dd
Commit
6f66c1dd
authored
Apr 07, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store the write mask in struct wined3d_shader_dst_param.
parent
215fd0b8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+4
-4
baseshader.c
dlls/wined3d/baseshader.c
+1
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+7
-5
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
6f66c1dd
...
...
@@ -688,7 +688,7 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD
if
(
shader_is_pshader_version
(
ins
->
reg_maps
->
shader_version
))
{
IWineD3DPixelShaderImpl
*
ps
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
gen_color_correction
(
buffer
,
dst_str
,
ins
->
dst
[
0
].
token
&
WINED3DSP_WRITEMASK_ALL
,
gen_color_correction
(
buffer
,
dst_str
,
ins
->
dst
[
0
].
write_mask
,
"one"
,
"coefmul.x"
,
ps
->
cur_args
->
color_fixup
[
sampler_idx
]);
}
}
...
...
@@ -1584,10 +1584,10 @@ static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins)
break
;
}
tmp_dst
=
ins
->
dst
[
0
];
for
(
i
=
0
;
i
<
nComponents
;
i
++
)
{
tmp_dst
.
register_idx
=
ins
->
dst
[
0
].
register_idx
;
tmp_dst
.
modifiers
=
ins
->
dst
[
0
].
modifiers
;
tmp_dst
.
token
=
((
ins
->
dst
[
0
].
token
)
&
~
WINED3DSP_WRITEMASK_ALL
)
|
(
WINED3DSP_WRITEMASK_0
<<
i
);
tmp_dst
.
write_mask
=
WINED3DSP_WRITEMASK_0
<<
i
;
tmp_dst
.
token
=
(
tmp_dst
.
token
&
~
WINED3DSP_WRITEMASK_ALL
)
|
tmp_dst
.
write_mask
;
tmp_ins
.
src
[
1
]
=
ins
->
src
[
1
]
+
i
;
shader_hw_map2gl
(
&
tmp_ins
);
}
...
...
dlls/wined3d/baseshader.c
View file @
6f66c1dd
...
...
@@ -851,6 +851,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
dst_param
.
addr_token
=
0
;
pToken
+=
shader_get_param
(
pToken
,
shader_version
,
&
dst_param
.
token
,
&
dst_param
.
addr_token
);
dst_param
.
register_idx
=
dst_param
.
token
&
WINED3DSP_REGNUM_MASK
;
dst_param
.
write_mask
=
dst_param
.
token
&
WINED3DSP_WRITEMASK_ALL
;
dst_param
.
modifiers
=
dst_param
.
token
&
WINED3DSP_DSTMOD_MASK
;
}
...
...
dlls/wined3d/glsl_shader.c
View file @
6f66c1dd
...
...
@@ -1446,7 +1446,7 @@ static void shader_glsl_color_correction(const struct wined3d_shader_instruction
if
(
fixup
.
y_sign_fixup
||
fixup
.
y_source
!=
CHANNEL_SOURCE_Y
)
mask
|=
WINED3DSP_WRITEMASK_1
;
if
(
fixup
.
z_sign_fixup
||
fixup
.
z_source
!=
CHANNEL_SOURCE_Z
)
mask
|=
WINED3DSP_WRITEMASK_2
;
if
(
fixup
.
w_sign_fixup
||
fixup
.
w_source
!=
CHANNEL_SOURCE_W
)
mask
|=
WINED3DSP_WRITEMASK_3
;
mask
&=
ins
->
dst
[
0
].
token
;
mask
&=
ins
->
dst
[
0
].
write_mask
;
if
(
!
mask
)
return
;
/* Nothing to do */
...
...
@@ -1509,7 +1509,7 @@ static void PRINTF_ATTR(6, 7) shader_glsl_gen_sample_code(const struct wined3d_s
BOOL
rect_fixup
=
FALSE
;
va_list
args
;
shader_glsl_get_swizzle
(
swizzle
,
FALSE
,
ins
->
dst
[
0
].
token
,
dst_swizzle
);
shader_glsl_get_swizzle
(
swizzle
,
FALSE
,
ins
->
dst
[
0
].
write_mask
,
dst_swizzle
);
if
(
shader_is_pshader_version
(
ins
->
reg_maps
->
shader_version
))
{
...
...
@@ -1947,6 +1947,7 @@ static void shader_glsl_cmp(const struct wined3d_shader_instruction *ins)
temp_destination
=
TRUE
;
}
else
{
struct
wined3d_shader_dst_param
dst
=
ins
->
dst
[
0
];
dst
.
write_mask
&=
write_mask
;
dst
.
token
&=
~
WINED3DSP_WRITEMASK_ALL
|
write_mask
;
write_mask
=
shader_glsl_append_dst_ext
(
ins
->
buffer
,
ins
,
&
dst
);
if
(
!
write_mask
)
continue
;
...
...
@@ -2010,6 +2011,7 @@ static void shader_glsl_cnd(const struct wined3d_shader_instruction *ins)
}
}
dst
=
ins
->
dst
[
0
];
dst
.
write_mask
&=
write_mask
;
dst
.
token
&=
~
WINED3DSP_WRITEMASK_ALL
|
write_mask
;
write_mask
=
shader_glsl_append_dst_ext
(
ins
->
buffer
,
ins
,
&
dst
);
if
(
!
write_mask
)
continue
;
...
...
@@ -2087,11 +2089,11 @@ static void shader_glsl_mnxn(const struct wined3d_shader_instruction *ins)
break
;
}
tmp_dst
=
ins
->
dst
[
0
];
for
(
i
=
0
;
i
<
nComponents
;
++
i
)
{
tmp_dst
.
register_idx
=
ins
->
dst
[
0
].
register_idx
;
tmp_dst
.
modifiers
=
ins
->
dst
[
0
].
modifiers
;
tmp_dst
.
token
=
((
ins
->
dst
[
0
].
token
)
&
~
WINED3DSP_WRITEMASK_ALL
)
|
(
WINED3DSP_WRITEMASK_0
<<
i
);
tmp_dst
.
write_mask
=
WINED3DSP_WRITEMASK_0
<<
i
;
tmp_dst
.
token
=
(
tmp_dst
.
token
&
~
WINED3DSP_WRITEMASK_ALL
)
|
tmp_dst
.
write_mask
;
tmp_ins
.
src
[
1
]
=
ins
->
src
[
1
]
+
i
;
shader_glsl_dot
(
&
tmp_ins
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
6f66c1dd
...
...
@@ -453,6 +453,7 @@ typedef struct SHADER_OPCODE
struct
wined3d_shader_dst_param
{
UINT
register_idx
;
DWORD
write_mask
;
DWORD
modifiers
;
DWORD
token
;
DWORD
addr_token
;
...
...
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