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
e9b4f154
Commit
e9b4f154
authored
Sep 19, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't use volume->resource.allocatedMemory.
Depending on the location flags, the buffer or heap_memory should be used.
parent
708024f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
volume.c
dlls/wined3d/volume.c
+6
-12
No files found.
dlls/wined3d/volume.c
View file @
e9b4f154
...
...
@@ -168,7 +168,6 @@ static void wined3d_volume_download_data(struct wined3d_volume *volume,
static
void
wined3d_volume_evict_sysmem
(
struct
wined3d_volume
*
volume
)
{
wined3d_resource_free_sysmem
(
&
volume
->
resource
);
volume
->
resource
.
allocatedMemory
=
NULL
;
wined3d_volume_invalidate_location
(
volume
,
WINED3D_LOCATION_SYSMEM
);
}
...
...
@@ -202,7 +201,7 @@ static void wined3d_volume_srgb_transfer(struct wined3d_volume *volume,
* implementing EXT_SRGB_DECODE in the driver or finding out why we
* picked the wrong copy for the original upload and fixing that.
*
* Also keep in mind that we want to avoid using resource.
allocatedM
emory
* Also keep in mind that we want to avoid using resource.
heap_m
emory
* for DEFAULT pool surfaces. */
WARN_
(
d3d_perf
)(
"Performing slow rgb/srgb volume transfer.
\n
"
);
...
...
@@ -258,7 +257,7 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
}
else
if
(
volume
->
locations
&
WINED3D_LOCATION_SYSMEM
)
{
struct
wined3d_bo_address
data
=
{
0
,
volume
->
resource
.
allocatedM
emory
};
struct
wined3d_bo_address
data
=
{
0
,
volume
->
resource
.
heap_m
emory
};
wined3d_volume_upload_data
(
volume
,
context
,
&
data
);
}
else
if
(
volume
->
locations
&
WINED3D_LOCATION_BUFFER
)
...
...
@@ -287,11 +286,8 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
break
;
case
WINED3D_LOCATION_SYSMEM
:
if
(
!
volume
->
resource
.
allocatedMemory
||
!
volume
->
resource
.
heap_memory
)
{
if
(
!
volume
->
resource
.
heap_memory
)
ERR
(
"Trying to load WINED3D_LOCATION_SYSMEM without setting it up first.
\n
"
);
return
;
}
if
(
volume
->
locations
&
WINED3D_LOCATION_DISCARDED
)
{
...
...
@@ -300,7 +296,7 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
}
else
if
(
volume
->
locations
&
(
WINED3D_LOCATION_TEXTURE_RGB
|
WINED3D_LOCATION_TEXTURE_SRGB
))
{
struct
wined3d_bo_address
data
=
{
0
,
volume
->
resource
.
allocatedM
emory
};
struct
wined3d_bo_address
data
=
{
0
,
volume
->
resource
.
heap_m
emory
};
if
(
volume
->
locations
&
WINED3D_LOCATION_TEXTURE_RGB
)
volume_bind_and_dirtify
(
volume
,
context
,
FALSE
);
...
...
@@ -412,7 +408,7 @@ static void wined3d_volume_free_pbo(struct wined3d_volume *volume)
static
BOOL
volume_prepare_system_memory
(
struct
wined3d_volume
*
volume
)
{
if
(
volume
->
resource
.
allocatedM
emory
)
if
(
volume
->
resource
.
heap_m
emory
)
return
TRUE
;
if
(
!
wined3d_resource_allocate_sysmem
(
&
volume
->
resource
))
...
...
@@ -420,7 +416,6 @@ static BOOL volume_prepare_system_memory(struct wined3d_volume *volume)
ERR
(
"Failed to allocate system memory.
\n
"
);
return
FALSE
;
}
volume
->
resource
.
allocatedMemory
=
volume
->
resource
.
heap_memory
;
return
TRUE
;
}
...
...
@@ -674,7 +669,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
wined3d_volume_load_location
(
volume
,
context
,
WINED3D_LOCATION_SYSMEM
);
context_release
(
context
);
}
base_memory
=
volume
->
resource
.
allocatedM
emory
;
base_memory
=
volume
->
resource
.
heap_m
emory
;
}
TRACE
(
"Base memory pointer %p.
\n
"
,
base_memory
);
...
...
@@ -815,7 +810,6 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device
&&
gl_info
->
supported
[
ARB_PIXEL_BUFFER_OBJECT
])
{
wined3d_resource_free_sysmem
(
&
volume
->
resource
);
volume
->
resource
.
allocatedMemory
=
NULL
;
volume
->
flags
|=
WINED3D_VFLAG_PBO
;
}
...
...
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