Commit e7099004 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of the WINED3DTEXTUREFILTERTYPE typedef.

parent a44b062a
......@@ -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);
}
}
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -2354,16 +2354,16 @@ static HRESULT IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
{
case D3DRENDERSTATE_TEXTUREMAG:
{
WINED3DTEXTUREFILTERTYPE tex_mag;
enum wined3d_texture_filter_type tex_mag;
hr = wined3d_device_get_sampler_state(This->wined3d_device, 0, WINED3D_SAMP_MAG_FILTER, &tex_mag);
switch (tex_mag)
{
case WINED3DTEXF_POINT:
case WINED3D_TEXF_POINT:
*Value = D3DFILTER_NEAREST;
break;
case WINED3DTEXF_LINEAR:
case WINED3D_TEXF_LINEAR:
*Value = D3DFILTER_LINEAR;
break;
default:
......@@ -2375,8 +2375,8 @@ static HRESULT IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
case D3DRENDERSTATE_TEXTUREMIN:
{
WINED3DTEXTUREFILTERTYPE tex_min;
WINED3DTEXTUREFILTERTYPE tex_mip;
enum wined3d_texture_filter_type tex_min;
enum wined3d_texture_filter_type tex_mip;
hr = wined3d_device_get_sampler_state(This->wined3d_device,
0, WINED3D_SAMP_MIN_FILTER, &tex_min);
......@@ -2390,16 +2390,16 @@ static HRESULT IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
switch (tex_min)
{
case WINED3DTEXF_POINT:
case WINED3D_TEXF_POINT:
switch (tex_mip)
{
case WINED3DTEXF_NONE:
case WINED3D_TEXF_NONE:
*Value = D3DFILTER_NEAREST;
break;
case WINED3DTEXF_POINT:
case WINED3D_TEXF_POINT:
*Value = D3DFILTER_MIPNEAREST;
break;
case WINED3DTEXF_LINEAR:
case WINED3D_TEXF_LINEAR:
*Value = D3DFILTER_LINEARMIPNEAREST;
break;
default:
......@@ -2408,16 +2408,16 @@ static HRESULT IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
break;
}
break;
case WINED3DTEXF_LINEAR:
case WINED3D_TEXF_LINEAR:
switch (tex_mip)
{
case WINED3DTEXF_NONE:
case WINED3D_TEXF_NONE:
*Value = D3DFILTER_LINEAR;
break;
case WINED3DTEXF_POINT:
case WINED3D_TEXF_POINT:
*Value = D3DFILTER_MIPLINEAR;
break;
case WINED3DTEXF_LINEAR:
case WINED3D_TEXF_LINEAR:
*Value = D3DFILTER_LINEARMIPLINEAR;
break;
default:
......@@ -2664,22 +2664,22 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
*/
case D3DRENDERSTATE_TEXTUREMAG:
{
WINED3DTEXTUREFILTERTYPE tex_mag;
enum wined3d_texture_filter_type tex_mag;
switch (Value)
{
case D3DFILTER_NEAREST:
case D3DFILTER_MIPNEAREST:
case D3DFILTER_LINEARMIPNEAREST:
tex_mag = WINED3DTEXF_POINT;
tex_mag = WINED3D_TEXF_POINT;
break;
case D3DFILTER_LINEAR:
case D3DFILTER_MIPLINEAR:
case D3DFILTER_LINEARMIPLINEAR:
tex_mag = WINED3DTEXF_LINEAR;
tex_mag = WINED3D_TEXF_LINEAR;
break;
default:
tex_mag = WINED3DTEXF_POINT;
tex_mag = WINED3D_TEXF_POINT;
ERR("Unhandled texture mag %d !\n",Value);
break;
}
......@@ -2690,40 +2690,40 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
case D3DRENDERSTATE_TEXTUREMIN:
{
WINED3DTEXTUREFILTERTYPE tex_min;
WINED3DTEXTUREFILTERTYPE tex_mip;
enum wined3d_texture_filter_type tex_min;
enum wined3d_texture_filter_type tex_mip;
switch ((D3DTEXTUREFILTER) Value)
switch ((D3DTEXTUREFILTER)Value)
{
case D3DFILTER_NEAREST:
tex_min = WINED3DTEXF_POINT;
tex_mip = WINED3DTEXF_NONE;
tex_min = WINED3D_TEXF_POINT;
tex_mip = WINED3D_TEXF_NONE;
break;
case D3DFILTER_LINEAR:
tex_min = WINED3DTEXF_LINEAR;
tex_mip = WINED3DTEXF_NONE;
tex_min = WINED3D_TEXF_LINEAR;
tex_mip = WINED3D_TEXF_NONE;
break;
case D3DFILTER_MIPNEAREST:
tex_min = WINED3DTEXF_POINT;
tex_mip = WINED3DTEXF_POINT;
tex_min = WINED3D_TEXF_POINT;
tex_mip = WINED3D_TEXF_POINT;
break;
case D3DFILTER_MIPLINEAR:
tex_min = WINED3DTEXF_LINEAR;
tex_mip = WINED3DTEXF_POINT;
tex_min = WINED3D_TEXF_LINEAR;
tex_mip = WINED3D_TEXF_POINT;
break;
case D3DFILTER_LINEARMIPNEAREST:
tex_min = WINED3DTEXF_POINT;
tex_mip = WINED3DTEXF_LINEAR;
tex_min = WINED3D_TEXF_POINT;
tex_mip = WINED3D_TEXF_LINEAR;
break;
case D3DFILTER_LINEARMIPLINEAR:
tex_min = WINED3DTEXF_LINEAR;
tex_mip = WINED3DTEXF_LINEAR;
tex_min = WINED3D_TEXF_LINEAR;
tex_mip = WINED3D_TEXF_LINEAR;
break;
default:
ERR("Unhandled texture min %d !\n",Value);
tex_min = WINED3DTEXF_POINT;
tex_mip = WINED3DTEXF_NONE;
tex_min = WINED3D_TEXF_POINT;
tex_mip = WINED3D_TEXF_NONE;
break;
}
......@@ -4889,9 +4889,15 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface,
{
switch(*State)
{
case WINED3DTEXF_NONE: *State = D3DTFP_NONE; break;
case WINED3DTEXF_POINT: *State = D3DTFP_POINT; break;
case WINED3DTEXF_LINEAR: *State = D3DTFP_LINEAR; break;
case WINED3D_TEXF_NONE:
*State = D3DTFP_NONE;
break;
case WINED3D_TEXF_POINT:
*State = D3DTFP_POINT;
break;
case WINED3D_TEXF_LINEAR:
*State = D3DTFP_LINEAR;
break;
default:
ERR("Unexpected mipfilter value %#x\n", *State);
*State = D3DTFP_NONE;
......@@ -4905,11 +4911,21 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface,
{
switch(*State)
{
case WINED3DTEXF_POINT: *State = D3DTFG_POINT; break;
case WINED3DTEXF_LINEAR: *State = D3DTFG_LINEAR; break;
case WINED3DTEXF_ANISOTROPIC: *State = D3DTFG_ANISOTROPIC; break;
case WINED3DTEXF_FLATCUBIC: *State = D3DTFG_FLATCUBIC; break;
case WINED3DTEXF_GAUSSIANCUBIC: *State = D3DTFG_GAUSSIANCUBIC; break;
case WINED3D_TEXF_POINT:
*State = D3DTFG_POINT;
break;
case WINED3D_TEXF_LINEAR:
*State = D3DTFG_LINEAR;
break;
case WINED3D_TEXF_ANISOTROPIC:
*State = D3DTFG_ANISOTROPIC;
break;
case WINED3D_TEXF_FLAT_CUBIC:
*State = D3DTFG_FLATCUBIC;
break;
case WINED3D_TEXF_GAUSSIAN_CUBIC:
*State = D3DTFG_GAUSSIANCUBIC;
break;
default:
ERR("Unexpected wined3d mag filter value %#x\n", *State);
*State = D3DTFG_POINT;
......@@ -5019,13 +5035,19 @@ IDirect3DDeviceImpl_7_SetTextureStageState(IDirect3DDevice7 *iface,
{
switch(State)
{
case D3DTFP_NONE: State = WINED3DTEXF_NONE; break;
case D3DTFP_POINT: State = WINED3DTEXF_POINT; break;
case D3DTFP_NONE:
State = WINED3D_TEXF_NONE;
break;
case D3DTFP_POINT:
State = WINED3D_TEXF_POINT;
break;
case 0: /* Unchecked */
case D3DTFP_LINEAR: State = WINED3DTEXF_LINEAR; break;
case D3DTFP_LINEAR:
State = WINED3D_TEXF_LINEAR;
break;
default:
ERR("Unexpected mipfilter value %d\n", State);
State = WINED3DTEXF_NONE;
State = WINED3D_TEXF_NONE;
break;
}
break;
......@@ -5036,14 +5058,24 @@ IDirect3DDeviceImpl_7_SetTextureStageState(IDirect3DDevice7 *iface,
{
switch(State)
{
case D3DTFG_POINT: State = WINED3DTEXF_POINT; break;
case D3DTFG_LINEAR: State = WINED3DTEXF_LINEAR; break;
case D3DTFG_FLATCUBIC: State = WINED3DTEXF_FLATCUBIC; break;
case D3DTFG_GAUSSIANCUBIC: State = WINED3DTEXF_GAUSSIANCUBIC; break;
case D3DTFG_ANISOTROPIC: State = WINED3DTEXF_ANISOTROPIC; break;
case D3DTFG_POINT:
State = WINED3D_TEXF_POINT;
break;
case D3DTFG_LINEAR:
State = WINED3D_TEXF_LINEAR;
break;
case D3DTFG_FLATCUBIC:
State = WINED3D_TEXF_FLAT_CUBIC;
break;
case D3DTFG_GAUSSIANCUBIC:
State = WINED3D_TEXF_GAUSSIAN_CUBIC;
break;
case D3DTFG_ANISOTROPIC:
State = WINED3D_TEXF_ANISOTROPIC;
break;
default:
ERR("Unexpected d3d7 mag filter type %d\n", State);
State = WINED3DTEXF_POINT;
State = WINED3D_TEXF_POINT;
break;
}
break;
......@@ -6150,7 +6182,7 @@ static void copy_mipmap_chain(IDirect3DDeviceImpl *device,
RECT dst_rect = {point.x, point.y, point.x + src_w, point.y + src_h};
if (FAILED(hr = wined3d_surface_blt(dest_level->wined3d_surface, &dst_rect,
src_level->wined3d_surface, &src_rect, 0, NULL, WINED3DTEXF_POINT)))
src_level->wined3d_surface, &src_rect, 0, NULL, WINED3D_TEXF_POINT)))
ERR("Blit failed, hr %#x.\n", hr);
ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE;
......
......@@ -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();
......
......@@ -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;
......
......@@ -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;
......
......@@ -35,10 +35,10 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d);
static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter);
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter);
static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surface, const RECT *dst_rect,
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx,
WINED3DTEXTUREFILTERTYPE filter);
enum wined3d_texture_filter_type filter);
static void surface_cleanup(struct wined3d_surface *surface)
{
......@@ -315,7 +315,7 @@ static void surface_get_rect(const struct wined3d_surface *surface, const RECT *
/* GL locking and context activation is done by the caller */
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, WINED3DTEXTUREFILTERTYPE Filter)
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter)
{
struct blt_info info;
......@@ -328,10 +328,10 @@ void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3
/* Filtering for StretchRect */
glTexParameteri(info.bind_target, GL_TEXTURE_MAG_FILTER,
wined3d_gl_mag_filter(magLookup, Filter));
wined3d_gl_mag_filter(magLookup, filter));
checkGLcall("glTexParameteri");
glTexParameteri(info.bind_target, GL_TEXTURE_MIN_FILTER,
wined3d_gl_min_mip_filter(minMipLookup, Filter, WINED3DTEXF_NONE));
wined3d_gl_min_mip_filter(minMipLookup, filter, WINED3D_TEXF_NONE));
checkGLcall("glTexParameteri");
glTexParameteri(info.bind_target, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(info.bind_target, GL_TEXTURE_WRAP_T, GL_CLAMP);
......@@ -363,9 +363,9 @@ void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3
if (src_surface->container.type == WINED3D_CONTAINER_TEXTURE)
{
struct wined3d_texture *texture = src_surface->container.u.texture;
texture->texture_rgb.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT;
texture->texture_rgb.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT;
texture->texture_rgb.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE;
texture->texture_rgb.states[WINED3DTEXSTA_MAGFILTER] = WINED3D_TEXF_POINT;
texture->texture_rgb.states[WINED3DTEXSTA_MINFILTER] = WINED3D_TEXF_POINT;
texture->texture_rgb.states[WINED3DTEXSTA_MIPFILTER] = WINED3D_TEXF_NONE;
texture->texture_rgb.states[WINED3DTEXSTA_SRGBTEXTURE] = FALSE;
}
}
......@@ -839,7 +839,7 @@ static HRESULT surface_draw_overlay(struct wined3d_surface *surface)
surface->overlay_dest->flags |= SFLAG_INOVERLAYDRAW;
hr = wined3d_surface_blt(surface->overlay_dest, &surface->overlay_destrect, surface,
&surface->overlay_srcrect, WINEDDBLT_WAIT, NULL, WINED3DTEXF_LINEAR);
&surface->overlay_srcrect, WINEDDBLT_WAIT, NULL, WINED3D_TEXF_LINEAR);
surface->overlay_dest->flags &= ~SFLAG_INOVERLAYDRAW;
return hr;
......@@ -1108,7 +1108,7 @@ static void wined3d_surface_depth_blt_fbo(const struct wined3d_device *device, s
/* Blit between surface locations. Onscreen on different swapchains is not supported.
* Depth / stencil is not supported. */
static void surface_blt_fbo(const struct wined3d_device *device, const WINED3DTEXTUREFILTERTYPE filter,
static void surface_blt_fbo(const struct wined3d_device *device, enum wined3d_texture_filter_type filter,
struct wined3d_surface *src_surface, DWORD src_location, const RECT *src_rect_in,
struct wined3d_surface *dst_surface, DWORD dst_location, const RECT *dst_rect_in)
{
......@@ -1129,14 +1129,14 @@ static void surface_blt_fbo(const struct wined3d_device *device, const WINED3DTE
switch (filter)
{
case WINED3DTEXF_LINEAR:
case WINED3D_TEXF_LINEAR:
gl_filter = GL_LINEAR;
break;
default:
FIXME("Unsupported filter mode %s (%#x).\n", debug_d3dtexturefiltertype(filter), filter);
case WINED3DTEXF_NONE:
case WINED3DTEXF_POINT:
case WINED3D_TEXF_NONE:
case WINED3D_TEXF_POINT:
gl_filter = GL_NEAREST;
break;
}
......@@ -1405,7 +1405,7 @@ static HRESULT wined3d_surface_depth_blt(struct wined3d_surface *src_surface, co
/* Do not call while under the GL lock. */
HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect_in,
struct wined3d_surface *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_swapchain *src_swapchain, *dst_swapchain;
struct wined3d_device *device = dst_surface->resource.device;
......@@ -1756,7 +1756,7 @@ HRESULT CDECL wined3d_surface_get_render_target_data(struct wined3d_surface *sur
if (render_target->resource.multisample_type)
return WINED3DERR_INVALIDCALL;
return wined3d_surface_blt(surface, NULL, render_target, NULL, 0, NULL, WINED3DTEXF_POINT);
return wined3d_surface_blt(surface, NULL, render_target, NULL, 0, NULL, WINED3D_TEXF_POINT);
}
/* Context activation is done by the caller. */
......@@ -2482,7 +2482,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
if (convert != NO_CONVERSION || format.convert)
{
RECT dst_rect = {dst_point->x, dst_point->y, dst_point->x + update_w, dst_point->y + update_h};
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);
}
context = context_acquire(dst_surface->resource.device, NULL);
......@@ -4857,7 +4857,7 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
/* Does a direct frame buffer -> texture copy. Stretching is done with single
* pixel copy calls. */
static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struct wined3d_surface *src_surface,
const RECT *src_rect, const RECT *dst_rect_in, WINED3DTEXTUREFILTERTYPE Filter)
const RECT *src_rect, const RECT *dst_rect_in, enum wined3d_texture_filter_type filter)
{
struct wined3d_device *device = dst_surface->resource.device;
float xrel, yrel;
......@@ -4902,11 +4902,10 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
{
FIXME("Doing a pixel by pixel copy from the framebuffer to a texture, expect major performance issues\n");
if(Filter != WINED3DTEXF_NONE && Filter != WINED3DTEXF_POINT) {
ERR("Texture filtering not supported in direct blit\n");
}
if (filter != WINED3D_TEXF_NONE && filter != WINED3D_TEXF_POINT)
ERR("Texture filtering not supported in direct blit.\n");
}
else if ((Filter != WINED3DTEXF_NONE && Filter != WINED3DTEXF_POINT)
else if ((filter != WINED3D_TEXF_NONE && filter != WINED3D_TEXF_POINT)
&& ((yrel - 1.0f < -eps) || (yrel - 1.0f > eps)))
{
ERR("Texture filtering not supported in direct blit\n");
......@@ -4968,7 +4967,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
/* Uses the hardware to stretch and flip the image */
static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, struct wined3d_surface *src_surface,
const RECT *src_rect, const RECT *dst_rect_in, WINED3DTEXTUREFILTERTYPE Filter)
const RECT *src_rect, const RECT *dst_rect_in, enum wined3d_texture_filter_type filter)
{
struct wined3d_device *device = dst_surface->resource.device;
struct wined3d_swapchain *src_swapchain = NULL;
......@@ -5063,10 +5062,10 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
/* No issue with overriding these - the sampler is dirty due to blit usage */
glTexParameteri(texture_target, GL_TEXTURE_MAG_FILTER,
wined3d_gl_mag_filter(magLookup, Filter));
wined3d_gl_mag_filter(magLookup, filter));
checkGLcall("glTexParameteri");
glTexParameteri(texture_target, GL_TEXTURE_MIN_FILTER,
wined3d_gl_min_mip_filter(minMipLookup, Filter, WINED3DTEXF_NONE));
wined3d_gl_min_mip_filter(minMipLookup, filter, WINED3D_TEXF_NONE));
checkGLcall("glTexParameteri");
if (src_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN)
......@@ -5272,7 +5271,7 @@ void surface_translate_drawable_coords(const struct wined3d_surface *surface, HW
}
static void surface_blt_to_drawable(const struct wined3d_device *device,
WINED3DTEXTUREFILTERTYPE filter, BOOL color_key,
enum wined3d_texture_filter_type filter, BOOL color_key,
struct wined3d_surface *src_surface, const RECT *src_rect_in,
struct wined3d_surface *dst_surface, const RECT *dst_rect_in)
{
......@@ -5360,7 +5359,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
/* Do not call while under the GL lock. */
static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surface, const RECT *dst_rect,
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const WINEDDBLTFX *DDBltFx,
WINED3DTEXTUREFILTERTYPE Filter)
enum wined3d_texture_filter_type filter)
{
struct wined3d_device *device = dst_surface->resource.device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
......@@ -5368,7 +5367,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n",
dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
flags, DDBltFx, debug_d3dtexturefiltertype(Filter));
flags, DDBltFx, debug_d3dtexturefiltertype(filter));
/* Get the swapchain. One of the surfaces has to be a primary surface */
if (dst_surface->resource.pool == WINED3DPOOL_SYSTEMMEM)
......@@ -5471,11 +5470,13 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa
if (!stretchx || dst_rect->right - dst_rect->left > src_surface->resource.width
|| dst_rect->bottom - dst_rect->top > src_surface->resource.height)
{
TRACE("No stretching in x direction, using direct framebuffer -> texture copy\n");
fb_copy_to_texture_direct(dst_surface, src_surface, src_rect, dst_rect, Filter);
} else {
TRACE("Using hardware stretching to flip / stretch the texture\n");
fb_copy_to_texture_hwstretch(dst_surface, src_surface, src_rect, dst_rect, Filter);
TRACE("No stretching in x direction, using direct framebuffer -> texture copy.\n");
fb_copy_to_texture_direct(dst_surface, src_surface, src_rect, dst_rect, filter);
}
else
{
TRACE("Using hardware stretching to flip / stretch the texture.\n");
fb_copy_to_texture_hwstretch(dst_surface, src_surface, src_rect, dst_rect, filter);
}
if (!(dst_surface->flags & SFLAG_DONOTFREE))
......@@ -5530,7 +5531,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa
src_surface->CKeyFlags &= ~WINEDDSD_CKSRCBLT;
}
surface_blt_to_drawable(device, Filter, flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE),
surface_blt_to_drawable(device, filter, flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE),
src_surface, src_rect, dst_surface, dst_rect);
/* Restore the color key parameters */
......@@ -5931,7 +5932,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
RECT r;
surface_get_rect(surface, rect, &r);
surface_blt_to_drawable(device, WINED3DTEXF_POINT, FALSE, surface, &r, surface, &r);
surface_blt_to_drawable(device, WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
return WINED3D_OK;
}
......@@ -6032,10 +6033,10 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format))
{
if (srgb)
surface_blt_fbo(device, WINED3DTEXF_POINT, surface, SFLAG_INTEXTURE,
surface_blt_fbo(device, WINED3D_TEXF_POINT, surface, SFLAG_INTEXTURE,
&src_rect, surface, SFLAG_INSRGBTEX, &src_rect);
else
surface_blt_fbo(device, WINED3DTEXF_POINT, surface, SFLAG_INSRGBTEX,
surface_blt_fbo(device, WINED3D_TEXF_POINT, surface, SFLAG_INSRGBTEX,
&src_rect, surface, SFLAG_INTEXTURE, &src_rect);
return WINED3D_OK;
......@@ -6051,7 +6052,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
DWORD dst_location = srgb ? SFLAG_INSRGBTEX : SFLAG_INTEXTURE;
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
surface_blt_fbo(device, WINED3DTEXF_POINT, surface, src_location,
surface_blt_fbo(device, WINED3D_TEXF_POINT, surface, src_location,
&rect, surface, dst_location, &rect);
return WINED3D_OK;
......@@ -6177,7 +6178,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface)
if (!(surface->flags & SFLAG_INRB_MULTISAMPLE))
ERR("Trying to resolve multisampled surface %p, but location SFLAG_INRB_MULTISAMPLE not current.\n", surface);
surface_blt_fbo(surface->resource.device, WINED3DTEXF_POINT,
surface_blt_fbo(surface->resource.device, WINED3D_TEXF_POINT,
surface, SFLAG_INRB_MULTISAMPLE, &rect, surface, SFLAG_INRB_RESOLVED, &rect);
}
......@@ -6588,7 +6589,7 @@ static HRESULT surface_cpu_blt_compressed(const BYTE *src_data, BYTE *dst_data,
static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter)
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
{
int bpp, srcheight, srcwidth, dstheight, dstwidth, width;
const struct wined3d_format *src_format, *dst_format;
......@@ -6800,7 +6801,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
if (!dstwidth || !dstheight) /* Hmm... stupid program? */
goto release;
if (filter != WINED3DTEXF_NONE && filter != WINED3DTEXF_POINT
if (filter != WINED3D_TEXF_NONE && filter != WINED3D_TEXF_POINT
&& (srcwidth != dstwidth || srcheight != dstheight))
{
/* Can happen when d3d9 apps do a StretchRect() call which isn't handled in GL. */
......@@ -7157,7 +7158,7 @@ static HRESULT cpu_blit_color_fill(struct wined3d_device *device, struct wined3d
BltFx.dwSize = sizeof(BltFx);
BltFx.u5.dwFillColor = wined3d_format_convert_from_float(dst_surface, color);
return surface_cpu_blt(dst_surface, dst_rect, NULL, &src_rect,
WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_POINT);
WINEDDBLT_COLORFILL, &BltFx, WINED3D_TEXF_POINT);
}
/* Do not call while under the GL lock. */
......
......@@ -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);
......
......@@ -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) ? WINED3DTEXF_LINEAR : WINED3DTEXF_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, WINED3DTEXF_POINT), WINED3DTEXF_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], WINED3DTEXF_POINT), WINED3DTEXF_LINEAR),
min(max(sampler_states[WINED3D_SAMP_MIP_FILTER], WINED3DTEXF_NONE), WINED3DTEXF_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] != WINED3DTEXF_ANISOTROPIC
&& gl_tex->states[WINED3DTEXSTA_MIPFILTER] != WINED3DTEXF_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] = WINED3DTEXF_POINT;
gl_tex->states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT;
gl_tex->states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_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;
}
}
......
......@@ -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(WINED3DTEXF_FLATCUBIC);
D3DTEXTUREFILTERTYPE_TO_STR(WINED3DTEXF_GAUSSIANCUBIC);
D3DTEXTUREFILTERTYPE_TO_STR(WINED3DTEXF_PYRAMIDALQUAD);
D3DTEXTUREFILTERTYPE_TO_STR(WINED3DTEXF_GAUSSIANQUAD);
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";
}
}
......
......@@ -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 Filter) DECLSPEC_HIDDEN;
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) 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;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment