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
4451bf47
Commit
4451bf47
authored
Jun 06, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Read format flags from the volume container.
parent
76615497
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
resource.c
dlls/wined3d/resource.c
+3
-2
volume.c
dlls/wined3d/volume.c
+4
-4
No files found.
dlls/wined3d/resource.c
View file @
4451bf47
...
...
@@ -87,7 +87,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
resource
->
type
=
type
;
resource
->
gl_type
=
gl_type
;
resource
->
format
=
format
;
resource
->
format_flags
=
format
->
flags
[
gl_type
];
if
(
gl_type
<
WINED3D_GL_RES_TYPE_COUNT
)
resource
->
format_flags
=
format
->
flags
[
gl_type
];
resource
->
multisample_type
=
multisample_type
;
resource
->
multisample_quality
=
multisample_quality
;
resource
->
usage
=
usage
;
...
...
@@ -105,7 +106,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
resource
->
resource_ops
=
resource_ops
;
resource
->
map_binding
=
WINED3D_LOCATION_SYSMEM
;
if
(
pool
!=
WINED3D_POOL_SCRATCH
&&
type
!=
WINED3D_RTYPE_BUFFER
)
if
(
pool
!=
WINED3D_POOL_SCRATCH
&&
type
!=
WINED3D_RTYPE_BUFFER
&&
gl_type
<
WINED3D_GL_RES_TYPE_COUNT
)
{
if
((
usage
&
WINED3DUSAGE_RENDERTARGET
)
&&
!
(
resource
->
format_flags
&
WINED3DFMT_FLAG_RENDERTARGET
))
{
...
...
dlls/wined3d/volume.c
View file @
4451bf47
...
...
@@ -44,7 +44,7 @@ void wined3d_volume_get_pitch(const struct wined3d_volume *volume, UINT *row_pit
{
const
struct
wined3d_format
*
format
=
volume
->
resource
.
format
;
if
(
volume
->
resource
.
format_flags
&
WINED3DFMT_FLAG_BLOCKS
)
if
(
volume
->
container
->
resource
.
format_flags
&
WINED3DFMT_FLAG_BLOCKS
)
{
/* Since compressed formats are block based, pitch means the amount of
* bytes to the next row of block rather than the next row of pixels. */
...
...
@@ -89,7 +89,7 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
if
(
data
->
buffer_object
)
ERR
(
"Loading a converted volume from a PBO.
\n
"
);
if
(
volume
->
resource
.
format_flags
&
WINED3DFMT_FLAG_BLOCKS
)
if
(
volume
->
container
->
resource
.
format_flags
&
WINED3DFMT_FLAG_BLOCKS
)
ERR
(
"Converting a block-based format.
\n
"
);
dst_row_pitch
=
width
*
format
->
conv_byte_count
;
...
...
@@ -551,7 +551,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
const
struct
wined3d_gl_info
*
gl_info
;
BYTE
*
base_memory
;
const
struct
wined3d_format
*
format
=
volume
->
resource
.
format
;
const
unsigned
int
fmt_flags
=
volume
->
resource
.
format_flags
;
const
unsigned
int
fmt_flags
=
volume
->
container
->
resource
.
format_flags
;
TRACE
(
"volume %p, map_desc %p, box %p, flags %#x.
\n
"
,
volume
,
map_desc
,
box
,
flags
);
...
...
@@ -759,7 +759,7 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture
size
=
wined3d_format_calculate_size
(
format
,
device
->
surface_alignment
,
desc
->
width
,
desc
->
height
,
desc
->
depth
);
if
(
FAILED
(
hr
=
resource_init
(
&
volume
->
resource
,
device
,
WINED3D_RTYPE_VOLUME
,
container
->
resource
.
gl_type
,
if
(
FAILED
(
hr
=
resource_init
(
&
volume
->
resource
,
device
,
WINED3D_RTYPE_VOLUME
,
WINED3D_GL_RES_TYPE_COUNT
,
format
,
WINED3D_MULTISAMPLE_NONE
,
0
,
desc
->
usage
,
desc
->
pool
,
desc
->
width
,
desc
->
height
,
desc
->
depth
,
size
,
NULL
,
&
wined3d_null_parent_ops
,
&
volume_resource_ops
)))
{
...
...
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