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
23cd4475
Commit
23cd4475
authored
Mar 12, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Mar 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Correct various texture limits checks.
parent
60cb73b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
state.c
dlls/wined3d/state.c
+11
-8
stateblock.c
dlls/wined3d/stateblock.c
+1
-1
No files found.
dlls/wined3d/state.c
View file @
23cd4475
...
...
@@ -1173,7 +1173,7 @@ static void state_pointsprite(DWORD state, IWineD3DStateBlockImpl *stateblock, W
val
=
GL_FALSE
;
}
for
(
i
=
0
;
i
<
GL_LIMITS
(
texture
_stage
s
);
i
++
)
{
for
(
i
=
0
;
i
<
GL_LIMITS
(
textures
);
i
++
)
{
/* Note the WINED3DRS value applies to all textures, but GL has one
* per texture, so apply it now ready to be used!
*/
...
...
@@ -1496,7 +1496,7 @@ static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
if
(
mapped_stage
!=
-
1
)
{
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
if
(
mapped_stage
>=
GL_LIMITS
(
sampler_stag
es
))
{
if
(
mapped_stage
>=
GL_LIMITS
(
textur
es
))
{
if
(
stateblock
->
textureState
[
stage
][
WINED3DTSS_COLOROP
]
!=
WINED3DTOP_DISABLE
&&
stateblock
->
textureState
[
stage
][
WINED3DTSS_COLOROP
]
!=
0
)
{
FIXME
(
"Attempt to enable unsupported stage!
\n
"
);
...
...
@@ -1569,7 +1569,7 @@ static void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
/* Do not care for enabled / disabled stages, just assign the settigns. colorop disables / enables required stuff */
if
(
mapped_stage
!=
-
1
)
{
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
if
(
stage
>=
GL_LIMITS
(
sampler_stag
es
))
{
if
(
stage
>=
GL_LIMITS
(
textur
es
))
{
if
(
stateblock
->
textureState
[
stage
][
WINED3DTSS_COLOROP
]
!=
WINED3DTOP_DISABLE
&&
stateblock
->
textureState
[
stage
][
WINED3DTSS_COLOROP
]
!=
0
)
{
FIXME
(
"Attempt to enable unsupported stage!
\n
"
);
...
...
@@ -1625,14 +1625,17 @@ static void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
static
void
transform_texture
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
DWORD
texUnit
=
state
-
STATE_TRANSFORM
(
WINED3DTS_TEXTURE0
);
DWORD
mapped_stage
=
stateblock
->
wineD3DDevice
->
texUnitMap
[
texUnit
];
if
(
mapped_stage
<
0
)
return
;
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
if
(
texUnit
>=
GL_LIMITS
(
sampler_stag
es
))
{
if
(
mapped_stage
>=
GL_LIMITS
(
textur
es
))
{
return
;
}
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
stateblock
->
wineD3DDevice
->
texUnitMap
[
texUnit
]
));
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
mapped_stage
));
checkGLcall
(
"glActiveTextureARB"
);
}
else
if
(
texUnit
>
0
)
{
}
else
if
(
mapped_stage
>
0
)
{
/* We can't do anything here */
WARN
(
"Program using multiple concurrent textures which this opengl implementation doesn't support
\n
"
);
return
;
...
...
@@ -1656,7 +1659,7 @@ static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
}
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
if
(
stage
>=
GL_LIMITS
(
sampler_stage
s
))
{
if
(
mapped_stage
>=
GL_LIMITS
(
sampler
s
))
{
return
;
}
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
mapped_stage
));
...
...
@@ -1881,7 +1884,7 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont
}
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
if
(
sampler
>=
GL_LIMITS
(
sampler_stage
s
))
{
if
(
mapped_stage
>=
GL_LIMITS
(
sampler
s
))
{
return
;
}
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
mapped_stage
));
...
...
dlls/wined3d/stateblock.c
View file @
23cd4475
...
...
@@ -1062,7 +1062,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
then the default texture will kick in until replaced by a SetTexture call */
ENTER_GL
();
for
(
i
=
0
;
i
<
GL_LIMITS
(
texture
_stage
s
);
i
++
)
{
for
(
i
=
0
;
i
<
GL_LIMITS
(
textures
);
i
++
)
{
GLubyte
white
=
255
;
/* Note this avoids calling settexture, so pretend it has been called */
...
...
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