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
7e3c7840
Commit
7e3c7840
authored
Mar 28, 2012
by
Matteo Bruni
Committed by
Alexandre Julliard
Mar 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Support WINED3D_TTFF_COUNT3 texture projection in the ARB backend.
parent
439097c8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+15
-5
No files found.
dlls/wined3d/arb_program_shader.c
View file @
7e3c7840
...
...
@@ -1914,6 +1914,7 @@ static void pshader_hw_tex(const struct wined3d_shader_instruction *ins)
char
reg_coord
[
40
];
DWORD
reg_sampler_code
;
WORD
myflags
=
0
;
BOOL
swizzle_coord
=
FALSE
;
/* All versions have a destination register */
shader_arb_get_dst_param
(
ins
,
dst
,
reg_dest
);
...
...
@@ -1948,18 +1949,18 @@ static void pshader_hw_tex(const struct wined3d_shader_instruction *ins)
if
(
reg_sampler_code
<
MAX_TEXTURES
)
flags
=
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg_sampler_code
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
;
if
(
flags
&
WINED3D_PSARGS_PROJECTED
)
{
myflags
|=
TEX_PROJ
;
if
((
flags
&
~
WINED3D_PSARGS_PROJECTED
)
==
WINED3D_TTFF_COUNT3
)
swizzle_coord
=
TRUE
;
}
}
else
if
(
shader_version
<
WINED3D_SHADER_VERSION
(
2
,
0
))
{
enum
wined3d_shader_src_modifier
src_mod
=
ins
->
src
[
0
].
modifiers
;
if
(
src_mod
==
WINED3DSPSM_DZ
)
{
/* TXP cannot handle DZ natively, so move the z coordinate to .w. reg_coord is a read-only
* varying register, so we need a temp reg
*/
shader_addline
(
ins
->
ctx
->
buffer
,
"SWZ TA, %s, x, y, z, z;
\n
"
,
reg_coord
);
strcpy
(
reg_coord
,
"TA"
);
swizzle_coord
=
TRUE
;
myflags
|=
TEX_PROJ
;
}
else
if
(
src_mod
==
WINED3DSPSM_DW
)
{
myflags
|=
TEX_PROJ
;
...
...
@@ -1968,6 +1969,15 @@ static void pshader_hw_tex(const struct wined3d_shader_instruction *ins)
if
(
ins
->
flags
&
WINED3DSI_TEXLD_PROJECT
)
myflags
|=
TEX_PROJ
;
if
(
ins
->
flags
&
WINED3DSI_TEXLD_BIAS
)
myflags
|=
TEX_BIAS
;
}
if
(
swizzle_coord
)
{
/* TXP cannot handle DZ natively, so move the z coordinate to .w.
* reg_coord is a read-only varying register, so we need a temp reg */
shader_addline
(
ins
->
ctx
->
buffer
,
"SWZ TA, %s, x, y, z, z;
\n
"
,
reg_coord
);
strcpy
(
reg_coord
,
"TA"
);
}
shader_hw_sample
(
ins
,
reg_sampler_code
,
reg_dest
,
reg_coord
,
myflags
,
NULL
,
NULL
);
}
...
...
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