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
568f9ecb
Commit
568f9ecb
authored
Jan 02, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass an IWineD3DBaseTextureImpl pointer to basetexture_set_autogen_filter_type().
parent
54e1aeeb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
50 deletions
+58
-50
basetexture.c
dlls/wined3d/basetexture.c
+45
-43
cubetexture.c
dlls/wined3d/cubetexture.c
+4
-2
texture.c
dlls/wined3d/texture.c
+4
-2
volumetexture.c
dlls/wined3d/volumetexture.c
+4
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/basetexture.c
View file @
568f9ecb
...
...
@@ -170,50 +170,52 @@ DWORD basetexture_get_level_count(IWineD3DBaseTextureImpl *texture)
return
texture
->
baseTexture
.
level_count
;
}
HRESULT
basetexture_set_autogen_filter_type
(
IWineD3DBaseTexture
*
iface
,
WINED3DTEXTUREFILTERTYPE
FilterT
ype
)
HRESULT
basetexture_set_autogen_filter_type
(
IWineD3DBaseTexture
Impl
*
texture
,
WINED3DTEXTUREFILTERTYPE
filter_t
ype
)
{
IWineD3DBaseTextureImpl
*
This
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
device
;
GLenum
textureDimensions
=
This
->
baseTexture
.
target
;
if
(
!
(
This
->
resource
.
usage
&
WINED3DUSAGE_AUTOGENMIPMAP
))
{
TRACE
(
"(%p) : returning invalid call
\n
"
,
This
);
return
WINED3DERR_INVALIDCALL
;
}
if
(
This
->
baseTexture
.
filterType
!=
FilterType
)
{
/* What about multithreading? Do we want all the context overhead just to set this value?
* Or should we delay the applying until the texture is used for drawing? For now, apply
* immediately.
*/
struct
wined3d_context
*
context
=
context_acquire
(
device
,
NULL
);
ENTER_GL
();
glBindTexture
(
textureDimensions
,
This
->
baseTexture
.
texture_rgb
.
name
);
checkGLcall
(
"glBindTexture"
);
switch
(
FilterType
)
{
case
WINED3DTEXF_NONE
:
case
WINED3DTEXF_POINT
:
glTexParameteri
(
textureDimensions
,
GL_GENERATE_MIPMAP_HINT_SGIS
,
GL_FASTEST
);
checkGLcall
(
"glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_FASTEST)"
);
break
;
case
WINED3DTEXF_LINEAR
:
glTexParameteri
(
textureDimensions
,
GL_GENERATE_MIPMAP_HINT_SGIS
,
GL_NICEST
);
checkGLcall
(
"glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST)"
);
break
;
default:
WARN
(
"Unexpected filter type %d, setting to GL_NICEST
\n
"
,
FilterType
);
glTexParameteri
(
textureDimensions
,
GL_GENERATE_MIPMAP_HINT_SGIS
,
GL_NICEST
);
checkGLcall
(
"glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST)"
);
}
LEAVE_GL
();
context_release
(
context
);
}
This
->
baseTexture
.
filterType
=
FilterType
;
TRACE
(
"(%p) :
\n
"
,
This
);
return
WINED3D_OK
;
TRACE
(
"texture %p, filter_type %s.
\n
"
,
texture
,
debug_d3dtexturefiltertype
(
filter_type
));
if
(
!
(
texture
->
resource
.
usage
&
WINED3DUSAGE_AUTOGENMIPMAP
))
{
WARN
(
"Texture doesn't have AUTOGENMIPMAP usage.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
if
(
texture
->
baseTexture
.
filterType
!=
filter_type
)
{
GLenum
target
=
texture
->
baseTexture
.
target
;
struct
wined3d_context
*
context
;
context
=
context_acquire
(
texture
->
resource
.
device
,
NULL
);
ENTER_GL
();
glBindTexture
(
target
,
texture
->
baseTexture
.
texture_rgb
.
name
);
checkGLcall
(
"glBindTexture"
);
switch
(
filter_type
)
{
case
WINED3DTEXF_NONE
:
case
WINED3DTEXF_POINT
:
glTexParameteri
(
target
,
GL_GENERATE_MIPMAP_HINT_SGIS
,
GL_FASTEST
);
checkGLcall
(
"glTexParameteri(target, GL_GENERATE_MIPMAP_HINT_SGIS, GL_FASTEST)"
);
break
;
case
WINED3DTEXF_LINEAR
:
glTexParameteri
(
target
,
GL_GENERATE_MIPMAP_HINT_SGIS
,
GL_NICEST
);
checkGLcall
(
"glTexParameteri(target, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST)"
);
break
;
default:
WARN
(
"Unexpected filter type %#x, setting to GL_NICEST.
\n
"
,
filter_type
);
glTexParameteri
(
target
,
GL_GENERATE_MIPMAP_HINT_SGIS
,
GL_NICEST
);
checkGLcall
(
"glTexParameteri(target, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST)"
);
break
;
}
LEAVE_GL
();
context_release
(
context
);
}
texture
->
baseTexture
.
filterType
=
filter_type
;
return
WINED3D_OK
;
}
WINED3DTEXTUREFILTERTYPE
basetexture_get_autogen_filter_type
(
IWineD3DBaseTexture
*
iface
)
...
...
dlls/wined3d/cubetexture.c
View file @
568f9ecb
...
...
@@ -259,8 +259,10 @@ static DWORD WINAPI IWineD3DCubeTextureImpl_GetLevelCount(IWineD3DCubeTexture *i
return
basetexture_get_level_count
((
IWineD3DBaseTextureImpl
*
)
iface
);
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_SetAutoGenFilterType
(
IWineD3DCubeTexture
*
iface
,
WINED3DTEXTUREFILTERTYPE
FilterType
)
{
return
basetexture_set_autogen_filter_type
((
IWineD3DBaseTexture
*
)
iface
,
FilterType
);
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_SetAutoGenFilterType
(
IWineD3DCubeTexture
*
iface
,
WINED3DTEXTUREFILTERTYPE
FilterType
)
{
return
basetexture_set_autogen_filter_type
((
IWineD3DBaseTextureImpl
*
)
iface
,
FilterType
);
}
static
WINED3DTEXTUREFILTERTYPE
WINAPI
IWineD3DCubeTextureImpl_GetAutoGenFilterType
(
IWineD3DCubeTexture
*
iface
)
{
...
...
dlls/wined3d/texture.c
View file @
568f9ecb
...
...
@@ -250,8 +250,10 @@ static DWORD WINAPI IWineD3DTextureImpl_GetLevelCount(IWineD3DTexture *iface)
return
basetexture_get_level_count
((
IWineD3DBaseTextureImpl
*
)
iface
);
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_SetAutoGenFilterType
(
IWineD3DTexture
*
iface
,
WINED3DTEXTUREFILTERTYPE
FilterType
)
{
return
basetexture_set_autogen_filter_type
((
IWineD3DBaseTexture
*
)
iface
,
FilterType
);
static
HRESULT
WINAPI
IWineD3DTextureImpl_SetAutoGenFilterType
(
IWineD3DTexture
*
iface
,
WINED3DTEXTUREFILTERTYPE
FilterType
)
{
return
basetexture_set_autogen_filter_type
((
IWineD3DBaseTextureImpl
*
)
iface
,
FilterType
);
}
static
WINED3DTEXTUREFILTERTYPE
WINAPI
IWineD3DTextureImpl_GetAutoGenFilterType
(
IWineD3DTexture
*
iface
)
{
...
...
dlls/wined3d/volumetexture.c
View file @
568f9ecb
...
...
@@ -214,8 +214,10 @@ static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLevelCount(IWineD3DVolumeTextur
return
basetexture_get_level_count
((
IWineD3DBaseTextureImpl
*
)
iface
);
}
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_SetAutoGenFilterType
(
IWineD3DVolumeTexture
*
iface
,
WINED3DTEXTUREFILTERTYPE
FilterType
)
{
return
basetexture_set_autogen_filter_type
((
IWineD3DBaseTexture
*
)
iface
,
FilterType
);
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_SetAutoGenFilterType
(
IWineD3DVolumeTexture
*
iface
,
WINED3DTEXTUREFILTERTYPE
FilterType
)
{
return
basetexture_set_autogen_filter_type
((
IWineD3DBaseTextureImpl
*
)
iface
,
FilterType
);
}
static
WINED3DTEXTUREFILTERTYPE
WINAPI
IWineD3DVolumeTextureImpl_GetAutoGenFilterType
(
IWineD3DVolumeTexture
*
iface
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
568f9ecb
...
...
@@ -1924,7 +1924,7 @@ HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT layer_count, UIN
WINED3DRESOURCETYPE
resource_type
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
const
struct
wined3d_format
*
format
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
HRESULT
basetexture_set_autogen_filter_type
(
IWineD3DBaseTexture
*
ifac
e
,
HRESULT
basetexture_set_autogen_filter_type
(
IWineD3DBaseTexture
Impl
*
textur
e
,
WINED3DTEXTUREFILTERTYPE
filter_type
)
DECLSPEC_HIDDEN
;
BOOL
basetexture_set_dirty
(
IWineD3DBaseTextureImpl
*
texture
,
BOOL
dirty
)
DECLSPEC_HIDDEN
;
DWORD
basetexture_set_lod
(
IWineD3DBaseTextureImpl
*
texture
,
DWORD
lod
)
DECLSPEC_HIDDEN
;
...
...
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