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
d45c16ba
Commit
d45c16ba
authored
Oct 05, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Oct 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Define the surface alignment in the header.
parent
90f097f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
device.c
dlls/wined3d/device.c
+5
-5
surface.c
dlls/wined3d/surface.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-0
No files found.
dlls/wined3d/device.c
View file @
d45c16ba
...
@@ -1016,7 +1016,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
...
@@ -1016,7 +1016,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
Size
=
((
max
(
pow2Width
,
4
)
*
tableEntry
->
bpp
)
*
max
(
pow2Height
,
4
));
Size
=
((
max
(
pow2Width
,
4
)
*
tableEntry
->
bpp
)
*
max
(
pow2Height
,
4
));
}
else
{
}
else
{
/* The pitch is a multiple of 4 bytes */
/* The pitch is a multiple of 4 bytes */
Size
=
((
pow2Width
*
tableEntry
->
bpp
)
+
3
)
&
~
3
;
Size
=
((
pow2Width
*
tableEntry
->
bpp
)
+
SURFACE_ALIGNMENT
-
1
)
&
~
(
SURFACE_ALIGNMENT
-
1
)
;
Size
*=
pow2Height
;
Size
*=
pow2Height
;
}
}
...
@@ -1866,10 +1866,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
...
@@ -1866,10 +1866,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
}
}
/* Set the surface alignment. This never changes, so we are safe to set it once per context*/
/* Set the surface alignment. This never changes, so we are safe to set it once per context*/
glPixelStorei
(
GL_PACK_ALIGNMENT
,
4
);
glPixelStorei
(
GL_PACK_ALIGNMENT
,
SURFACE_ALIGNMENT
);
checkGLcall
(
"glPixelStorei(GL_PACK_ALIGNMENT,
4
);"
);
checkGLcall
(
"glPixelStorei(GL_PACK_ALIGNMENT,
SURFACE_ALIGNMENT
);"
);
glPixelStorei
(
GL_UNPACK_ALIGNMENT
,
4
);
glPixelStorei
(
GL_UNPACK_ALIGNMENT
,
SURFACE_ALIGNMENT
);
checkGLcall
(
"glPixelStorei(GL_UNPACK_ALIGNMENT,
4
);"
);
checkGLcall
(
"glPixelStorei(GL_UNPACK_ALIGNMENT,
SURFACE_ALIGNMENT
);"
);
LEAVE_GL
();
LEAVE_GL
();
...
...
dlls/wined3d/surface.c
View file @
d45c16ba
...
@@ -3021,7 +3021,7 @@ DWORD WINAPI IWineD3DSurfaceImpl_GetPitch(IWineD3DSurface *iface) {
...
@@ -3021,7 +3021,7 @@ DWORD WINAPI IWineD3DSurfaceImpl_GetPitch(IWineD3DSurface *iface) {
ret
=
This
->
bytesPerPixel
*
This
->
pow2Width
;
ret
=
This
->
bytesPerPixel
*
This
->
pow2Width
;
}
}
/* Surfaces are 32 bit aligned */
/* Surfaces are 32 bit aligned */
ret
=
(
ret
+
3
)
&
~
3
;
ret
=
(
ret
+
SURFACE_ALIGNMENT
-
1
)
&
~
(
SURFACE_ALIGNMENT
-
1
)
;
}
}
TRACE
(
"(%p) Returning %d
\n
"
,
This
,
ret
);
TRACE
(
"(%p) Returning %d
\n
"
,
This
,
ret
);
return
ret
;
return
ret
;
...
...
dlls/wined3d/wined3d_private.h
View file @
d45c16ba
...
@@ -996,6 +996,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, RECT *S
...
@@ -996,6 +996,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, RECT *S
BOOL
CalculateTexRect
(
IWineD3DSurfaceImpl
*
This
,
RECT
*
Rect
,
float
glTexCoord
[
4
]);
BOOL
CalculateTexRect
(
IWineD3DSurfaceImpl
*
This
,
RECT
*
Rect
,
float
glTexCoord
[
4
]);
/* Alignment of the pitch */
#define SURFACE_ALIGNMENT 4
/*****************************************************************************
/*****************************************************************************
* IWineD3DVertexDeclaration implementation structure
* IWineD3DVertexDeclaration implementation structure
*/
*/
...
...
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