wined3d: Eliminate the heightscale field from IWineD3DSurfaceImpl.
This commit is contained in:
parent
e56a4cb799
commit
a139683a60
|
@ -802,7 +802,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
|
|||
object->currentDesc.MultiSampleType = MultiSample;
|
||||
object->currentDesc.MultiSampleQuality = MultisampleQuality;
|
||||
object->glDescription.level = Level;
|
||||
object->heightscale = glDesc->heightscale != 0.0 ? glDesc->heightscale : 1.0;
|
||||
list_init(&object->overlays);
|
||||
|
||||
/* Flags */
|
||||
|
|
|
@ -287,8 +287,9 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
|
|||
/* This call just uploads data, the caller is responsible for activating the
|
||||
* 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) {
|
||||
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 ||
|
||||
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
|
||||
* 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) {
|
||||
const struct GlPixelFormatDesc *format_desc = This->resource.format_desc;
|
||||
BOOL enable_client_storage = FALSE;
|
||||
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,
|
||||
This->glDescription.target, This->glDescription.level, debug_d3dformat(This->resource.format), internal, width, height, format, type);
|
||||
|
|
|
@ -1531,7 +1531,6 @@ struct IWineD3DSurfaceImpl
|
|||
|
||||
UINT pow2Width;
|
||||
UINT pow2Height;
|
||||
float heightscale;
|
||||
|
||||
/* 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);
|
||||
|
|
Loading…
Reference in New Issue