Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c6cd7a77
Commit
c6cd7a77
authored
Sep 24, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Properly handle the offset for compressed surfaces in IWineD3DDeviceImpl_UpdateSurface().
parent
0ee57cf1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
30 deletions
+8
-30
device.c
dlls/wined3d/device.c
+8
-30
No files found.
dlls/wined3d/device.c
View file @
c6cd7a77
...
...
@@ -5902,17 +5902,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
if
(
pSourceRect
!=
NULL
&&
pSourceRect
->
top
!=
0
){
offset
+=
pSourceRect
->
top
*
srcSurfaceWidth
*
pSrcSurface
->
bytesPerPixel
;
}
TRACE
(
"(%p) glTexSubImage2D, Level %d, left %d, top %d, width %d, height %d , ftm %d, type %d, memory %p
\n
"
,
This
,
glDescription
->
level
,
destLeft
,
destTop
,
srcWidth
,
srcHeight
,
glDescription
->
glFormat
,
glDescription
->
glType
,
IWineD3DSurface_GetData
(
pSourceSurface
)
);
TRACE
(
"(%p) glTexSubImage2D, level %d, left %d, top %d, width %d, height %d, fmt %#x, type %#x, memory %p+%#x
\n
"
,
This
,
glDescription
->
level
,
destLeft
,
destTop
,
srcWidth
,
srcHeight
,
glDescription
->
glFormat
,
glDescription
->
glType
,
IWineD3DSurface_GetData
(
pSourceSurface
),
offset
);
/* Sanity check */
if
(
IWineD3DSurface_GetData
(
pSourceSurface
)
==
NULL
)
{
...
...
@@ -5945,6 +5937,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
}
}
else
{
/* Full width, so just write out the whole texture */
const
unsigned
char
*
data
=
((
const
unsigned
char
*
)
IWineD3DSurface_GetData
(
pSourceSurface
))
+
offset
;
if
(
WINED3DFMT_DXT1
==
destFormat
||
WINED3DFMT_DXT2
==
destFormat
||
...
...
@@ -5958,14 +5951,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
}
if
(
destFormat
!=
srcFormat
)
{
FIXME
(
"Updating mixed format compressed texture is not curretly support
\n
"
);
}
else
{
GL_EXTCALL
(
glCompressedTexImage2DARB
)(
glDescription
->
target
,
glDescription
->
level
,
glDescription
->
glFormatInternal
,
srcWidth
,
srcHeight
,
0
,
destSize
,
IWineD3DSurface_GetData
(
pSourceSurface
));
GL_EXTCALL
(
glCompressedTexImage2DARB
(
glDescription
->
target
,
glDescription
->
level
,
glDescription
->
glFormatInternal
,
srcWidth
,
srcHeight
,
0
,
destSize
,
data
));
}
}
else
{
FIXME
(
"Attempting to update a DXT compressed texture without hardware support
\n
"
);
...
...
@@ -5973,17 +5960,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
}
else
{
const
unsigned
char
*
data
=
((
const
unsigned
char
*
)
IWineD3DSurface_GetData
(
pSourceSurface
))
+
offset
;
glTexSubImage2D
(
glDescription
->
target
,
glDescription
->
level
,
destLeft
,
destTop
,
srcWidth
,
srcHeight
,
glDescription
->
glFormat
,
glDescription
->
glType
,
data
);
glTexSubImage2D
(
glDescription
->
target
,
glDescription
->
level
,
destLeft
,
destTop
,
srcWidth
,
srcHeight
,
glDescription
->
glFormat
,
glDescription
->
glType
,
data
);
}
}
checkGLcall
(
"glTexSubImage2D"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment