[3/4] WineD3D: Store the pixel format in the texture
Stefan Dösinger
stefan at codeweavers.com
Wed Mar 21 11:29:57 CDT 2007
-------------- next part --------------
From 5542724ecd808c472635c335f3aa15b43fc56955 Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Tue, 20 Mar 2007 23:01:15 +0100
Subject: [PATCH] WineD3D: Store the pixel format in the texture
There is a member in the basetexture structure, but it is not set. Set
it at creation time.
---
dlls/wined3d/device.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index da1b8c9..7863714 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -823,6 +823,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
object->pow2scalingFactorY = (((float)Height) / ((float)pow2Height));
TRACE(" xf(%f) yf(%f)\n", object->pow2scalingFactorX, object->pow2scalingFactorY);
+ object->baseTexture.format = Format;
+
/* Calculate levels for mip mapping */
if (Levels == 0) {
TRACE("calculating levels %d\n", object->baseTexture.levels);
@@ -896,6 +898,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
object->width = Width;
object->height = Height;
object->depth = Depth;
+ object->baseTexture.format = Format;
/* Calculate levels for mip mapping */
if (Levels == 0) {
@@ -1011,6 +1014,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
/* TODO: support for native non-power 2 */
/* Precalculated scaling for 'faked' non power of two texture coords */
object->pow2scalingFactor = ((float)EdgeLength) / ((float)pow2EdgeLength);
+ object->baseTexture.format = Format;
/* Calculate levels for mip mapping */
if (Levels == 0) {
--
1.4.4.3
More information about the wine-patches
mailing list