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
39ebb992
Commit
39ebb992
authored
Dec 01, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce a separate function to determine if a surface needs a PBO.
parent
4a7cbba0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
surface.c
dlls/wined3d/surface.c
+15
-6
No files found.
dlls/wined3d/surface.c
View file @
39ebb992
...
...
@@ -520,6 +520,20 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
return
WINED3D_OK
;
}
static
BOOL
surface_need_pbo
(
const
struct
wined3d_surface
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
)
{
if
(
surface
->
resource
.
pool
==
WINED3DPOOL_SYSTEMMEM
)
return
FALSE
;
if
(
!
(
surface
->
flags
&
SFLAG_DYNLOCK
))
return
FALSE
;
if
(
surface
->
flags
&
(
SFLAG_CONVERTED
|
SFLAG_NONPOW2
|
SFLAG_PIN_SYSMEM
))
return
FALSE
;
if
(
!
gl_info
->
supported
[
ARB_PIXEL_BUFFER_OBJECT
])
return
FALSE
;
return
TRUE
;
}
static
void
surface_prepare_system_memory
(
struct
wined3d_surface
*
surface
)
{
struct
wined3d_device
*
device
=
surface
->
resource
.
device
;
...
...
@@ -527,12 +541,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
TRACE
(
"surface %p.
\n
"
,
surface
);
/* Create a PBO for dynamically locked surfaces but don't do it for
* converted or NPOT surfaces. Also don't create a PBO for systemmem
* surfaces. */
if
(
gl_info
->
supported
[
ARB_PIXEL_BUFFER_OBJECT
]
&&
(
surface
->
flags
&
SFLAG_DYNLOCK
)
&&
!
(
surface
->
flags
&
(
SFLAG_PBO
|
SFLAG_CONVERTED
|
SFLAG_NONPOW2
|
SFLAG_PIN_SYSMEM
))
&&
(
surface
->
resource
.
pool
!=
WINED3DPOOL_SYSTEMMEM
))
if
(
!
(
surface
->
flags
&
SFLAG_PBO
)
&&
surface_need_pbo
(
surface
,
gl_info
))
{
struct
wined3d_context
*
context
;
GLenum
error
;
...
...
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