Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e7099004
Commit
e7099004
authored
Jan 12, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DTEXTUREFILTERTYPE typedef.
parent
a44b062a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
80 additions
and
79 deletions
+80
-79
device.c
dlls/d3d8/device.c
+3
-3
cubetexture.c
dlls/d3d9/cubetexture.c
+1
-1
texture.c
dlls/d3d9/texture.c
+1
-1
volumetexture.c
dlls/d3d9/volumetexture.c
+1
-1
device.c
dlls/ddraw/device.c
+0
-0
surface.c
dlls/ddraw/surface.c
+4
-4
device.c
dlls/wined3d/device.c
+6
-6
stateblock.c
dlls/wined3d/stateblock.c
+3
-3
surface.c
dlls/wined3d/surface.c
+0
-0
swapchain.c
dlls/wined3d/swapchain.c
+4
-4
texture.c
dlls/wined3d/texture.c
+19
-19
utils.c
dlls/wined3d/utils.c
+13
-11
wined3d_private.h
dlls/wined3d/wined3d_private.h
+11
-11
wined3d.h
include/wine/wined3d.h
+14
-15
No files found.
dlls/d3d8/device.c
View file @
e7099004
...
...
@@ -976,7 +976,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
{
RECT
rect
=
{
0
,
0
,
src_w
,
src_h
};
wined3d_surface_blt
(
Dest
->
wined3d_surface
,
&
rect
,
Source
->
wined3d_surface
,
&
rect
,
0
,
NULL
,
WINED3DTEXF_POINT
);
Source
->
wined3d_surface
,
&
rect
,
0
,
NULL
,
WINED3D
_
TEXF_POINT
);
}
else
{
...
...
@@ -992,7 +992,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
pDestPoints
[
i
].
x
+
w
,
pDestPoints
[
i
].
y
+
h
};
wined3d_surface_blt
(
Dest
->
wined3d_surface
,
&
dst_rect
,
Source
->
wined3d_surface
,
&
pSourceRects
[
i
],
0
,
NULL
,
WINED3DTEXF_POINT
);
Source
->
wined3d_surface
,
&
pSourceRects
[
i
],
0
,
NULL
,
WINED3D
_
TEXF_POINT
);
}
}
else
...
...
@@ -1004,7 +1004,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
RECT
dst_rect
=
{
0
,
0
,
w
,
h
};
wined3d_surface_blt
(
Dest
->
wined3d_surface
,
&
dst_rect
,
Source
->
wined3d_surface
,
&
pSourceRects
[
i
],
0
,
NULL
,
WINED3DTEXF_POINT
);
Source
->
wined3d_surface
,
&
pSourceRects
[
i
],
0
,
NULL
,
WINED3D
_
TEXF_POINT
);
}
}
}
...
...
dlls/d3d9/cubetexture.c
View file @
e7099004
...
...
@@ -260,7 +260,7 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_SetAutoGenFilterType(IDirect3DCu
TRACE
(
"iface %p, filter_type %#x.
\n
"
,
iface
,
FilterType
);
wined3d_mutex_lock
();
hr
=
wined3d_texture_set_autogen_filter_type
(
This
->
wined3d_texture
,
(
WINED3DTEXTUREFILTERTYPE
)
FilterType
);
hr
=
wined3d_texture_set_autogen_filter_type
(
This
->
wined3d_texture
,
(
enum
wined3d_texture_filter_type
)
FilterType
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/texture.c
View file @
e7099004
...
...
@@ -255,7 +255,7 @@ static HRESULT WINAPI IDirect3DTexture9Impl_SetAutoGenFilterType(IDirect3DTextur
TRACE
(
"iface %p, filter_type %#x.
\n
"
,
iface
,
FilterType
);
wined3d_mutex_lock
();
hr
=
wined3d_texture_set_autogen_filter_type
(
This
->
wined3d_texture
,
(
WINED3DTEXTUREFILTERTYPE
)
FilterType
);
hr
=
wined3d_texture_set_autogen_filter_type
(
This
->
wined3d_texture
,
(
enum
wined3d_texture_filter_type
)
FilterType
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/volumetexture.c
View file @
e7099004
...
...
@@ -254,7 +254,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetAutoGenFilterType(IDirect3D
TRACE
(
"iface %p, filter_type %#x.
\n
"
,
iface
,
FilterType
);
wined3d_mutex_lock
();
hr
=
wined3d_texture_set_autogen_filter_type
(
This
->
wined3d_texture
,
(
WINED3DTEXTUREFILTERTYPE
)
FilterType
);
hr
=
wined3d_texture_set_autogen_filter_type
(
This
->
wined3d_texture
,
(
enum
wined3d_texture_filter_type
)
FilterType
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/ddraw/device.c
View file @
e7099004
This diff is collapsed.
Click to expand it.
dlls/ddraw/surface.c
View file @
e7099004
...
...
@@ -73,7 +73,7 @@ static HRESULT ddraw_surface_update_frontbuffer(IDirectDrawSurfaceImpl *surface,
return
DD_OK
;
return
wined3d_surface_blt
(
surface
->
ddraw
->
wined3d_frontbuffer
,
rect
,
surface
->
wined3d_surface
,
rect
,
0
,
NULL
,
WINED3DTEXF_POINT
);
surface
->
wined3d_surface
,
rect
,
0
,
NULL
,
WINED3D
_
TEXF_POINT
);
}
if
(
FAILED
(
hr
=
wined3d_surface_getdc
(
surface
->
wined3d_surface
,
&
surface_dc
)))
...
...
@@ -1269,7 +1269,7 @@ static HRESULT WINAPI ddraw_surface1_Flip(IDirectDrawSurface *iface, IDirectDraw
static
HRESULT
ddraw_surface_blt_clipped
(
IDirectDrawSurfaceImpl
*
dst_surface
,
const
RECT
*
dst_rect_in
,
IDirectDrawSurfaceImpl
*
src_surface
,
const
RECT
*
src_rect_in
,
DWORD
flags
,
const
WINEDDBLTFX
*
fx
,
WINED3DTEXTUREFILTERTYPE
filter
)
const
WINEDDBLTFX
*
fx
,
enum
wined3d_texture_filter_type
filter
)
{
struct
wined3d_surface
*
wined3d_src_surface
=
src_surface
?
src_surface
->
wined3d_surface
:
NULL
;
RECT
src_rect
,
dst_rect
;
...
...
@@ -1441,7 +1441,7 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR
* surfaces. So far no blitting operations using surfaces in the bltfx
* struct are supported anyway. */
hr
=
ddraw_surface_blt_clipped
(
This
,
DestRect
,
Src
,
SrcRect
,
Flags
,
(
WINEDDBLTFX
*
)
DDBltFx
,
WINED3DTEXF_LINEAR
);
Flags
,
(
WINEDDBLTFX
*
)
DDBltFx
,
WINED3D
_
TEXF_LINEAR
);
wined3d_mutex_unlock
();
switch
(
hr
)
...
...
@@ -3880,7 +3880,7 @@ static HRESULT WINAPI ddraw_surface7_BltFast(IDirectDrawSurface7 *iface, DWORD d
hr
=
ddraw_surface_update_frontbuffer
(
src
,
rsrc
,
TRUE
);
if
(
SUCCEEDED
(
hr
))
hr
=
wined3d_surface_blt
(
This
->
wined3d_surface
,
&
dst_rect
,
src
->
wined3d_surface
,
rsrc
,
flags
,
NULL
,
WINED3DTEXF_POINT
);
src
->
wined3d_surface
,
rsrc
,
flags
,
NULL
,
WINED3D
_
TEXF_POINT
);
if
(
SUCCEEDED
(
hr
)
&&
(
This
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_FRONTBUFFER
))
hr
=
ddraw_surface_update_frontbuffer
(
This
,
&
dst_rect
,
FALSE
);
wined3d_mutex_unlock
();
...
...
dlls/wined3d/device.c
View file @
e7099004
...
...
@@ -4470,12 +4470,12 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
for
(
i
=
0
;
i
<
MAX_COMBINED_SAMPLERS
;
++
i
)
{
if
(
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIN_FILTER
]
==
WINED3DTEXF_NONE
)
if
(
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIN_FILTER
]
==
WINED3D
_
TEXF_NONE
)
{
WARN
(
"Sampler state %u has minfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER
\n
"
,
i
);
return
WINED3DERR_UNSUPPORTEDTEXTUREFILTER
;
}
if
(
state
->
sampler_states
[
i
][
WINED3D_SAMP_MAG_FILTER
]
==
WINED3DTEXF_NONE
)
if
(
state
->
sampler_states
[
i
][
WINED3D_SAMP_MAG_FILTER
]
==
WINED3D
_
TEXF_NONE
)
{
WARN
(
"Sampler state %u has magfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER
\n
"
,
i
);
return
WINED3DERR_UNSUPPORTEDTEXTUREFILTER
;
...
...
@@ -4484,18 +4484,18 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
texture
=
state
->
textures
[
i
];
if
(
!
texture
||
texture
->
resource
.
format
->
flags
&
WINED3DFMT_FLAG_FILTERING
)
continue
;
if
(
state
->
sampler_states
[
i
][
WINED3D_SAMP_MAG_FILTER
]
!=
WINED3DTEXF_POINT
)
if
(
state
->
sampler_states
[
i
][
WINED3D_SAMP_MAG_FILTER
]
!=
WINED3D
_
TEXF_POINT
)
{
WARN
(
"Non-filterable texture and mag filter enabled on samper %u, returning E_FAIL
\n
"
,
i
);
return
E_FAIL
;
}
if
(
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIN_FILTER
]
!=
WINED3DTEXF_POINT
)
if
(
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIN_FILTER
]
!=
WINED3D
_
TEXF_POINT
)
{
WARN
(
"Non-filterable texture and min filter enabled on samper %u, returning E_FAIL
\n
"
,
i
);
return
E_FAIL
;
}
if
(
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIP_FILTER
]
!=
WINED3DTEXF_NONE
&&
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIP_FILTER
]
!=
WINED3DTEXF_POINT
)
if
(
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIP_FILTER
]
!=
WINED3D
_
TEXF_NONE
&&
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIP_FILTER
]
!=
WINED3D
_
TEXF_POINT
)
{
WARN
(
"Non-filterable texture and mip filter enabled on samper %u, returning E_FAIL
\n
"
,
i
);
return
E_FAIL
;
...
...
dlls/wined3d/stateblock.c
View file @
e7099004
...
...
@@ -1282,9 +1282,9 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state
->
sampler_states
[
i
][
WINED3D_SAMP_ADDRESS_V
]
=
WINED3D_TADDRESS_WRAP
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_ADDRESS_W
]
=
WINED3D_TADDRESS_WRAP
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_BORDER_COLOR
]
=
0
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MAG_FILTER
]
=
WINED3DTEXF_POINT
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIN_FILTER
]
=
WINED3DTEXF_POINT
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIP_FILTER
]
=
WINED3DTEXF_NONE
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MAG_FILTER
]
=
WINED3D
_
TEXF_POINT
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIN_FILTER
]
=
WINED3D
_
TEXF_POINT
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIP_FILTER
]
=
WINED3D
_
TEXF_NONE
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIPMAP_LOD_BIAS
]
=
0
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MAX_MIP_LEVEL
]
=
0
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MAX_ANISOTROPY
]
=
1
;
...
...
dlls/wined3d/surface.c
View file @
e7099004
This diff is collapsed.
Click to expand it.
dlls/wined3d/swapchain.c
View file @
e7099004
...
...
@@ -170,7 +170,7 @@ HRESULT CDECL wined3d_swapchain_get_front_buffer_data(const struct wined3d_swapc
wine_dbgstr_rect
(
&
dst_rect
));
}
return
wined3d_surface_blt
(
dst_surface
,
&
dst_rect
,
src_surface
,
&
src_rect
,
0
,
NULL
,
WINED3DTEXF_POINT
);
return
wined3d_surface_blt
(
dst_surface
,
&
dst_rect
,
src_surface
,
&
src_rect
,
0
,
NULL
,
WINED3D
_
TEXF_POINT
);
}
HRESULT
CDECL
wined3d_swapchain_get_back_buffer
(
const
struct
wined3d_swapchain
*
swapchain
,
...
...
@@ -476,9 +476,9 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
* which is exactly what we want :-)
*/
if
(
swapchain
->
desc
.
windowed
)
MapWindowPoints
(
NULL
,
swapchain
->
win_handle
,
(
LPPOINT
)
&
destRect
,
2
);
MapWindowPoints
(
NULL
,
swapchain
->
win_handle
,
(
POINT
*
)
&
destRect
,
2
);
wined3d_surface_blt
(
swapchain
->
back_buffers
[
0
],
&
destRect
,
&
cursor
,
NULL
,
WINEDDBLT_KEYSRC
,
NULL
,
WINED3DTEXF_POINT
);
&
cursor
,
NULL
,
WINEDDBLT_KEYSRC
,
NULL
,
WINED3D
_
TEXF_POINT
);
}
if
(
swapchain
->
device
->
logo_surface
)
...
...
@@ -488,7 +488,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
/* Blit the logo into the upper left corner of the drawable. */
wined3d_surface_blt
(
swapchain
->
back_buffers
[
0
],
&
rect
,
src_surface
,
&
rect
,
WINEDDBLT_KEYSRC
,
NULL
,
WINED3DTEXF_POINT
);
WINEDDBLT_KEYSRC
,
NULL
,
WINED3D
_
TEXF_POINT
);
}
TRACE
(
"Presenting HDC %p.
\n
"
,
context
->
hdc
);
...
...
dlls/wined3d/texture.c
View file @
e7099004
...
...
@@ -53,7 +53,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
texture
->
layer_count
=
layer_count
;
texture
->
level_count
=
level_count
;
texture
->
filter_type
=
(
usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
?
WINED3D
TEXF_LINEAR
:
WINED3D
TEXF_NONE
;
texture
->
filter_type
=
(
usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
?
WINED3D
_TEXF_LINEAR
:
WINED3D_
TEXF_NONE
;
texture
->
lod
=
0
;
texture
->
texture_rgb
.
dirty
=
TRUE
;
texture
->
texture_srgb
.
dirty
=
TRUE
;
...
...
@@ -171,9 +171,9 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSV
]
=
WINED3D_TADDRESS_WRAP
;
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSW
]
=
WINED3D_TADDRESS_WRAP
;
gl_tex
->
states
[
WINED3DTEXSTA_BORDERCOLOR
]
=
0
;
gl_tex
->
states
[
WINED3DTEXSTA_MAGFILTER
]
=
WINED3DTEXF_LINEAR
;
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
=
WINED3DTEXF_POINT
;
/* GL_NEAREST_MIPMAP_LINEAR */
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
=
WINED3DTEXF_LINEAR
;
/* GL_NEAREST_MIPMAP_LINEAR */
gl_tex
->
states
[
WINED3DTEXSTA_MAGFILTER
]
=
WINED3D
_
TEXF_LINEAR
;
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
=
WINED3D
_
TEXF_POINT
;
/* GL_NEAREST_MIPMAP_LINEAR */
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
=
WINED3D
_
TEXF_LINEAR
;
/* GL_NEAREST_MIPMAP_LINEAR */
gl_tex
->
states
[
WINED3DTEXSTA_MAXMIPLEVEL
]
=
0
;
gl_tex
->
states
[
WINED3DTEXSTA_MAXANISOTROPY
]
=
1
;
if
(
context
->
gl_info
->
supported
[
EXT_TEXTURE_SRGB_DECODE
])
...
...
@@ -315,11 +315,11 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
GLint
gl_value
;
state
=
sampler_states
[
WINED3D_SAMP_MAG_FILTER
];
if
(
state
>
WINED3DTEXF_ANISOTROPIC
)
if
(
state
>
WINED3D
_
TEXF_ANISOTROPIC
)
FIXME
(
"Unrecognized or unsupported MAGFILTER* value %d.
\n
"
,
state
);
gl_value
=
wined3d_gl_mag_filter
(
texture
->
mag_lookup
,
min
(
max
(
state
,
WINED3D
TEXF_POINT
),
WINED3D
TEXF_LINEAR
));
min
(
max
(
state
,
WINED3D
_TEXF_POINT
),
WINED3D_
TEXF_LINEAR
));
TRACE
(
"ValueMAG=%#x setting MAGFILTER to %#x.
\n
"
,
state
,
gl_value
);
glTexParameteri
(
target
,
GL_TEXTURE_MAG_FILTER
,
gl_value
);
...
...
@@ -336,16 +336,16 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
=
sampler_states
[
WINED3D_SAMP_MIN_FILTER
];
gl_tex
->
states
[
WINED3DTEXSTA_MAXMIPLEVEL
]
=
sampler_states
[
WINED3D_SAMP_MAX_MIP_LEVEL
];
if
(
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
>
WINED3DTEXF_ANISOTROPIC
||
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
>
WINED3DTEXF_ANISOTROPIC
)
if
(
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
>
WINED3D
_
TEXF_ANISOTROPIC
||
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
>
WINED3D
_
TEXF_ANISOTROPIC
)
{
FIXME
(
"Unrecognized or unsupported MIN_FILTER value %#x MIP_FILTER value %#x.
\n
"
,
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
],
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]);
}
gl_value
=
wined3d_gl_min_mip_filter
(
texture
->
min_mip_lookup
,
min
(
max
(
sampler_states
[
WINED3D_SAMP_MIN_FILTER
],
WINED3D
TEXF_POINT
),
WINED3D
TEXF_LINEAR
),
min
(
max
(
sampler_states
[
WINED3D_SAMP_MIP_FILTER
],
WINED3D
TEXF_NONE
),
WINED3D
TEXF_LINEAR
));
min
(
max
(
sampler_states
[
WINED3D_SAMP_MIN_FILTER
],
WINED3D
_TEXF_POINT
),
WINED3D_
TEXF_LINEAR
),
min
(
max
(
sampler_states
[
WINED3D_SAMP_MIP_FILTER
],
WINED3D
_TEXF_NONE
),
WINED3D_
TEXF_LINEAR
));
TRACE
(
"ValueMIN=%#x, ValueMIP=%#x, setting MINFILTER to %#x.
\n
"
,
sampler_states
[
WINED3D_SAMP_MIN_FILTER
],
...
...
@@ -355,7 +355,7 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
if
(
!
cond_np2
)
{
if
(
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
==
WINED3DTEXF_NONE
)
if
(
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
==
WINED3D
_
TEXF_NONE
)
gl_value
=
texture
->
lod
;
else
if
(
gl_tex
->
states
[
WINED3DTEXSTA_MAXMIPLEVEL
]
>=
texture
->
level_count
)
gl_value
=
texture
->
level_count
-
1
;
...
...
@@ -373,9 +373,9 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
}
}
if
((
gl_tex
->
states
[
WINED3DTEXSTA_MAGFILTER
]
!=
WINED3DTEXF_ANISOTROPIC
&&
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
!=
WINED3D
TEXF_ANISOTROPIC
&&
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
!=
WINED3D
TEXF_ANISOTROPIC
)
if
((
gl_tex
->
states
[
WINED3DTEXSTA_MAGFILTER
]
!=
WINED3D
_
TEXF_ANISOTROPIC
&&
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
!=
WINED3D_
TEXF_ANISOTROPIC
&&
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
!=
WINED3D_
TEXF_ANISOTROPIC
)
||
cond_np2
)
aniso
=
1
;
else
...
...
@@ -524,7 +524,7 @@ DWORD CDECL wined3d_texture_get_level_count(const struct wined3d_texture *textur
}
HRESULT
CDECL
wined3d_texture_set_autogen_filter_type
(
struct
wined3d_texture
*
texture
,
WINED3DTEXTUREFILTERTYPE
filter_type
)
enum
wined3d_texture_filter_type
filter_type
)
{
FIXME
(
"texture %p, filter_type %s stub!
\n
"
,
texture
,
debug_d3dtexturefiltertype
(
filter_type
));
...
...
@@ -539,7 +539,7 @@ HRESULT CDECL wined3d_texture_set_autogen_filter_type(struct wined3d_texture *te
return
WINED3D_OK
;
}
WINED3DTEXTUREFILTERTYPE
CDECL
wined3d_texture_get_autogen_filter_type
(
const
struct
wined3d_texture
*
texture
)
enum
wined3d_texture_filter_type
CDECL
wined3d_texture_get_autogen_filter_type
(
const
struct
wined3d_texture
*
texture
)
{
TRACE
(
"texture %p.
\n
"
,
texture
);
...
...
@@ -637,9 +637,9 @@ static HRESULT texture2d_bind(struct wined3d_texture *texture,
LEAVE_GL
();
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSU
]
=
WINED3D_TADDRESS_CLAMP
;
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSV
]
=
WINED3D_TADDRESS_CLAMP
;
gl_tex
->
states
[
WINED3DTEXSTA_MAGFILTER
]
=
WINED3D
TEXF_POINT
;
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
=
WINED3D
TEXF_POINT
;
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
=
WINED3D
TEXF_NONE
;
gl_tex
->
states
[
WINED3DTEXSTA_MAGFILTER
]
=
WINED3D_
TEXF_POINT
;
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
=
WINED3D_
TEXF_POINT
;
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
=
WINED3D_
TEXF_NONE
;
}
}
...
...
dlls/wined3d/utils.c
View file @
e7099004
...
...
@@ -2179,20 +2179,22 @@ const char *debug_d3dsamplerstate(enum wined3d_sampler_state state)
}
}
const
char
*
debug_d3dtexturefiltertype
(
WINED3DTEXTUREFILTERTYPE
filter_type
)
{
switch
(
filter_type
)
{
const
char
*
debug_d3dtexturefiltertype
(
enum
wined3d_texture_filter_type
filter_type
)
{
switch
(
filter_type
)
{
#define D3DTEXTUREFILTERTYPE_TO_STR(u) case u: return #u
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3DTEXF_NONE
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3DTEXF_POINT
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3DTEXF_LINEAR
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3DTEXF_ANISOTROPIC
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
TEXF_FLAT
CUBIC
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
TEXF_GAUSSIAN
CUBIC
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
TEXF_PYRAMIDAL
QUAD
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
TEXF_GAUSSIAN
QUAD
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
_
TEXF_NONE
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
_
TEXF_POINT
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
_
TEXF_LINEAR
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
_
TEXF_ANISOTROPIC
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
_TEXF_FLAT_
CUBIC
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
_TEXF_GAUSSIAN_
CUBIC
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
_TEXF_PYRAMIDAL_
QUAD
);
D3DTEXTUREFILTERTYPE_TO_STR
(
WINED3D
_TEXF_GAUSSIAN_
QUAD
);
#undef D3DTEXTUREFILTERTYPE_TO_STR
default:
FIXME
(
"Unrecognied texture filter type 0x%08x
\n
"
,
filter_type
);
FIXME
(
"Unrecognied texture filter type 0x%08x
.
\n
"
,
filter_type
);
return
"unrecognized"
;
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
e7099004
...
...
@@ -157,22 +157,22 @@ void wined3d_rb_free(void *ptr) DECLSPEC_HIDDEN;
struct
min_lookup
{
GLenum
mip
[
WINED3DTEXF_LINEAR
+
1
];
GLenum
mip
[
WINED3D
_
TEXF_LINEAR
+
1
];
};
extern
const
struct
min_lookup
minMipLookup
[
WINED3DTEXF_LINEAR
+
1
]
DECLSPEC_HIDDEN
;
extern
const
struct
min_lookup
minMipLookup_noFilter
[
WINED3DTEXF_LINEAR
+
1
]
DECLSPEC_HIDDEN
;
extern
const
struct
min_lookup
minMipLookup_noMip
[
WINED3DTEXF_LINEAR
+
1
]
DECLSPEC_HIDDEN
;
extern
const
GLenum
magLookup
[
WINED3DTEXF_LINEAR
+
1
]
DECLSPEC_HIDDEN
;
extern
const
GLenum
magLookup_noFilter
[
WINED3DTEXF_LINEAR
+
1
]
DECLSPEC_HIDDEN
;
extern
const
struct
min_lookup
minMipLookup
[
WINED3D
_
TEXF_LINEAR
+
1
]
DECLSPEC_HIDDEN
;
extern
const
struct
min_lookup
minMipLookup_noFilter
[
WINED3D
_
TEXF_LINEAR
+
1
]
DECLSPEC_HIDDEN
;
extern
const
struct
min_lookup
minMipLookup_noMip
[
WINED3D
_
TEXF_LINEAR
+
1
]
DECLSPEC_HIDDEN
;
extern
const
GLenum
magLookup
[
WINED3D
_
TEXF_LINEAR
+
1
]
DECLSPEC_HIDDEN
;
extern
const
GLenum
magLookup_noFilter
[
WINED3D
_
TEXF_LINEAR
+
1
]
DECLSPEC_HIDDEN
;
static
inline
GLenum
wined3d_gl_mag_filter
(
const
GLenum
mag_lookup
[],
WINED3DTEXTUREFILTERTYPE
mag_filter
)
static
inline
GLenum
wined3d_gl_mag_filter
(
const
GLenum
mag_lookup
[],
enum
wined3d_texture_filter_type
mag_filter
)
{
return
mag_lookup
[
mag_filter
];
}
static
inline
GLenum
wined3d_gl_min_mip_filter
(
const
struct
min_lookup
min_mip_lookup
[],
WINED3DTEXTUREFILTERTYPE
min_filter
,
WINED3DTEXTUREFILTERTYPE
mip_filter
)
enum
wined3d_texture_filter_type
min_filter
,
enum
wined3d_texture_filter_type
mip_filter
)
{
return
min_mip_lookup
[
min_filter
].
mip
[
mip_filter
];
}
...
...
@@ -1925,7 +1925,7 @@ struct wined3d_texture
UINT
level_count
;
float
pow2_matrix
[
16
];
UINT
lod
;
WINED3DTEXTUREFILTERTYPE
filter_type
;
enum
wined3d_texture_filter_type
filter_type
;
LONG
bind_count
;
DWORD
sampler
;
DWORD
flags
;
...
...
@@ -2126,7 +2126,7 @@ void get_drawable_size_backbuffer(const struct wined3d_context *context, UINT *w
void
get_drawable_size_fbo
(
const
struct
wined3d_context
*
context
,
UINT
*
width
,
UINT
*
height
)
DECLSPEC_HIDDEN
;
void
draw_textured_quad
(
const
struct
wined3d_surface
*
src_surface
,
struct
wined3d_context
*
context
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
WINED3DTEXTUREFILTERTYPE
F
ilter
)
DECLSPEC_HIDDEN
;
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
enum
wined3d_texture_filter_type
f
ilter
)
DECLSPEC_HIDDEN
;
void
flip_surface
(
struct
wined3d_surface
*
front
,
struct
wined3d_surface
*
back
)
DECLSPEC_HIDDEN
;
/* Surface flags: */
...
...
@@ -2497,7 +2497,7 @@ const char *debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type) D
const
char
*
debug_d3drenderstate
(
enum
wined3d_render_state
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dsamplerstate
(
enum
wined3d_sampler_state
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dstate
(
DWORD
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dtexturefiltertype
(
WINED3DTEXTUREFILTERTYPE
filter_type
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dtexturefiltertype
(
enum
wined3d_texture_filter_type
filter_type
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dtexturestate
(
enum
wined3d_texture_stage_state
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dtstype
(
enum
wined3d_transform_state
tstype
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dpool
(
WINED3DPOOL
pool
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.h
View file @
e7099004
...
...
@@ -658,18 +658,17 @@ enum wined3d_cubemap_face
WINED3D_CUBEMAP_FACE_NEGATIVE_Z
=
5
,
};
typedef
enum
_WINED3DTEXTUREFILTERTYPE
{
WINED3DTEXF_NONE
=
0
,
WINED3DTEXF_POINT
=
1
,
WINED3DTEXF_LINEAR
=
2
,
WINED3DTEXF_ANISOTROPIC
=
3
,
WINED3DTEXF_FLATCUBIC
=
4
,
WINED3DTEXF_GAUSSIANCUBIC
=
5
,
WINED3DTEXF_PYRAMIDALQUAD
=
6
,
WINED3DTEXF_GAUSSIANQUAD
=
7
,
WINED3DTEXF_FORCE_DWORD
=
0x7fffffff
}
WINED3DTEXTUREFILTERTYPE
;
enum
wined3d_texture_filter_type
{
WINED3D_TEXF_NONE
=
0
,
WINED3D_TEXF_POINT
=
1
,
WINED3D_TEXF_LINEAR
=
2
,
WINED3D_TEXF_ANISOTROPIC
=
3
,
WINED3D_TEXF_FLAT_CUBIC
=
4
,
WINED3D_TEXF_GAUSSIAN_CUBIC
=
5
,
WINED3D_TEXF_PYRAMIDAL_QUAD
=
6
,
WINED3D_TEXF_GAUSSIAN_QUAD
=
7
,
};
typedef
enum
_WINED3DRESOURCETYPE
{
...
...
@@ -2300,7 +2299,7 @@ ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock);
HRESULT
__cdecl
wined3d_surface_blt
(
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
DWORD
flags
,
const
WINEDDBLTFX
*
blt_fx
,
WINED3DTEXTUREFILTERTYPE
filter
);
const
WINEDDBLTFX
*
blt_fx
,
enum
wined3d_texture_filter_type
filter
);
HRESULT
__cdecl
wined3d_surface_create
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
UINT
level
,
DWORD
usage
,
WINED3DPOOL
pool
,
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
WINED3DSURFTYPE
surface_type
,
...
...
@@ -2379,7 +2378,7 @@ HRESULT __cdecl wined3d_texture_create_cube(struct wined3d_device *device, UINT
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
);
ULONG
__cdecl
wined3d_texture_decref
(
struct
wined3d_texture
*
texture
);
void
__cdecl
wined3d_texture_generate_mipmaps
(
struct
wined3d_texture
*
texture
);
WINED3DTEXTUREFILTERTYPE
__cdecl
wined3d_texture_get_autogen_filter_type
(
const
struct
wined3d_texture
*
texture
);
enum
wined3d_texture_filter_type
__cdecl
wined3d_texture_get_autogen_filter_type
(
const
struct
wined3d_texture
*
texture
);
DWORD
__cdecl
wined3d_texture_get_level_count
(
const
struct
wined3d_texture
*
texture
);
DWORD
__cdecl
wined3d_texture_get_lod
(
const
struct
wined3d_texture
*
texture
);
void
*
__cdecl
wined3d_texture_get_parent
(
const
struct
wined3d_texture
*
texture
);
...
...
@@ -2390,7 +2389,7 @@ struct wined3d_resource * __cdecl wined3d_texture_get_sub_resource(struct wined3
ULONG
__cdecl
wined3d_texture_incref
(
struct
wined3d_texture
*
texture
);
void
__cdecl
wined3d_texture_preload
(
struct
wined3d_texture
*
texture
);
HRESULT
__cdecl
wined3d_texture_set_autogen_filter_type
(
struct
wined3d_texture
*
texture
,
WINED3DTEXTUREFILTERTYPE
filter_type
);
enum
wined3d_texture_filter_type
filter_type
);
DWORD
__cdecl
wined3d_texture_set_lod
(
struct
wined3d_texture
*
texture
,
DWORD
lod
);
DWORD
__cdecl
wined3d_texture_set_priority
(
struct
wined3d_texture
*
texture
,
DWORD
priority
);
...
...
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