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
18c9e5d5
Commit
18c9e5d5
authored
Mar 29, 2007
by
Felix Nawothnig
Committed by
Alexandre Julliard
Mar 30, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use GL_TEXTURE_2D for dummy textures.
parent
6760ccac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
21 deletions
+8
-21
baseshader.c
dlls/wined3d/baseshader.c
+0
-4
context.c
dlls/wined3d/context.c
+0
-4
state.c
dlls/wined3d/state.c
+2
-8
stateblock.c
dlls/wined3d/stateblock.c
+6
-5
No files found.
dlls/wined3d/baseshader.c
View file @
18c9e5d5
...
...
@@ -333,10 +333,6 @@ HRESULT shader_get_registers_used(
}
else
{
int
texType
=
IWineD3DBaseTexture_GetTextureDimensions
(
stateBlock
->
textures
[
sampler_code
]);
switch
(
texType
)
{
case
GL_TEXTURE_1D
:
reg_maps
->
samplers
[
sampler_code
]
=
(
0x1
<<
31
)
|
WINED3DSTT_1D
;
break
;
case
GL_TEXTURE_2D
:
reg_maps
->
samplers
[
sampler_code
]
=
(
0x1
<<
31
)
|
WINED3DSTT_2D
;
break
;
...
...
dlls/wined3d/context.c
View file @
18c9e5d5
...
...
@@ -487,8 +487,6 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex
checkGLcall
(
"glDisable GL_TEXTURE_3D"
);
glDisable
(
GL_TEXTURE_2D
);
checkGLcall
(
"glDisable GL_TEXTURE_2D"
);
glDisable
(
GL_TEXTURE_1D
);
checkGLcall
(
"glDisable GL_TEXTURE_1D"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
GL_TEXTURE_ENV_MODE
,
GL_REPLACE
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);"
);
...
...
@@ -505,8 +503,6 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex
}
glDisable
(
GL_TEXTURE_3D
);
checkGLcall
(
"glDisable GL_TEXTURE_3D"
);
glDisable
(
GL_TEXTURE_1D
);
checkGLcall
(
"glDisable GL_TEXTURE_1D"
);
glEnable
(
GL_TEXTURE_2D
);
checkGLcall
(
"glEnable GL_TEXTURE_2D"
);
...
...
dlls/wined3d/state.c
View file @
18c9e5d5
...
...
@@ -1549,8 +1549,6 @@ static void state_ckeyblend(DWORD state, IWineD3DStateBlockImpl *stateblock, Win
*/
static
void
activate_dimensions
(
DWORD
stage
,
IWineD3DStateBlockImpl
*
stateblock
)
{
if
(
stateblock
->
textures
[
stage
])
{
glDisable
(
GL_TEXTURE_1D
);
checkGLcall
(
"glDisable(GL_TEXTURE_1D)"
);
switch
(
stateblock
->
textureDimensions
[
stage
])
{
case
GL_TEXTURE_2D
:
glDisable
(
GL_TEXTURE_3D
);
...
...
@@ -1590,8 +1588,6 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock)
glDisable
(
GL_TEXTURE_CUBE_MAP_ARB
);
checkGLcall
(
"glDisable(GL_TEXTURE_CUBE_MAP_ARB)"
);
}
glEnable
(
GL_TEXTURE_1D
);
checkGLcall
(
"glEnable(GL_TEXTURE_1D)"
);
/* Binding textures is done by samplers. A dummy texture will be bound */
}
}
...
...
@@ -1639,8 +1635,6 @@ static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
TRACE
(
"Stage disabled
\n
"
);
if
(
mapped_stage
!=
-
1
)
{
/* Disable everything here */
glDisable
(
GL_TEXTURE_1D
);
checkGLcall
(
"glDisable(GL_TEXTURE_1D)"
);
glDisable
(
GL_TEXTURE_2D
);
checkGLcall
(
"glDisable(GL_TEXTURE_2D)"
);
glDisable
(
GL_TEXTURE_3D
);
...
...
@@ -2079,8 +2073,8 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont
activate_dimensions
(
sampler
,
stateblock
);
}
}
/* Otherwise tex_colorop disables the stage */
glBindTexture
(
GL_TEXTURE_
1
D
,
stateblock
->
wineD3DDevice
->
dummyTextureName
[
sampler
]);
checkGLcall
(
"glBindTexture(GL_TEXTURE_
1
D, stateblock->wineD3DDevice->dummyTextureName[sampler])"
);
glBindTexture
(
GL_TEXTURE_
2
D
,
stateblock
->
wineD3DDevice
->
dummyTextureName
[
sampler
]);
checkGLcall
(
"glBindTexture(GL_TEXTURE_
2
D, stateblock->wineD3DDevice->dummyTextureName[sampler])"
);
}
}
...
...
dlls/wined3d/stateblock.c
View file @
18c9e5d5
...
...
@@ -1083,13 +1083,14 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
checkGLcall
(
"glGenTextures"
);
TRACE
(
"Dummy Texture %d given name %d
\n
"
,
i
,
ThisDevice
->
dummyTextureName
[
i
]);
/* Generate a dummy 1d texture */
This
->
textureDimensions
[
i
]
=
GL_TEXTURE_1D
;
glBindTexture
(
GL_TEXTURE_1D
,
ThisDevice
->
dummyTextureName
[
i
]);
/* Generate a dummy 2d texture (not using 1d because they cause many
* DRI drivers fall back to sw) */
This
->
textureDimensions
[
i
]
=
GL_TEXTURE_2D
;
glBindTexture
(
GL_TEXTURE_2D
,
ThisDevice
->
dummyTextureName
[
i
]);
checkGLcall
(
"glBindTexture"
);
glTexImage
1D
(
GL_TEXTURE_1D
,
0
,
GL_LUMINANCE
,
1
,
0
,
GL_LUMINANCE
,
GL_UNSIGNED_BYTE
,
&
white
);
checkGLcall
(
"glTexImage
1
D"
);
glTexImage
2D
(
GL_TEXTURE_2D
,
0
,
GL_LUMINANCE
,
1
,
1
,
0
,
GL_LUMINANCE
,
GL_UNSIGNED_BYTE
,
&
white
);
checkGLcall
(
"glTexImage
2
D"
);
}
LEAVE_GL
();
...
...
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