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
f7f61a58
Commit
f7f61a58
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: Explicitly pass register type and index to shader_is_scalar().
parent
6f66c1dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
glsl_shader.c
dlls/wined3d/glsl_shader.c
+5
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+8
-11
No files found.
dlls/wined3d/glsl_shader.c
View file @
f7f61a58
...
...
@@ -1184,7 +1184,8 @@ static DWORD shader_glsl_get_write_mask(const DWORD param, char *write_mask) {
char
*
ptr
=
write_mask
;
DWORD
mask
=
param
&
WINED3DSP_WRITEMASK_ALL
;
if
(
shader_is_scalar
(
param
))
{
if
(
shader_is_scalar
(
shader_get_regtype
(
param
),
param
&
WINED3DSP_REGNUM_MASK
))
{
mask
=
WINED3DSP_WRITEMASK_0
;
}
else
{
*
ptr
++
=
'.'
;
...
...
@@ -1218,7 +1219,8 @@ static void shader_glsl_get_swizzle(const DWORD param, BOOL fixup, DWORD mask, c
const
char
*
swizzle_chars
=
fixup
?
"zyxw"
:
"xyzw"
;
char
*
ptr
=
swizzle_str
;
if
(
!
shader_is_scalar
(
param
))
{
if
(
!
shader_is_scalar
(
shader_get_regtype
(
param
),
param
&
WINED3DSP_REGNUM_MASK
))
{
*
ptr
++
=
'.'
;
/* swizzle bits fields: wwzzyyxx */
if
(
mask
&
WINED3DSP_WRITEMASK_0
)
*
ptr
++
=
swizzle_chars
[
swizzle
&
0x03
];
...
...
@@ -1900,7 +1902,7 @@ static void shader_glsl_cmp(const struct wined3d_shader_instruction *ins)
char
mask_char
[
6
];
BOOL
temp_destination
=
FALSE
;
if
(
shader_is_scalar
(
ins
->
src
[
0
]
))
if
(
shader_is_scalar
(
shader_get_regtype
(
ins
->
src
[
0
]),
ins
->
src
[
0
]
&
WINED3DSP_REGNUM_MASK
))
{
write_mask
=
shader_glsl_append_dst
(
ins
->
buffer
,
ins
);
...
...
dlls/wined3d/wined3d_private.h
View file @
f7f61a58
...
...
@@ -2386,16 +2386,13 @@ static inline BOOL shader_is_comment(DWORD token) {
return
WINED3DSIO_COMMENT
==
(
token
&
WINED3DSI_OPCODE_MASK
);
}
static
inline
BOOL
shader_is_scalar
(
DWORD
param
)
{
DWORD
reg_type
=
shader_get_regtype
(
param
);
DWORD
reg_num
;
switch
(
reg_type
)
{
static
inline
BOOL
shader_is_scalar
(
WINED3DSHADER_PARAM_REGISTER_TYPE
register_type
,
UINT
register_idx
)
{
switch
(
register_type
)
{
case
WINED3DSPR_RASTOUT
:
if
((
param
&
WINED3DSP_REGNUM_MASK
)
!=
0
)
{
/* oFog & oPts */
return
TRUE
;
}
/* oFog & oPts */
if
(
register_idx
!=
0
)
return
TRUE
;
/* oPos */
return
FALSE
;
...
...
@@ -2406,8 +2403,8 @@ static inline BOOL shader_is_scalar(DWORD param) {
return
TRUE
;
case
WINED3DSPR_MISCTYPE
:
reg_num
=
param
&
WINED3DSP_REGNUM_MASK
;
switch
(
reg_num
)
{
switch
(
register_idx
)
{
case
0
:
/* vPos */
return
FALSE
;
case
1
:
/* vFace */
...
...
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