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
98466024
Commit
98466024
authored
Oct 12, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Oct 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add D3DTEXTURETRANSFORMTYPE to the WINED3D namespace.
parent
4745e602
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
30 deletions
+43
-30
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
cubetexture.c
dlls/wined3d/cubetexture.c
+3
-1
drawprim.c
dlls/wined3d/drawprim.c
+15
-15
glsl_shader.c
dlls/wined3d/glsl_shader.c
+1
-1
stateblock.c
dlls/wined3d/stateblock.c
+1
-1
texture.c
dlls/wined3d/texture.c
+1
-1
utils.c
dlls/wined3d/utils.c
+10
-10
wined3d_types.h
include/wine/wined3d_types.h
+11
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
98466024
...
...
@@ -673,7 +673,7 @@ void pshader_hw_tex(SHADER_OPCODE_ARG* arg) {
tex_type
=
"2D"
;
}
if
(
deviceImpl
->
stateBlock
->
textureState
[
reg_sampler_code
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
if
(
deviceImpl
->
stateBlock
->
textureState
[
reg_sampler_code
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
WINE
D3DTTFF_PROJECTED
)
{
shader_addline
(
buffer
,
"TXP %s, %s, texture[%u], %s;
\n
"
,
reg_dest
,
reg_coord
,
reg_sampler_code
,
tex_type
);
}
else
{
...
...
dlls/wined3d/cubetexture.c
View file @
98466024
...
...
@@ -232,7 +232,9 @@ static void WINAPI IWineD3DCubeTextureImpl_ApplyStateChanges(IWineD3DCubeTexture
/* Apply non-power2 mappings and texture offsets so long as the texture coords aren't projected or generated */
if
(
This
->
pow2scalingFactor
!=
1
.
0
f
)
{
if
((
textureStates
[
WINED3DTSS_TEXCOORDINDEX
]
&
0xFFFF0000
)
==
D3DTSS_TCI_PASSTHRU
&&
(
~
textureStates
[
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
))
{
if
((
textureStates
[
WINED3DTSS_TEXCOORDINDEX
]
&
0xFFFF0000
)
==
D3DTSS_TCI_PASSTHRU
&&
(
~
textureStates
[
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
WINED3DTTFF_PROJECTED
))
{
glMatrixMode
(
GL_TEXTURE
);
memset
(
matrix
,
0
,
sizeof
(
matrix
));
...
...
dlls/wined3d/drawprim.c
View file @
98466024
...
...
@@ -738,7 +738,7 @@ static void draw_vertex(IWineD3DDevice *iface, /* interf
}
switch (numcoords[coordIdx]) { /* Supply the provided texture coords */
case D3DTTFF_COUNT1:
case
WINE
D3DTTFF_COUNT1:
VTRACE(("tex:%d, s=%f\n", textureNo, s));
if (GL_SUPPORT(ARB_MULTITEXTURE)) {
GLMULTITEXCOORD1F(textureNo, s);
...
...
@@ -746,7 +746,7 @@ static void draw_vertex(IWineD3DDevice *iface, /* interf
glTexCoord1f(s);
}
break;
case D3DTTFF_COUNT2:
case
WINE
D3DTTFF_COUNT2:
VTRACE(("tex:%d, s=%f, t=%f\n", textureNo, s, t));
if (GL_SUPPORT(ARB_MULTITEXTURE)) {
GLMULTITEXCOORD2F(textureNo, s, t);
...
...
@@ -754,7 +754,7 @@ static void draw_vertex(IWineD3DDevice *iface, /* interf
glTexCoord2f(s, t);
}
break;
case D3DTTFF_COUNT3:
case
WINE
D3DTTFF_COUNT3:
VTRACE(("tex:%d, s=%f, t=%f, r=%f\n", textureNo, s, t, r));
if (GL_SUPPORT(ARB_MULTITEXTURE)) {
GLMULTITEXCOORD3F(textureNo, s, t, r);
...
...
@@ -762,7 +762,7 @@ static void draw_vertex(IWineD3DDevice *iface, /* interf
glTexCoord3f(s, t, r);
}
break;
case D3DTTFF_COUNT4:
case
WINE
D3DTTFF_COUNT4:
VTRACE(("tex:%d, s=%f, t=%f, r=%f, q=%f\n", textureNo, s, t, r, q));
if (GL_SUPPORT(ARB_MULTITEXTURE)) {
GLMULTITEXCOORD4F(textureNo, s, t, r, q);
...
...
@@ -1420,14 +1420,14 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
/* Projected is more 'fun' - Move the last coord to the 'q'
parameter (see comments under WINED3DTSS_TEXTURETRANSFORMFLAGS */
if
((
This
->
stateBlock
->
textureState
[
textureNo
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
!=
D3DTTFF_DISABLE
)
&&
(
This
->
stateBlock
->
textureState
[
textureNo
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
))
{
if
((
This
->
stateBlock
->
textureState
[
textureNo
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
!=
WINE
D3DTTFF_DISABLE
)
&&
(
This
->
stateBlock
->
textureState
[
textureNo
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
WINE
D3DTTFF_PROJECTED
))
{
if
(
This
->
stateBlock
->
textureState
[
textureNo
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
if
(
This
->
stateBlock
->
textureState
[
textureNo
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
WINE
D3DTTFF_PROJECTED
)
{
switch
(
coordsToUse
)
{
case
0
:
/* Drop Through */
case
1
:
FIXME
(
"D3DTTFF_PROJECTED but only zero or one coordinate?
\n
"
);
FIXME
(
"
WINE
D3DTTFF_PROJECTED but only zero or one coordinate?
\n
"
);
break
;
case
2
:
q
=
t
;
...
...
@@ -1443,13 +1443,13 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
break
;
default:
FIXME
(
"Unexpected WINED3DTSS_TEXTURETRANSFORMFLAGS value of %d
\n
"
,
This
->
stateBlock
->
textureState
[
textureNo
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
);
This
->
stateBlock
->
textureState
[
textureNo
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
WINE
D3DTTFF_PROJECTED
);
}
}
}
switch
(
coordsToUse
)
{
/* Supply the provided texture coords */
case
D3DTTFF_COUNT1
:
case
WINE
D3DTTFF_COUNT1
:
VTRACE
((
"tex:%d, s=%f
\n
"
,
textureNo
,
s
));
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
GL_EXTCALL
(
glMultiTexCoord1fARB
(
texture_idx
,
s
));
...
...
@@ -1457,7 +1457,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
glTexCoord1f
(
s
);
}
break
;
case
D3DTTFF_COUNT2
:
case
WINE
D3DTTFF_COUNT2
:
VTRACE
((
"tex:%d, s=%f, t=%f
\n
"
,
textureNo
,
s
,
t
));
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
GL_EXTCALL
(
glMultiTexCoord2fARB
(
texture_idx
,
s
,
t
));
...
...
@@ -1465,7 +1465,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
glTexCoord2f
(
s
,
t
);
}
break
;
case
D3DTTFF_COUNT3
:
case
WINE
D3DTTFF_COUNT3
:
VTRACE
((
"tex:%d, s=%f, t=%f, r=%f
\n
"
,
textureNo
,
s
,
t
,
r
));
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
GL_EXTCALL
(
glMultiTexCoord3fARB
(
texture_idx
,
s
,
t
,
r
));
...
...
@@ -1473,7 +1473,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
glTexCoord3f
(
s
,
t
,
r
);
}
break
;
case
D3DTTFF_COUNT4
:
case
WINE
D3DTTFF_COUNT4
:
VTRACE
((
"tex:%d, s=%f, t=%f, r=%f, q=%f
\n
"
,
textureNo
,
s
,
t
,
r
,
q
));
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
GL_EXTCALL
(
glMultiTexCoord4fARB
(
texture_idx
,
s
,
t
,
r
,
q
));
...
...
@@ -1683,8 +1683,8 @@ void drawStridedSoftwareVS(IWineD3DDevice *iface, WineDirect3DVertexStridedData
texcoords[textureNo].y = vertexShader->output.oT[textureNo].y;
texcoords[textureNo].z = vertexShader->output.oT[textureNo].z;
texcoords[textureNo].w = vertexShader->output.oT[textureNo].w;
if (This->stateBlock->texture_state[textureNo][WINED3DTSS_TEXTURETRANSFORMFLAGS] != D3DTTFF_DISABLE) {
numcoords[textureNo] = This->stateBlock->texture_state[textureNo][WINED3DTSS_TEXTURETRANSFORMFLAGS] & ~D3DTTFF_PROJECTED;
if (This->stateBlock->texture_state[textureNo][WINED3DTSS_TEXTURETRANSFORMFLAGS] !=
WINE
D3DTTFF_DISABLE) {
numcoords[textureNo] = This->stateBlock->texture_state[textureNo][WINED3DTSS_TEXTURETRANSFORMFLAGS] & ~
WINE
D3DTTFF_PROJECTED;
} else {
switch (IDirect3DBaseTexture8Impl_GetType((LPDIRECT3DBASETEXTURE8) This->stateBlock->textures[textureNo])) {
case WINED3DRTYPE_TEXTURE: numcoords[textureNo] = 2; break;
...
...
dlls/wined3d/glsl_shader.c
View file @
98466024
...
...
@@ -1393,7 +1393,7 @@ void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
}
sampler_type
=
arg
->
reg_maps
->
samplers
[
sampler_code
]
&
WINED3DSP_TEXTURETYPE_MASK
;
if
(
deviceImpl
->
stateBlock
->
textureState
[
sampler_code
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
if
(
deviceImpl
->
stateBlock
->
textureState
[
sampler_code
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
WINE
D3DTTFF_PROJECTED
)
{
switch
(
sampler_type
)
{
case
WINED3DSTT_2D
:
...
...
dlls/wined3d/stateblock.c
View file @
98466024
...
...
@@ -998,7 +998,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
This
->
textureState
[
i
][
WINED3DTSS_TEXCOORDINDEX
]
=
i
;
This
->
textureState
[
i
][
WINED3DTSS_BUMPENVLSCALE
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
WINED3DTSS_BUMPENVLOFFSET
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
=
D3DTTFF_DISABLE
;
This
->
textureState
[
i
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
=
WINE
D3DTTFF_DISABLE
;
This
->
textureState
[
i
][
WINED3DTSS_ADDRESSW
]
=
D3DTADDRESS_WRAP
;
This
->
textureState
[
i
][
WINED3DTSS_COLORARG0
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
WINED3DTSS_ALPHAARG0
]
=
D3DTA_CURRENT
;
...
...
dlls/wined3d/texture.c
View file @
98466024
...
...
@@ -216,7 +216,7 @@ static void WINAPI IWineD3DTextureImpl_ApplyStateChanges(IWineD3DTexture *iface,
if
(
This
->
pow2scalingFactorX
!=
1
.
0
f
||
This
->
pow2scalingFactorY
!=
1
.
0
f
)
{
/* Apply non-power2 mappings and texture offsets so long as the texture coords aren't projected or generated */
if
(((
textureStates
[
WINED3DTSS_TEXCOORDINDEX
]
&
0xFFFF0000
)
==
D3DTSS_TCI_PASSTHRU
)
&&
(
~
textureStates
[
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
))
{
(
~
textureStates
[
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
WINE
D3DTTFF_PROJECTED
))
{
glMatrixMode
(
GL_TEXTURE
);
memset
(
matrix
,
0
,
sizeof
(
matrix
));
matrix
[
0
]
=
This
->
pow2scalingFactorX
;
...
...
dlls/wined3d/utils.c
View file @
98466024
...
...
@@ -2229,32 +2229,32 @@ void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords)
glMatrixMode
(
GL_TEXTURE
);
checkGLcall
(
"glMatrixMode(GL_TEXTURE)"
);
if
(
flags
==
D3DTTFF_DISABLE
)
{
if
(
flags
==
WINE
D3DTTFF_DISABLE
)
{
glLoadIdentity
();
checkGLcall
(
"glLoadIdentity()"
);
return
;
}
if
(
flags
==
(
D3DTTFF_COUNT1
|
D3DTTFF_PROJECTED
))
{
ERR
(
"Invalid texture transform flags:
D3DTTFF_COUNT1|
D3DTTFF_PROJECTED
\n
"
);
if
(
flags
==
(
WINED3DTTFF_COUNT1
|
WINE
D3DTTFF_PROJECTED
))
{
ERR
(
"Invalid texture transform flags:
WINED3DTTFF_COUNT1|WINE
D3DTTFF_PROJECTED
\n
"
);
return
;
}
memcpy
(
mat
,
smat
,
16
*
sizeof
(
float
));
switch
(
flags
&
~
D3DTTFF_PROJECTED
)
{
case
D3DTTFF_COUNT1
:
mat
[
1
]
=
mat
[
5
]
=
mat
[
13
]
=
0
;
case
D3DTTFF_COUNT2
:
mat
[
2
]
=
mat
[
6
]
=
mat
[
10
]
=
mat
[
14
]
=
0
;
switch
(
flags
&
~
WINE
D3DTTFF_PROJECTED
)
{
case
WINE
D3DTTFF_COUNT1
:
mat
[
1
]
=
mat
[
5
]
=
mat
[
13
]
=
0
;
case
WINE
D3DTTFF_COUNT2
:
mat
[
2
]
=
mat
[
6
]
=
mat
[
10
]
=
mat
[
14
]
=
0
;
default:
mat
[
3
]
=
mat
[
7
]
=
mat
[
11
]
=
0
,
mat
[
15
]
=
1
;
}
if
(
flags
&
D3DTTFF_PROJECTED
)
{
switch
(
flags
&
~
D3DTTFF_PROJECTED
)
{
case
D3DTTFF_COUNT2
:
if
(
flags
&
WINE
D3DTTFF_PROJECTED
)
{
switch
(
flags
&
~
WINE
D3DTTFF_PROJECTED
)
{
case
WINE
D3DTTFF_COUNT2
:
mat
[
3
]
=
mat
[
1
],
mat
[
7
]
=
mat
[
5
],
mat
[
11
]
=
mat
[
9
],
mat
[
15
]
=
mat
[
13
];
mat
[
1
]
=
mat
[
5
]
=
mat
[
9
]
=
mat
[
13
]
=
0
;
break
;
case
D3DTTFF_COUNT3
:
case
WINE
D3DTTFF_COUNT3
:
mat
[
3
]
=
mat
[
2
],
mat
[
7
]
=
mat
[
6
],
mat
[
11
]
=
mat
[
10
],
mat
[
15
]
=
mat
[
14
];
mat
[
2
]
=
mat
[
6
]
=
mat
[
10
]
=
mat
[
14
]
=
0
;
break
;
...
...
include/wine/wined3d_types.h
View file @
98466024
...
...
@@ -551,6 +551,17 @@ typedef enum _WINED3DTEXTURESTAGESTATETYPE {
#define WINED3D_HIGHEST_TEXTURE_STATE WINED3DTSS_CONSTANT
typedef
enum
_WINED3DTEXTURETRANSFORMFLAGS
{
WINED3DTTFF_DISABLE
=
0
,
WINED3DTTFF_COUNT1
=
1
,
WINED3DTTFF_COUNT2
=
2
,
WINED3DTTFF_COUNT3
=
3
,
WINED3DTTFF_COUNT4
=
4
,
WINED3DTTFF_PROJECTED
=
256
,
WINED3DTTFF_FORCE_DWORD
=
0x7fffffff
}
WINED3DTEXTURETRANSFORMFLAGS
;
typedef
enum
_WINED3DTEXTUREOP
{
WINED3DTOP_DISABLE
=
1
,
WINED3DTOP_SELECTARG1
=
2
,
...
...
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