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
837027fc
Commit
837027fc
authored
Oct 10, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Oct 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: D3DTEXTURESTAGESTATETYPE: Consistently use in WINED3D namespace.
parent
19c5534c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
41 deletions
+41
-41
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
device.c
dlls/wined3d/device.c
+1
-1
drawprim.c
dlls/wined3d/drawprim.c
+12
-12
glsl_shader.c
dlls/wined3d/glsl_shader.c
+1
-1
stateblock.c
dlls/wined3d/stateblock.c
+18
-18
utils.c
dlls/wined3d/utils.c
+8
-8
No files found.
dlls/wined3d/arb_program_shader.c
View file @
837027fc
...
...
@@ -673,7 +673,7 @@ void pshader_hw_tex(SHADER_OPCODE_ARG* arg) {
tex_type
=
"2D"
;
}
if
(
deviceImpl
->
stateBlock
->
textureState
[
reg_sampler_code
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
if
(
deviceImpl
->
stateBlock
->
textureState
[
reg_sampler_code
][
WINE
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
shader_addline
(
buffer
,
"TXP %s, %s, texture[%u], %s;
\n
"
,
reg_dest
,
reg_coord
,
reg_sampler_code
,
tex_type
);
}
else
{
...
...
dlls/wined3d/device.c
View file @
837027fc
...
...
@@ -5528,7 +5528,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
/* FIXME: From MSDN: The WINED3DTSS_TCI_* flags are mutually exclusive. If you include
one flag, you can still specify an index value, which the system uses to
determine the texture wrapping mode.
eg. SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEPOSITION | 1 );
eg. SetTextureStageState( 0,
WINE
D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEPOSITION | 1 );
means use the vertex position (camera-space) as the input texture coordinates
for this texture stage, and the wrap mode set in the WINED3DRS_WRAP1 render
state. We do not (yet) support the D3DRENDERSTATE_WRAPx values, nor tie them up
...
...
dlls/wined3d/drawprim.c
View file @
837027fc
...
...
@@ -570,7 +570,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
/* numTextures indicates the number of texture coordinates supplied */
/* However, the first set may not be for stage 0 texture - it all */
/* depends on
D3DTSS_TEXCOORDINDEX.
*/
/* depends on
WINED3DTSS_TEXCOORDINDEX.
*/
/* The number of bytes for each coordinate set is based off */
/* D3DFVF_TEXCOORDSIZEn, which are the bottom 2 bits */
...
...
@@ -715,7 +715,7 @@ static void draw_vertex(IWineD3DDevice *iface, /* interf
/* Query tex coords */
if (This->stateBlock->textures[textureNo] != NULL) {
int coordIdx = This->stateBlock->textureState[textureNo][D3DTSS_TEXCOORDINDEX];
int coordIdx = This->stateBlock->textureState[textureNo][
WINE
D3DTSS_TEXCOORDINDEX];
if (coordIdx >= MAX_TEXTURES) {
VTRACE(("tex: %d - Skip tex coords, as being system generated\n", textureNo));
continue;
...
...
@@ -1179,7 +1179,7 @@ static void loadVertexData(IWineD3DDevice *iface, WineDirect3DVertexStridedData
}
if
(
This
->
stateBlock
->
textures
[
textureNo
]
!=
NULL
)
{
int
coordIdx
=
This
->
stateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXCOORDINDEX
];
int
coordIdx
=
This
->
stateBlock
->
textureState
[
textureNo
][
WINE
D3DTSS_TEXCOORDINDEX
];
if
(
coordIdx
>=
MAX_TEXTURES
)
{
VTRACE
((
"tex: %d - Skip tex coords, as being system generated
\n
"
,
textureNo
));
...
...
@@ -1387,7 +1387,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
/* Query tex coords */
if
(
This
->
stateBlock
->
textures
[
textureNo
]
!=
NULL
)
{
int
coordIdx
=
This
->
stateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXCOORDINDEX
];
int
coordIdx
=
This
->
stateBlock
->
textureState
[
textureNo
][
WINE
D3DTSS_TEXCOORDINDEX
];
float
*
ptrToCoords
=
NULL
;
float
s
=
0
.
0
,
t
=
0
.
0
,
r
=
0
.
0
,
q
=
0
.
0
;
...
...
@@ -1419,11 +1419,11 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
}
/* Projected is more 'fun' - Move the last coord to the 'q'
parameter (see comments under D3DTSS_TEXTURETRANSFORMFLAGS */
if
((
This
->
stateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
!=
D3DTTFF_DISABLE
)
&&
(
This
->
stateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
))
{
parameter (see comments under
WINE
D3DTSS_TEXTURETRANSFORMFLAGS */
if
((
This
->
stateBlock
->
textureState
[
textureNo
][
WINE
D3DTSS_TEXTURETRANSFORMFLAGS
]
!=
D3DTTFF_DISABLE
)
&&
(
This
->
stateBlock
->
textureState
[
textureNo
][
WINE
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
))
{
if
(
This
->
stateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
if
(
This
->
stateBlock
->
textureState
[
textureNo
][
WINE
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
switch
(
coordsToUse
)
{
case
0
:
/* Drop Through */
case
1
:
...
...
@@ -1442,8 +1442,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
case
4
:
/* Nop here */
break
;
default:
FIXME
(
"Unexpected D3DTSS_TEXTURETRANSFORMFLAGS value of %d
\n
"
,
This
->
stateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
);
FIXME
(
"Unexpected
WINE
D3DTSS_TEXTURETRANSFORMFLAGS value of %d
\n
"
,
This
->
stateBlock
->
textureState
[
textureNo
][
WINE
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
);
}
}
}
...
...
@@ -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][D3DTSS_TEXTURETRANSFORMFLAGS] != D3DTTFF_DISABLE) {
numcoords[textureNo] = This->stateBlock->texture_state[textureNo][D3DTSS_TEXTURETRANSFORMFLAGS] & ~D3DTTFF_PROJECTED;
if (This->stateBlock->texture_state[textureNo][
WINE
D3DTSS_TEXTURETRANSFORMFLAGS] != D3DTTFF_DISABLE) {
numcoords[textureNo] = This->stateBlock->texture_state[textureNo][
WINE
D3DTSS_TEXTURETRANSFORMFLAGS] & ~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 @
837027fc
...
...
@@ -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
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
if
(
deviceImpl
->
stateBlock
->
textureState
[
sampler_code
][
WINE
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
switch
(
sampler_type
)
{
case
WINED3DSTT_2D
:
...
...
dlls/wined3d/stateblock.c
View file @
837027fc
...
...
@@ -985,24 +985,24 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
for
(
i
=
0
;
i
<
GL_LIMITS
(
texture_stages
);
i
++
)
{
TRACE
(
"Setting up default texture states for texture Stage %d
\n
"
,
i
);
memcpy
(
&
This
->
transforms
[
WINED3DTS_TEXTURE0
+
i
],
&
identity
,
sizeof
(
identity
));
This
->
textureState
[
i
][
D3DTSS_COLOROP
]
=
(
i
==
0
)
?
D3DTOP_MODULATE
:
D3DTOP_DISABLE
;
This
->
textureState
[
i
][
D3DTSS_COLORARG1
]
=
D3DTA_TEXTURE
;
This
->
textureState
[
i
][
D3DTSS_COLORARG2
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
D3DTSS_ALPHAOP
]
=
(
i
==
0
)
?
D3DTOP_SELECTARG1
:
D3DTOP_DISABLE
;
This
->
textureState
[
i
][
D3DTSS_ALPHAARG1
]
=
D3DTA_TEXTURE
;
This
->
textureState
[
i
][
D3DTSS_ALPHAARG2
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
D3DTSS_BUMPENVMAT00
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
D3DTSS_BUMPENVMAT01
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
D3DTSS_BUMPENVMAT10
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
D3DTSS_BUMPENVMAT11
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
D3DTSS_TEXCOORDINDEX
]
=
i
;
This
->
textureState
[
i
][
D3DTSS_BUMPENVLSCALE
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
D3DTSS_BUMPENVLOFFSET
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
=
D3DTTFF_DISABLE
;
This
->
textureState
[
i
][
D3DTSS_ADDRESSW
]
=
D3DTADDRESS_WRAP
;
This
->
textureState
[
i
][
D3DTSS_COLORARG0
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
D3DTSS_ALPHAARG0
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
D3DTSS_RESULTARG
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
WINE
D3DTSS_COLOROP
]
=
(
i
==
0
)
?
D3DTOP_MODULATE
:
D3DTOP_DISABLE
;
This
->
textureState
[
i
][
WINE
D3DTSS_COLORARG1
]
=
D3DTA_TEXTURE
;
This
->
textureState
[
i
][
WINE
D3DTSS_COLORARG2
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
WINE
D3DTSS_ALPHAOP
]
=
(
i
==
0
)
?
D3DTOP_SELECTARG1
:
D3DTOP_DISABLE
;
This
->
textureState
[
i
][
WINE
D3DTSS_ALPHAARG1
]
=
D3DTA_TEXTURE
;
This
->
textureState
[
i
][
WINE
D3DTSS_ALPHAARG2
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
WINE
D3DTSS_BUMPENVMAT00
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
WINE
D3DTSS_BUMPENVMAT01
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
WINE
D3DTSS_BUMPENVMAT10
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
WINE
D3DTSS_BUMPENVMAT11
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
WINE
D3DTSS_TEXCOORDINDEX
]
=
i
;
This
->
textureState
[
i
][
WINE
D3DTSS_BUMPENVLSCALE
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
WINE
D3DTSS_BUMPENVLOFFSET
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
WINE
D3DTSS_TEXTURETRANSFORMFLAGS
]
=
D3DTTFF_DISABLE
;
This
->
textureState
[
i
][
WINE
D3DTSS_ADDRESSW
]
=
D3DTADDRESS_WRAP
;
This
->
textureState
[
i
][
WINE
D3DTSS_COLORARG0
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
WINE
D3DTSS_ALPHAARG0
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
WINE
D3DTSS_RESULTARG
]
=
D3DTA_CURRENT
;
}
/* Sampler states*/
...
...
dlls/wined3d/utils.c
View file @
837027fc
...
...
@@ -563,7 +563,7 @@ const char* debug_d3dtexturestate(DWORD state) {
D3DSTATE_TO_STR
(
WINED3DTSS_CONSTANT
);
#undef D3DSTATE_TO_STR
case
12
:
/* Note D3DTSS are not consecutive, so skip these */
/* Note
WINE
D3DTSS are not consecutive, so skip these */
return
"unused"
;
break
;
default:
...
...
@@ -701,12 +701,12 @@ static GLenum d3dta_to_combiner_input(DWORD d3dta, DWORD stage, INT texture_idx)
return
GL_SECONDARY_COLOR_NV
;
case
D3DTA_TEMP
:
/* TODO: Support D3DTSS_RESULTARG */
/* TODO: Support
WINE
D3DTSS_RESULTARG */
FIXME
(
"D3DTA_TEMP, not properly supported.
\n
"
);
return
GL_SPARE1_NV
;
case
D3DTA_CONSTANT
:
/* TODO: Support per stage constants (D3DTSS_CONSTANT, NV_register_combiners2) */
/* TODO: Support per stage constants (
WINE
D3DTSS_CONSTANT, NV_register_combiners2) */
FIXME
(
"D3DTA_CONSTANT, not properly supported.
\n
"
);
return
GL_CONSTANT_COLOR1_NV
;
...
...
@@ -784,7 +784,7 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, D3DTEXTURE
{
case
D3DTOP_DISABLE
:
/* Only for alpha */
if
(
!
is_alpha
)
ERR
(
"Shouldn't be called for D3DTSS_COLOROP (D3DTOP_DISABLE)
\n
"
);
if
(
!
is_alpha
)
ERR
(
"Shouldn't be called for
WINE
D3DTSS_COLOROP (D3DTOP_DISABLE)
\n
"
);
/* Input, prev_alpha*1 */
GL_EXTCALL
(
glCombinerInputNV
(
target
,
portion
,
GL_VARIABLE_A_NV
,
GL_SPARE0_NV
,
GL_UNSIGNED_IDENTITY_NV
,
GL_ALPHA
));
...
...
@@ -932,7 +932,7 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, D3DTEXTURE
case
D3DTOP_MODULATEALPHA_ADDCOLOR
:
/* Input, arg1_alpha*arg2_rgb+arg1_rgb*1 */
if
(
is_alpha
)
ERR
(
"Only supported for D3DTSS_COLOROP (D3DTOP_MODULATEALPHA_ADDCOLOR)
\n
"
);
if
(
is_alpha
)
ERR
(
"Only supported for
WINE
D3DTSS_COLOROP (D3DTOP_MODULATEALPHA_ADDCOLOR)
\n
"
);
GL_EXTCALL
(
glCombinerInputNV
(
target
,
portion
,
GL_VARIABLE_A_NV
,
tex_op_args
.
input
[
0
],
tex_op_args
.
mapping
[
0
],
GL_ALPHA
));
GL_EXTCALL
(
glCombinerInputNV
(
target
,
portion
,
GL_VARIABLE_B_NV
,
...
...
@@ -949,7 +949,7 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, D3DTEXTURE
case
D3DTOP_MODULATECOLOR_ADDALPHA
:
/* Input, arg1_rgb*arg2_rgb+arg1_alpha*1 */
if
(
is_alpha
)
ERR
(
"Only supported for D3DTSS_COLOROP (D3DTOP_MODULATECOLOR_ADDALPHA)
\n
"
);
if
(
is_alpha
)
ERR
(
"Only supported for
WINE
D3DTSS_COLOROP (D3DTOP_MODULATECOLOR_ADDALPHA)
\n
"
);
GL_EXTCALL
(
glCombinerInputNV
(
target
,
portion
,
GL_VARIABLE_A_NV
,
tex_op_args
.
input
[
0
],
tex_op_args
.
mapping
[
0
],
tex_op_args
.
component_usage
[
0
]));
GL_EXTCALL
(
glCombinerInputNV
(
target
,
portion
,
GL_VARIABLE_B_NV
,
...
...
@@ -966,7 +966,7 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, D3DTEXTURE
case
D3DTOP_MODULATEINVALPHA_ADDCOLOR
:
/* Input, (1-arg1_alpha)*arg2_rgb+arg1_rgb*1 */
if
(
is_alpha
)
ERR
(
"Only supported for D3DTSS_COLOROP (D3DTOP_MODULATEINVALPHA_ADDCOLOR)
\n
"
);
if
(
is_alpha
)
ERR
(
"Only supported for
WINE
D3DTSS_COLOROP (D3DTOP_MODULATEINVALPHA_ADDCOLOR)
\n
"
);
GL_EXTCALL
(
glCombinerInputNV
(
target
,
portion
,
GL_VARIABLE_A_NV
,
tex_op_args
.
input
[
0
],
invert_mapping
(
tex_op_args
.
mapping
[
0
]),
GL_ALPHA
));
GL_EXTCALL
(
glCombinerInputNV
(
target
,
portion
,
GL_VARIABLE_B_NV
,
...
...
@@ -983,7 +983,7 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, D3DTEXTURE
case
D3DTOP_MODULATEINVCOLOR_ADDALPHA
:
/* Input, (1-arg1_rgb)*arg2_rgb+arg1_alpha*1 */
if
(
is_alpha
)
ERR
(
"Only supported for D3DTSS_COLOROP (D3DTOP_MODULATEINVCOLOR_ADDALPHA)
\n
"
);
if
(
is_alpha
)
ERR
(
"Only supported for
WINE
D3DTSS_COLOROP (D3DTOP_MODULATEINVCOLOR_ADDALPHA)
\n
"
);
GL_EXTCALL
(
glCombinerInputNV
(
target
,
portion
,
GL_VARIABLE_A_NV
,
tex_op_args
.
input
[
0
],
invert_mapping
(
tex_op_args
.
mapping
[
0
]),
tex_op_args
.
component_usage
[
0
]));
GL_EXTCALL
(
glCombinerInputNV
(
target
,
portion
,
GL_VARIABLE_B_NV
,
...
...
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