[PATCH 5/5] wined3d: Rename the wined3d_format "Flags" field to "flags".
Henri Verbeet
hverbeet at codeweavers.com
Fri Nov 12 06:12:05 CST 2010
---
dlls/wined3d/basetexture.c | 8 ++++----
dlls/wined3d/context.c | 12 ++++++------
dlls/wined3d/device.c | 6 +++---
dlls/wined3d/directx.c | 32 ++++++++++++++++----------------
dlls/wined3d/shader.c | 6 +++---
dlls/wined3d/state.c | 2 +-
dlls/wined3d/surface.c | 16 ++++++++--------
dlls/wined3d/surface_base.c | 12 ++++++------
dlls/wined3d/texture.c | 2 +-
dlls/wined3d/utils.c | 36 ++++++++++++++++++------------------
dlls/wined3d/wined3d_private.h | 2 +-
11 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c
index 7461adf..5b1a85b 100644
--- a/dlls/wined3d/basetexture.c
+++ b/dlls/wined3d/basetexture.c
@@ -5,7 +5,7 @@
* Copyright 2002-2004 Raphael Junqueira
* Copyright 2005 Oliver Stieber
* Copyright 2007-2008 Stefan Dösinger for CodeWeavers
- * Copyright 2009 Henri Verbeet for CodeWeavers
+ * Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -60,7 +60,7 @@ HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT layer_count, UIN
texture->baseTexture.is_srgb = FALSE;
texture->baseTexture.pow2Matrix_identity = TRUE;
- if (texture->resource.format->Flags & WINED3DFMT_FLAG_FILTERING)
+ if (texture->resource.format->flags & WINED3DFMT_FLAG_FILTERING)
{
texture->baseTexture.minMipLookup = minMipLookup;
texture->baseTexture.magLookup = magLookup;
@@ -517,10 +517,10 @@ void basetexture_apply_state_changes(IWineD3DBaseTexture *iface,
gl_tex->states[WINED3DTEXSTA_MAXANISOTROPY] = aniso;
}
- if (!(This->resource.format->Flags & WINED3DFMT_FLAG_SHADOW)
+ if (!(This->resource.format->flags & WINED3DFMT_FLAG_SHADOW)
!= !gl_tex->states[WINED3DTEXSTA_SHADOW])
{
- if (This->resource.format->Flags & WINED3DFMT_FLAG_SHADOW)
+ if (This->resource.format->flags & WINED3DFMT_FLAG_SHADOW)
{
glTexParameteri(textureDimensions, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE);
glTexParameteri(textureDimensions, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 32df69b..beb57d2 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2,7 +2,7 @@
* Context and render target management in wined3d
*
* Copyright 2007-2008 Stefan Dösinger for CodeWeavers
- * Copyright 2009 Henri Verbeet for CodeWeavers
+ * Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -201,7 +201,7 @@ void context_attach_depth_stencil_fbo(struct wined3d_context *context,
if (depth_stencil)
{
- DWORD format_flags = depth_stencil->resource.format->Flags;
+ DWORD format_flags = depth_stencil->resource.format->flags;
if (use_render_buffer && depth_stencil->current_renderbuffer)
{
@@ -2023,8 +2023,8 @@ static BOOL match_depth_stencil_format(const struct wined3d_format *existing,
{
short existing_depth, existing_stencil, required_depth, required_stencil;
- if(existing == required) return TRUE;
- if((existing->Flags & WINED3DFMT_FLAG_FLOAT) != (required->Flags & WINED3DFMT_FLAG_FLOAT)) return FALSE;
+ if (existing == required) return TRUE;
+ if ((existing->flags & WINED3DFMT_FLAG_FLOAT) != (required->flags & WINED3DFMT_FLAG_FLOAT)) return FALSE;
getDepthStencilBits(existing, &existing_depth, &existing_stencil);
getDepthStencilBits(required, &required_depth, &required_stencil);
@@ -2231,12 +2231,12 @@ static void context_setup_target(IWineD3DDeviceImpl *device,
{
/* Disable blending when the alpha mask has changed and when a format doesn't support blending. */
if ((old->alpha_mask && !new->alpha_mask) || (!old->alpha_mask && new->alpha_mask)
- || !(new->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING))
+ || !(new->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING))
{
Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), StateTable);
}
/* Update sRGB writing when switching between formats that do/do not support sRGB writing */
- if ((old->Flags & WINED3DFMT_FLAG_SRGB_WRITE) != (new->Flags & WINED3DFMT_FLAG_SRGB_WRITE))
+ if ((old->flags & WINED3DFMT_FLAG_SRGB_WRITE) != (new->flags & WINED3DFMT_FLAG_SRGB_WRITE))
{
Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_SRGBWRITEENABLE), StateTable);
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 8d375a5..0aadc7b 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -9,7 +9,7 @@
* Copyright 2006-2008 Stefan Dösinger for CodeWeavers
* Copyright 2006-2008 Henri Verbeet
* Copyright 2007 Andrew Riedi
- * Copyright 2009 Henri Verbeet for CodeWeavers
+ * Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -5178,7 +5178,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ValidateDevice(IWineD3DDevice *iface,
}
texture = This->stateBlock->state.textures[i];
- if (!texture || texture->resource.format->Flags & WINED3DFMT_FLAG_FILTERING) continue;
+ if (!texture || texture->resource.format->flags & WINED3DFMT_FLAG_FILTERING) continue;
if (This->stateBlock->state.sampler_states[i][WINED3DSAMP_MAGFILTER] != WINED3DTEXF_POINT)
{
@@ -5466,7 +5466,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
ENTER_GL();
- if (dst_format->Flags & WINED3DFMT_FLAG_COMPRESSED)
+ if (dst_format->flags & WINED3DFMT_FLAG_COMPRESSED)
{
UINT row_length = wined3d_format_calculate_size(src_format, 1, update_w, 1);
UINT row_count = (update_h + src_format->block_height - 1) / src_format->block_height;
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index d1ef660..ccb9aa5 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -6,7 +6,7 @@
* Copyright 2004 Christian Costa
* Copyright 2005 Oliver Stieber
* Copyright 2007-2008 Stefan Dösinger for CodeWeavers
- * Copyright 2009 Henri Verbeet for CodeWeavers
+ * Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -2854,7 +2854,7 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const struct wined
return FALSE;
/* Float formats need FBOs. If FBOs are used this function isn't called */
- if (format->Flags & WINED3DFMT_FLAG_FLOAT) return FALSE;
+ if (format->flags & WINED3DFMT_FLAG_FLOAT) return FALSE;
if(cfg->iPixelType == WGL_TYPE_RGBA_ARB) { /* Integer RGBA formats */
if (!getColorBits(format, &redSize, &greenSize, &blueSize, &alphaSize, &colorBits))
@@ -2898,7 +2898,7 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const struct wined3
}
/* Float formats need FBOs. If FBOs are used this function isn't called */
- if (format->Flags & WINED3DFMT_FLAG_FLOAT) return FALSE;
+ if (format->flags & WINED3DFMT_FLAG_FLOAT) return FALSE;
if ((format->id == WINED3DFMT_D16_LOCKABLE) || (format->id == WINED3DFMT_D32_FLOAT))
lockable = TRUE;
@@ -2946,8 +2946,8 @@ static HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface,
ds_format = wined3d_get_format(&adapter->gl_info, DepthStencilFormat);
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
- if ((rt_format->Flags & WINED3DFMT_FLAG_RENDERTARGET)
- && (ds_format->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)))
+ if ((rt_format->flags & WINED3DFMT_FLAG_RENDERTARGET)
+ && (ds_format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)))
{
TRACE_(d3d_caps)("(%p) : Formats matched\n", This);
return WINED3D_OK;
@@ -3012,7 +3012,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, U
format = wined3d_get_format(&adapter->gl_info, SurfaceFormat);
if (!format) return WINED3DERR_INVALIDCALL;
- if (format->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
+ if (format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
{
int i, nCfgs;
const WineD3D_PixelFormat *cfgs;
@@ -3033,7 +3033,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, U
return WINED3D_OK;
}
}
- else if (format->Flags & WINED3DFMT_FLAG_RENDERTARGET)
+ else if (format->flags & WINED3DFMT_FLAG_RENDERTARGET)
{
short redSize, greenSize, blueSize, alphaSize, colorBits;
int i, nCfgs;
@@ -3078,7 +3078,7 @@ static BOOL CheckBumpMapCapability(struct wined3d_adapter *adapter, const struct
/* Ask the fixed function pipeline implementation if it can deal
* with the conversion. If we've got a GL extension giving native
* support this will be an identity conversion. */
- return (format->Flags & WINED3DFMT_FLAG_BUMPMAP)
+ return (format->flags & WINED3DFMT_FLAG_BUMPMAP)
&& adapter->fragment_pipe->color_fixup_supported(format->color_fixup);
}
@@ -3094,7 +3094,7 @@ static BOOL CheckDepthStencilCapability(struct wined3d_adapter *adapter,
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
/* With FBOs WGL limitations do not apply, but the format needs to be FBO attachable */
- if (ds_format->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) return TRUE;
+ if (ds_format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) return TRUE;
}
else
{
@@ -3118,7 +3118,7 @@ static BOOL CheckDepthStencilCapability(struct wined3d_adapter *adapter,
static BOOL CheckFilterCapability(struct wined3d_adapter *adapter, const struct wined3d_format *format)
{
/* The flags entry of a format contains the filtering capability */
- if (format->Flags & WINED3DFMT_FLAG_FILTERING) return TRUE;
+ if (format->flags & WINED3DFMT_FLAG_FILTERING) return TRUE;
return FALSE;
}
@@ -3128,7 +3128,7 @@ static BOOL CheckRenderTargetCapability(struct wined3d_adapter *adapter,
const struct wined3d_format *adapter_format, const struct wined3d_format *check_format)
{
/* Filter out non-RT formats */
- if (!(check_format->Flags & WINED3DFMT_FLAG_RENDERTARGET)) return FALSE;
+ if (!(check_format->flags & WINED3DFMT_FLAG_RENDERTARGET)) return FALSE;
if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER)
{
WineD3D_PixelFormat *cfgs = adapter->cfgs;
@@ -3170,7 +3170,7 @@ static BOOL CheckRenderTargetCapability(struct wined3d_adapter *adapter,
static BOOL CheckSrgbReadCapability(struct wined3d_adapter *adapter, const struct wined3d_format *format)
{
- return adapter->gl_info.supported[EXT_TEXTURE_SRGB] && (format->Flags & WINED3DFMT_FLAG_SRGB_READ);
+ return adapter->gl_info.supported[EXT_TEXTURE_SRGB] && (format->flags & WINED3DFMT_FLAG_SRGB_READ);
}
static BOOL CheckSrgbWriteCapability(struct wined3d_adapter *adapter, const struct wined3d_format *format)
@@ -3178,7 +3178,7 @@ static BOOL CheckSrgbWriteCapability(struct wined3d_adapter *adapter, const stru
/* Only offer SRGB writing on X8R8G8B8/A8R8G8B8 when we use ARB or GLSL shaders as we are
* doing the color fixup in shaders.
* Note Windows drivers (at least on the Geforce 8800) also offer this on R5G6B5. */
- if (format->Flags & WINED3DFMT_FLAG_SRGB_WRITE)
+ if (format->flags & WINED3DFMT_FLAG_SRGB_WRITE)
{
int vs_selected_mode;
int ps_selected_mode;
@@ -3199,7 +3199,7 @@ static BOOL CheckPostPixelShaderBlendingCapability(struct wined3d_adapter *adapt
const struct wined3d_format *format)
{
/* The flags entry of a format contains the post pixel shader blending capability */
- if (format->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) return TRUE;
+ if (format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) return TRUE;
return FALSE;
}
@@ -3527,7 +3527,7 @@ static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter,
static BOOL CheckVertexTextureCapability(struct wined3d_adapter *adapter,
const struct wined3d_format *format)
{
- return adapter->gl_info.limits.vertex_samplers && (format->Flags & WINED3DFMT_FLAG_VTF);
+ return adapter->gl_info.limits.vertex_samplers && (format->flags & WINED3DFMT_FLAG_VTF);
}
static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
@@ -3845,7 +3845,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
TRACE_(d3d_caps)("[FAILED] - No depth stencil support\n");
return WINED3DERR_NOTAVAILABLE;
}
- if ((format->Flags & WINED3DFMT_FLAG_SHADOW) && !gl_info->supported[ARB_SHADOW])
+ if ((format->flags & WINED3DFMT_FLAG_SHADOW) && !gl_info->supported[ARB_SHADOW])
{
TRACE_(d3d_caps)("[FAILED] - No shadow sampler support.\n");
return WINED3DERR_NOTAVAILABLE;
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 5a7f3f3..ffe66e8 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -5,7 +5,7 @@
* Copyright 2005 Oliver Stieber
* Copyright 2006 Ivan Gyurdiev
* Copyright 2007-2008 Stefan Dösinger for CodeWeavers
- * Copyright 2009 Henri Verbeet for CodeWeavers
+ * Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -2113,7 +2113,7 @@ void find_ps_compile_args(const struct wined3d_state *state,
if (state->render_states[WINED3DRS_SRGBWRITEENABLE])
{
IWineD3DSurfaceImpl *rt = device->render_targets[0];
- if(rt->resource.format->Flags & WINED3DFMT_FLAG_SRGB_WRITE) args->srgb_correction = 1;
+ if (rt->resource.format->flags & WINED3DFMT_FLAG_SRGB_WRITE) args->srgb_correction = 1;
}
if (shader->baseShader.reg_maps.shader_version.major == 1
@@ -2140,7 +2140,7 @@ void find_ps_compile_args(const struct wined3d_state *state,
}
args->color_fixup[i] = texture->resource.format->color_fixup;
- if (texture->resource.format->Flags & WINED3DFMT_FLAG_SHADOW)
+ if (texture->resource.format->flags & WINED3DFMT_FLAG_SHADOW)
args->shadow |= 1 << i;
/* Flag samplers that need NP2 texcoord fixup. */
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 81a505d..e36bf9a 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -257,7 +257,7 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct
* With blending on we could face a big performance penalty.
* The d3d9 visual test confirms the behavior. */
if (context->render_offscreen
- && !(target->resource.format->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING))
+ && !(target->resource.format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING))
{
glDisable(GL_BLEND);
checkGLcall("glDisable GL_BLEND");
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index f9cddc8..570b100 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -565,7 +565,7 @@ static void surface_download_data(IWineD3DSurfaceImpl *This, const struct wined3
ENTER_GL();
- if (format->Flags & WINED3DFMT_FLAG_COMPRESSED)
+ if (format->flags & WINED3DFMT_FLAG_COMPRESSED)
{
TRACE("(%p) : Calling glGetCompressedTexImageARB level %d, format %#x, type %#x, data %p.\n",
This, This->texture_level, format->glFormat, format->glType,
@@ -746,7 +746,7 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, const struct wined3d_
data = NULL;
}
- if (format->Flags & WINED3DFMT_FLAG_COMPRESSED)
+ if (format->flags & WINED3DFMT_FLAG_COMPRESSED)
{
TRACE("Calling glCompressedTexSubImage2DARB.\n");
@@ -843,7 +843,7 @@ static void surface_allocate_surface(IWineD3DSurfaceImpl *This, const struct win
}
}
- if (format->Flags & WINED3DFMT_FLAG_COMPRESSED && mem)
+ if (format->flags & WINED3DFMT_FLAG_COMPRESSED && mem)
{
GL_EXTCALL(glCompressedTexImage2DARB(This->texture_target, This->texture_level,
internal, width, height, 0, This->resource.size, mem));
@@ -1914,7 +1914,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Unmap(IWineD3DSurface *iface)
This->dirtyRect.right = 0;
This->dirtyRect.bottom = 0;
}
- else if (This->resource.format->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
+ else if (This->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
{
FIXME("Depth Stencil buffer locking is not implemented\n");
}
@@ -3985,7 +3985,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
if (pow2Width > This->currentDesc.Width || pow2Height > This->currentDesc.Height)
{
/* TODO: Add support for non power two compressed textures. */
- if (This->resource.format->Flags & WINED3DFMT_FLAG_COMPRESSED)
+ if (This->resource.format->flags & WINED3DFMT_FLAG_COMPRESSED)
{
FIXME("(%p) Compressed non-power-two textures are not supported w(%d) h(%d)\n",
This, This->currentDesc.Width, This->currentDesc.Height);
@@ -4497,7 +4497,7 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE
read_from_framebuffer_texture(surface, flag == SFLAG_INSRGBTEX);
}
else if (surface->flags & (SFLAG_INSRGBTEX | SFLAG_INTEXTURE)
- && (surface->resource.format->Flags & attach_flags) == attach_flags
+ && (surface->resource.format->flags & attach_flags) == attach_flags
&& fbo_blit_supported(gl_info, BLIT_OP_BLIT,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format))
@@ -4934,8 +4934,8 @@ static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_
if (src_pool == WINED3DPOOL_SYSTEMMEM || dst_pool == WINED3DPOOL_SYSTEMMEM)
return FALSE;
- if (!((src_format->Flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) || (src_usage & WINED3DUSAGE_RENDERTARGET))
- && ((dst_format->Flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) || (dst_usage & WINED3DUSAGE_RENDERTARGET)))
+ if (!((src_format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) || (src_usage & WINED3DUSAGE_RENDERTARGET))
+ && ((dst_format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) || (dst_usage & WINED3DUSAGE_RENDERTARGET)))
return FALSE;
if (!(src_format->id == dst_format->id
diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c
index 61ecb7c..f907ae8 100644
--- a/dlls/wined3d/surface_base.c
+++ b/dlls/wined3d/surface_base.c
@@ -308,7 +308,7 @@ DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface)
DWORD ret;
TRACE("(%p)\n", This);
- if ((format->Flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_COMPRESSED)
+ if ((format->flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_COMPRESSED)
{
/* Since compressed formats are block based, pitch means the amount of
* bytes to the next row of block rather than the next row of pixels. */
@@ -503,7 +503,7 @@ HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface)
DWORD *masks;
UINT usage;
- if (!(format->Flags & WINED3DFMT_FLAG_GETDC))
+ if (!(format->flags & WINED3DFMT_FLAG_GETDC))
{
WARN("Cannot use GetDC on a %s surface\n", debug_d3dformat(format->id));
return WINED3DERR_INVALIDCALL;
@@ -1125,7 +1125,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *D
if (!DDBltFx || !(DDBltFx->dwDDFX)) Flags &= ~WINEDDBLT_DDFX;
- if (sEntry->Flags & dEntry->Flags & WINED3DFMT_FLAG_FOURCC)
+ if (sEntry->flags & dEntry->flags & WINED3DFMT_FLAG_FOURCC)
{
if (!DestRect || src == This)
{
@@ -1657,7 +1657,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst
}
/* Handle compressed surfaces first... */
- if (sEntry->Flags & dEntry->Flags & WINED3DFMT_FLAG_COMPRESSED)
+ if (sEntry->flags & dEntry->flags & WINED3DFMT_FLAG_COMPRESSED)
{
UINT row_block_count;
@@ -1683,7 +1683,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst
goto error;
}
- if ((sEntry->Flags & WINED3DFMT_FLAG_COMPRESSED) && !(dEntry->Flags & WINED3DFMT_FLAG_COMPRESSED))
+ if ((sEntry->flags & WINED3DFMT_FLAG_COMPRESSED) && !(dEntry->flags & WINED3DFMT_FLAG_COMPRESSED))
{
/* TODO: Use the libtxc_dxtn.so shared library to do
* software decompression
@@ -1840,7 +1840,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Map(IWineD3DSurface *iface,
TRACE("Lock Rect (%p) = l %d, t %d, r %d, b %d\n",
pRect, pRect->left, pRect->top, pRect->right, pRect->bottom);
- if ((format->Flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_COMPRESSED)
+ if ((format->flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_COMPRESSED)
{
/* Compressed textures are block based, so calculate the offset of
* the block that contains the top-left pixel of the locked rectangle. */
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 12c2043..c5ec40f 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -566,7 +566,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
texture->baseTexture.target = GL_TEXTURE_RECTANGLE_ARB;
texture->cond_np2 = TRUE;
- if(texture->resource.format->Flags & WINED3DFMT_FLAG_FILTERING)
+ if (texture->resource.format->flags & WINED3DFMT_FLAG_FILTERING)
{
texture->baseTexture.minMipLookup = minMipLookup_noMip;
}
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 8770f04..4d04271 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -7,7 +7,7 @@
* Copyright 2005 Oliver Stieber
* Copyright 2006-2008 Henri Verbeet
* Copyright 2007-2008 Stefan Dösinger for CodeWeavers
- * Copyright 2009 Henri Verbeet for CodeWeavers
+ * Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -927,7 +927,7 @@ static BOOL init_format_base_info(struct wined3d_gl_info *gl_info)
return FALSE;
}
- gl_info->formats[fmt_idx].Flags |= format_base_flags[i].flags;
+ gl_info->formats[fmt_idx].flags |= format_base_flags[i].flags;
}
return TRUE;
@@ -953,7 +953,7 @@ static BOOL init_format_compression_info(struct wined3d_gl_info *gl_info)
format->block_width = format_compression_info[i].block_width;
format->block_height = format_compression_info[i].block_height;
format->block_byte_count = format_compression_info[i].block_byte_count;
- format->Flags |= WINED3DFMT_FLAG_COMPRESSED;
+ format->flags |= WINED3DFMT_FLAG_COMPRESSED;
}
return TRUE;
@@ -989,18 +989,18 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
if (status == GL_FRAMEBUFFER_COMPLETE)
{
TRACE("Format %s is supported as FBO color attachment.\n", debug_d3dformat(format->id));
- format->Flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE;
+ format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE;
format->rtInternal = format->glInternal;
}
else
{
if (!format->rtInternal)
{
- if (format->Flags & WINED3DFMT_FLAG_RENDERTARGET)
+ if (format->flags & WINED3DFMT_FLAG_RENDERTARGET)
{
FIXME("Format %s with rendertarget flag is not supported as FBO color attachment,"
" and no fallback specified.\n", debug_d3dformat(format->id));
- format->Flags &= ~WINED3DFMT_FLAG_RENDERTARGET;
+ format->flags &= ~WINED3DFMT_FLAG_RENDERTARGET;
}
else
{
@@ -1035,12 +1035,12 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
{
FIXME("Format %s rtInternal format is not supported as FBO color attachment.\n",
debug_d3dformat(format->id));
- format->Flags &= ~WINED3DFMT_FLAG_RENDERTARGET;
+ format->flags &= ~WINED3DFMT_FLAG_RENDERTARGET;
}
}
}
- if (status == GL_FRAMEBUFFER_COMPLETE && format->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)
+ if (status == GL_FRAMEBUFFER_COMPLETE && format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)
{
GLuint rb;
@@ -1061,7 +1061,7 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
{
while(glGetError());
TRACE("Format doesn't support post-pixelshader blending.\n");
- format->Flags &= ~WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING;
+ format->flags &= ~WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING;
}
if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT]
@@ -1085,7 +1085,7 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
if (status == GL_FRAMEBUFFER_COMPLETE)
{
TRACE("Format %s's sRGB format is FBO attachable.\n", debug_d3dformat(format->id));
- format->Flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB;
+ format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB;
}
else
{
@@ -1120,14 +1120,14 @@ static void init_format_fbo_compat_info(struct wined3d_gl_info *gl_info)
if (!format->glInternal) continue;
- if (format->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
+ if (format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
{
TRACE("Skipping format %s because it's a depth/stencil format.\n",
debug_d3dformat(format->id));
continue;
}
- if (format->Flags & WINED3DFMT_FLAG_COMPRESSED)
+ if (format->flags & WINED3DFMT_FLAG_COMPRESSED)
{
TRACE("Skipping format %s because it's a compressed format.\n",
debug_d3dformat(format->id));
@@ -1178,7 +1178,7 @@ static BOOL init_format_texture_info(struct wined3d_gl_info *gl_info)
/* ARB_texture_rg defines floating point formats, but only if
* ARB_texture_float is also supported. */
if (!gl_info->supported[ARB_TEXTURE_FLOAT]
- && (format->Flags & WINED3DFMT_FLAG_FLOAT))
+ && (format->flags & WINED3DFMT_FLAG_FLOAT))
continue;
format->glInternal = format_texture_info[i].gl_internal;
@@ -1187,7 +1187,7 @@ static BOOL init_format_texture_info(struct wined3d_gl_info *gl_info)
format->glFormat = format_texture_info[i].gl_format;
format->glType = format_texture_info[i].gl_type;
format->color_fixup = COLOR_FIXUP_IDENTITY;
- format->Flags |= format_texture_info[i].flags;
+ format->flags |= format_texture_info[i].flags;
format->heightscale = 1.0f;
/* Texture conversion stuff */
@@ -1344,7 +1344,7 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3
for(i = 0; i < (sizeof(fmts16) / sizeof(*fmts16)); i++)
{
fmt_idx = getFmtIdx(fmts16[i]);
- gl_info->formats[fmt_idx].Flags |= WINED3DFMT_FLAG_FILTERING;
+ gl_info->formats[fmt_idx].flags |= WINED3DFMT_FLAG_FILTERING;
}
}
return;
@@ -1360,7 +1360,7 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3
if(filtered)
{
TRACE("Format %s supports filtering\n", debug_d3dformat(fmts16[i]));
- format->Flags |= WINED3DFMT_FLAG_FILTERING;
+ format->flags |= WINED3DFMT_FLAG_FILTERING;
}
else
{
@@ -1583,7 +1583,7 @@ UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT ali
{
size = 0;
}
- else if (format->Flags & WINED3DFMT_FLAG_COMPRESSED)
+ else if (format->flags & WINED3DFMT_FLAG_COMPRESSED)
{
UINT row_block_count = (width + format->block_width - 1) / format->block_width;
UINT row_count = (height + format->block_height - 1) / format->block_height;
@@ -2959,7 +2959,7 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting
}
}
if (stateblock->state.render_states[WINED3DRS_SRGBWRITEENABLE]
- && rt->resource.format->Flags & WINED3DFMT_FLAG_SRGB_WRITE)
+ && rt->resource.format->flags & WINED3DFMT_FLAG_SRGB_WRITE)
{
settings->sRGB_write = 1;
} else {
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 65d6959..f143009 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3039,7 +3039,7 @@ struct wined3d_format
GLint glFormat;
GLint glType;
UINT conv_byte_count;
- unsigned int Flags;
+ unsigned int flags;
float heightscale;
struct color_fixup_desc color_fixup;
void (*convert)(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height);
--
1.7.2.2
More information about the wine-patches
mailing list