wined3d: Eliminate the heightscale field from IWineD3DSurfaceImpl.

This commit is contained in:
Henri Verbeet 2009-03-13 10:44:17 +01:00 committed by Alexandre Julliard
parent e56a4cb799
commit a139683a60
3 changed files with 4 additions and 4 deletions

View File

@ -802,7 +802,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
object->currentDesc.MultiSampleType = MultiSample; object->currentDesc.MultiSampleType = MultiSample;
object->currentDesc.MultiSampleQuality = MultisampleQuality; object->currentDesc.MultiSampleQuality = MultisampleQuality;
object->glDescription.level = Level; object->glDescription.level = Level;
object->heightscale = glDesc->heightscale != 0.0 ? glDesc->heightscale : 1.0;
list_init(&object->overlays); list_init(&object->overlays);
/* Flags */ /* Flags */

View File

@ -287,8 +287,9 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
/* This call just uploads data, the caller is responsible for activating the /* This call just uploads data, the caller is responsible for activating the
* right context and binding the correct texture. */ * right context and binding the correct texture. */
static void surface_upload_data(IWineD3DSurfaceImpl *This, GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data) { static void surface_upload_data(IWineD3DSurfaceImpl *This, GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data) {
const struct GlPixelFormatDesc *format_desc = This->resource.format_desc;
if(This->heightscale != 1.0 && This->heightscale != 0.0) height *= This->heightscale; if (format_desc->heightscale != 1.0 && format_desc->heightscale != 0.0) height *= format_desc->heightscale;
if (This->resource.format == WINED3DFMT_DXT1 || if (This->resource.format == WINED3DFMT_DXT1 ||
This->resource.format == WINED3DFMT_DXT2 || This->resource.format == WINED3DFMT_DXT3 || This->resource.format == WINED3DFMT_DXT2 || This->resource.format == WINED3DFMT_DXT3 ||
@ -349,10 +350,11 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, GLenum internal, GLsi
/* This call just allocates the texture, the caller is responsible for /* This call just allocates the texture, the caller is responsible for
* activating the right context and binding the correct texture. */ * activating the right context and binding the correct texture. */
static void surface_allocate_surface(IWineD3DSurfaceImpl *This, GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type) { static void surface_allocate_surface(IWineD3DSurfaceImpl *This, GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type) {
const struct GlPixelFormatDesc *format_desc = This->resource.format_desc;
BOOL enable_client_storage = FALSE; BOOL enable_client_storage = FALSE;
const BYTE *mem = NULL; const BYTE *mem = NULL;
if(This->heightscale != 1.0 && This->heightscale != 0.0) height *= This->heightscale; if (format_desc->heightscale != 1.0 && format_desc->heightscale != 0.0) height *= format_desc->heightscale;
TRACE("(%p) : Creating surface (target %#x) level %d, d3d format %s, internal format %#x, width %d, height %d, gl format %#x, gl type=%#x\n", This, TRACE("(%p) : Creating surface (target %#x) level %d, d3d format %s, internal format %#x, width %d, height %d, gl format %#x, gl type=%#x\n", This,
This->glDescription.target, This->glDescription.level, debug_d3dformat(This->resource.format), internal, width, height, format, type); This->glDescription.target, This->glDescription.level, debug_d3dformat(This->resource.format), internal, width, height, format, type);

View File

@ -1531,7 +1531,6 @@ struct IWineD3DSurfaceImpl
UINT pow2Width; UINT pow2Width;
UINT pow2Height; UINT pow2Height;
float heightscale;
/* A method to retrieve the drawable size. Not in the Vtable to make it changeable */ /* A method to retrieve the drawable size. Not in the Vtable to make it changeable */
void (*get_drawable_size)(IWineD3DSurfaceImpl *This, UINT *width, UINT *height); void (*get_drawable_size)(IWineD3DSurfaceImpl *This, UINT *width, UINT *height);