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
795c4a77
Commit
795c4a77
authored
Oct 28, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle projected cube textures.
parent
d262752a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
glsl_shader.c
dlls/wined3d/glsl_shader.c
+10
-8
No files found.
dlls/wined3d/glsl_shader.c
View file @
795c4a77
...
...
@@ -2213,13 +2213,18 @@ static void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
/* 1.0-1.4: Use destination register as sampler source.
* 2.0+: Use provided sampler source. */
if
(
hex_version
<
WINED3DPS_VERSION
(
1
,
4
))
{
DWORD
flags
;
if
(
hex_version
<
WINED3DPS_VERSION
(
2
,
0
))
{
sampler_idx
=
arg
->
dst
&
WINED3DSP_REGNUM_MASK
;
flags
=
deviceImpl
->
stateBlock
->
textureState
[
sampler_idx
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
];
}
else
{
sampler_idx
=
arg
->
src
[
1
]
&
WINED3DSP_REGNUM_MASK
;
}
sampler_type
=
arg
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
if
(
hex_version
<
WINED3DPS_VERSION
(
1
,
4
))
{
DWORD
flags
=
deviceImpl
->
stateBlock
->
textureState
[
sampler_idx
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
];
if
(
flags
&
WINED3DTTFF_PROJECTED
)
{
/* Projected cube textures don't make a lot of sense, the resulting coordinates stay the same. */
if
(
flags
&
WINED3DTTFF_PROJECTED
&&
sampler_type
!=
WINED3DSTT_CUBE
)
{
projected
=
TRUE
;
switch
(
flags
&
~
WINED3DTTFF_PROJECTED
)
{
case
WINED3DTTFF_COUNT1
:
FIXME
(
"WINED3DTTFF_PROJECTED with WINED3DTTFF_COUNT1?
\n
"
);
break
;
...
...
@@ -2233,7 +2238,6 @@ static void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
}
}
else
if
(
hex_version
<
WINED3DPS_VERSION
(
2
,
0
))
{
DWORD
src_mod
=
arg
->
src
[
0
]
&
WINED3DSP_SRCMOD_MASK
;
sampler_idx
=
arg
->
dst
&
WINED3DSP_REGNUM_MASK
;
if
(
src_mod
==
WINED3DSPSM_DZ
)
{
projected
=
TRUE
;
...
...
@@ -2245,7 +2249,6 @@ static void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
projected
=
FALSE
;
}
}
else
{
sampler_idx
=
arg
->
src
[
1
]
&
WINED3DSP_REGNUM_MASK
;
if
(
arg
->
opcode_token
&
WINED3DSI_TEXLD_PROJECT
)
{
/* ps 2.0 texldp instruction always divides by the fourth component. */
projected
=
TRUE
;
...
...
@@ -2260,7 +2263,6 @@ static void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
texrect
=
TRUE
;
}
sampler_type
=
arg
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
shader_glsl_get_sample_function
(
sampler_type
,
projected
,
texrect
,
&
sample_function
);
mask
|=
sample_function
.
coord_mask
;
...
...
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