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
ad692f2a
Commit
ad692f2a
authored
Sep 11, 2007
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Sep 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add PBO support for dynamically locked surfaces.
parent
7226f88f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
0 deletions
+33
-0
surface.c
dlls/wined3d/surface.c
+0
-0
swapchain.c
dlls/wined3d/swapchain.c
+19
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+7
-0
wined3d_gl.h
include/wine/wined3d_gl.h
+7
-0
No files found.
dlls/wined3d/surface.c
View file @
ad692f2a
This diff is collapsed.
Click to expand it.
dlls/wined3d/swapchain.c
View file @
ad692f2a
...
...
@@ -321,6 +321,25 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
back
->
resource
.
allocatedMemory
=
tmp
;
}
/* Flip the PBO */
{
DWORD
tmp_flags
=
front
->
Flags
;
GLuint
tmp_pbo
=
front
->
pbo
;
front
->
pbo
=
back
->
pbo
;
back
->
pbo
=
tmp_pbo
;
if
(
back
->
Flags
&
SFLAG_PBO
)
front
->
Flags
|=
SFLAG_PBO
;
else
front
->
Flags
&=
~
SFLAG_PBO
;
if
(
tmp_flags
&
SFLAG_PBO
)
back
->
Flags
|=
SFLAG_PBO
;
else
back
->
Flags
&=
~
SFLAG_PBO
;
}
/* client_memory should not be different, but just in case */
{
BOOL
tmp
;
...
...
dlls/wined3d/wined3d_private.h
View file @
ad692f2a
...
...
@@ -1045,6 +1045,7 @@ typedef struct _WINED3DSURFACET_DESC
typedef
struct
wineD3DSurface_DIB
{
HBITMAP
DIBsection
;
void
*
bitmap_data
;
UINT
bitmap_size
;
HGDIOBJ
holdbitmap
;
BOOL
client_memory
;
}
wineD3DSurface_DIB
;
...
...
@@ -1095,6 +1096,9 @@ struct IWineD3DSurfaceImpl
/* Oversized texture */
RECT
glRect
;
/* PBO */
GLuint
pbo
;
#if 0
/* precalculated x and y scalings for texture coords */
float pow2scalingFactorX; /* = (Width / pow2Width ) */
...
...
@@ -1195,6 +1199,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DCl
#define SFLAG_GLCKEY 0x00008000
/* The gl texture was created with a color key */
#define SFLAG_CLIENT 0x00010000
/* GL_APPLE_client_storage is used on that texture */
#define SFLAG_ALLOCATED 0x00020000
/* A gl texture is allocated for this surface */
#define SFLAG_PBO 0x00040000
/* Has a PBO attached for speeding data transfer for dynamicly locked surfaces */
/* In some conditions the surface memory must not be freed:
* SFLAG_OVERSIZE: Not all data can be kept in GL
...
...
@@ -1203,6 +1208,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DCl
* SFLAG_LOCKED: The app requires access to the surface data
* SFLAG_DYNLOCK: Avoid freeing the data for performance
* SFLAG_DYNCHANGE: Same reason as DYNLOCK
* SFLAG_PBO: PBOs don't use 'normal' memory. It is either allocated by the driver or must be NULL.
* SFLAG_CLIENT: OpenGL uses our memory as backup
*/
#define SFLAG_DONOTFREE (SFLAG_OVERSIZE | \
...
...
@@ -1212,6 +1218,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DCl
SFLAG_DYNLOCK | \
SFLAG_DYNCHANGE | \
SFLAG_USERPTR | \
SFLAG_PBO | \
SFLAG_CLIENT)
BOOL
CalculateTexRect
(
IWineD3DSurfaceImpl
*
This
,
RECT
*
Rect
,
float
glTexCoord
[
4
]);
...
...
include/wine/wined3d_gl.h
View file @
ad692f2a
...
...
@@ -2353,6 +2353,13 @@ typedef GLhandleARB (WINE_GLAPI * WINED3D_PFNGLGETHANDLEARBPROC) (GLenum pname);
typedef
void
(
WINE_GLAPI
*
WINED3D_PFNGLGETSHADERSOURCEARBPROC
)
(
GLhandleARB
obj
,
GLsizei
maxLength
,
GLsizei
*
length
,
GLcharARB
*
source
);
typedef
void
(
WINE_GLAPI
*
WINED3D_PFNGLBINDATTRIBLOCATIONARBPROC
)
(
GLhandleARB
programObj
,
GLuint
index
,
const
GLcharARB
*
name
);
typedef
GLint
(
WINE_GLAPI
*
WINED3D_PFNGLGETATTRIBLOCATIONARBPROC
)
(
GLhandleARB
programObj
,
const
GLcharARB
*
name
);
/* GL_ARB_pixel_buffer_object */
#ifndef GL_ARB_pixel_buffer_object
#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
#endif
/* GL_EXT_texture */
#ifndef GL_EXT_texture
#define GL_EXT_texture 1
...
...
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