Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e0faa866
Commit
e0faa866
authored
Oct 07, 2003
by
Jason Edmeades
Committed by
Alexandre Julliard
Oct 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DXTn stride is to the next block, which is the equivalent to 4 rows
worth of bytes.
parent
ee1eb63b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
drawprim.c
dlls/d3d8/drawprim.c
+1
-1
surface.c
dlls/d3d8/surface.c
+10
-4
No files found.
dlls/d3d8/drawprim.c
View file @
e0faa866
...
...
@@ -1487,7 +1487,7 @@ void drawPrimitive(LPDIRECT3DDEVICE8 iface,
TRACE
(
"Saving texture %s (Format:%s)
\n
"
,
buffer
,
debug_d3dformat
(((
IDirect3DBaseTexture8Impl
*
)
This
->
StateBlock
->
textures
[
textureNo
])
->
format
));
IDirect3DTexture8Impl_GetSurfaceLevel
((
LPDIRECT3DTEXTURE8
)
This
->
StateBlock
->
textures
[
textureNo
],
0
,
&
pSur
);
IDirect3DSurface8Impl_SaveSnapshot
(
pSur
,
buffer
);
IDirect3DSurface8Impl_Release
Ref
(
pSur
);
IDirect3DSurface8Impl_Release
(
pSur
);
}
}
}
...
...
dlls/d3d8/surface.c
View file @
e0faa866
...
...
@@ -152,10 +152,16 @@ HRESULT WINAPI IDirect3DSurface8Impl_LockRect(LPDIRECT3DSURFACE8 iface, D3DLOCKE
TRACE
(
"(%p) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p
\n
"
,
This
,
pRect
,
Flags
,
pLockedRect
,
This
->
allocatedMemory
);
}
pLockedRect
->
Pitch
=
This
->
bytesPerPixel
*
This
->
myDesc
.
Width
;
/* Bytes / row */
if
(
This
->
myDesc
.
Format
==
D3DFMT_DXT1
)
/* DXT1 is half byte per pixel */
pLockedRect
->
Pitch
=
pLockedRect
->
Pitch
/
2
;
/* DXTn formats dont have exact pitches as they are to the newt row of blocks,
where each block is 4x4 pixels, 8 bytes (dxt1) and 16 bytes (dxt3/5)
ie pitch = (width/4) * bytes per block */
if
(
This
->
myDesc
.
Format
==
D3DFMT_DXT1
)
/* DXT1 is 8 bytes per block */
pLockedRect
->
Pitch
=
(
This
->
myDesc
.
Width
/
4
)
*
8
;
else
if
(
This
->
myDesc
.
Format
==
D3DFMT_DXT3
||
This
->
myDesc
.
Format
==
D3DFMT_DXT5
)
/* DXT3/5 is 16 bytes per block */
pLockedRect
->
Pitch
=
(
This
->
myDesc
.
Width
/
4
)
*
16
;
else
pLockedRect
->
Pitch
=
This
->
bytesPerPixel
*
This
->
myDesc
.
Width
;
/* Bytes / row */
if
(
NULL
==
pRect
)
{
pLockedRect
->
pBits
=
This
->
allocatedMemory
;
This
->
lockedRect
.
left
=
0
;
...
...
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