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
f69f2aa3
Commit
f69f2aa3
authored
Jan 23, 2012
by
Matteo Bruni
Committed by
Alexandre Julliard
Jan 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: SM1 texture projection always divides by w when there is a vertex shader set.
parent
41c910d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
24 deletions
+29
-24
visual.c
dlls/d3d9/tests/visual.c
+9
-9
shader.c
dlls/wined3d/shader.c
+20
-15
No files found.
dlls/d3d9/tests/visual.c
View file @
f69f2aa3
...
...
@@ -4237,25 +4237,25 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device)
struct
projected_textures_test_run
projected_tests_3
[
4
]
=
{
{
"D3DTTFF_PROJECTED (like COUNT4 | PROJECTED) - bottom left"
,
"D3DTTFF_
COUNT3 | D3DTTFF_
PROJECTED (like COUNT4 | PROJECTED) - bottom left"
,
D3DTTFF_PROJECTED
,
decl3
,
TRUE
,
TRU
E
,
TRUE
,
FALS
E
,
{
120
,
300
,
240
,
390
},
},
{
"D3DTTFF_
PROJECTED (like COUNT4 | PROJECTED, the w component has the default value 1.0
) - bottom right"
,
D3DTTFF_PROJECTED
,
decl
,
"D3DTTFF_
COUNT3 | D3DTTFF_PROJECTED (like COUNT4 | PROJECTED
) - bottom right"
,
D3DTTFF_
COUNT3
|
D3DTTFF_
PROJECTED
,
decl
3
,
TRUE
,
TRUE
,
{
340
,
450
,
360
,
465
},
{
440
,
300
,
560
,
390
},
},
{
"0xffffffff (like COUNT4 | PROJECTED
, the w component has the default value 1.0
) - top left"
,
"0xffffffff (like COUNT4 | PROJECTED) - top left"
,
0xffffffff
,
decl
,
decl
3
,
TRUE
,
TRUE
,
{
20
,
210
,
40
,
225
},
{
120
,
60
,
240
,
150
},
},
{
"D3DTTFF_PROJECTED (like COUNT4 | PROJECTED) - top right"
,
...
...
dlls/wined3d/shader.c
View file @
f69f2aa3
...
...
@@ -1919,14 +1919,15 @@ void find_ps_compile_args(const struct wined3d_state *state,
if
(
flags
&
WINED3D_TTFF_PROJECTED
)
{
enum
wined3d_sampler_texture_type
sampler_type
=
shader
->
reg_maps
.
sampler_type
[
i
];
DWORD
tex_transform
=
flags
&
~
WINED3D_TTFF_PROJECTED
;
DWORD
max_valid
=
WINED3D_TTFF_COUNT4
;
if
(
!
state
->
vertex_shader
)
{
unsigned
int
j
;
unsigned
int
index
=
state
->
texture_states
[
i
][
WINED3D_TSS_TEXCOORD_INDEX
];
DWORD
max_valid
=
WINED3D_TTFF_COUNT4
;
enum
wined3d_sampler_texture_type
sampler_type
=
shader
->
reg_maps
.
sampler_type
[
i
];
for
(
j
=
0
;
j
<
state
->
vertex_declaration
->
element_count
;
++
j
)
{
struct
wined3d_vertex_declaration_element
*
element
=
...
...
@@ -1939,21 +1940,25 @@ void find_ps_compile_args(const struct wined3d_state *state,
break
;
}
}
if
(
!
tex_transform
||
tex_transform
>
max_valid
)
{
WARN
(
"Fixing up projected texture transform flags from %#x to %#x.
\n
"
,
tex_transform
,
max_valid
);
tex_transform
=
max_valid
;
}
if
((
sampler_type
==
WINED3DSTT_1D
&&
tex_transform
>
WINED3D_TTFF_COUNT1
)
||
(
sampler_type
==
WINED3DSTT_2D
&&
tex_transform
>
WINED3D_TTFF_COUNT2
)
||
(
sampler_type
==
WINED3DSTT_VOLUME
&&
tex_transform
>
WINED3D_TTFF_COUNT3
))
tex_transform
|=
WINED3D_PSARGS_PROJECTED
;
else
{
WARN
(
"Application requested projected texture with unsuitable texture coordinates.
\n
"
);
WARN
(
"(texture unit %u, transform flags %#x, sampler type %u).
\n
"
,
i
,
tex_transform
,
sampler_type
);
}
}
if
(
!
tex_transform
||
tex_transform
>
max_valid
)
{
WARN
(
"Fixing up projected texture transform flags from %#x to %#x.
\n
"
,
tex_transform
,
max_valid
);
tex_transform
=
max_valid
;
}
if
((
sampler_type
==
WINED3DSTT_1D
&&
tex_transform
>
WINED3D_TTFF_COUNT1
)
||
(
sampler_type
==
WINED3DSTT_2D
&&
tex_transform
>
WINED3D_TTFF_COUNT2
)
||
(
sampler_type
==
WINED3DSTT_VOLUME
&&
tex_transform
>
WINED3D_TTFF_COUNT3
))
tex_transform
|=
WINED3D_PSARGS_PROJECTED
;
else
WARN
(
"Application requested projected texture with unsuitable texture coordinates.
\n
"
)
;
tex_transform
=
WINED3D_TTFF_COUNT4
|
WINED3D_PSARGS_PROJECTED
;
args
->
tex_transform
|=
tex_transform
<<
i
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
;
}
...
...
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