Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wine
vkd3d
Commits
4d540d5b
Commit
4d540d5b
authored
7 years ago
by
Sven Hesse
Browse files
Options
Downloads
Patches
Plain Diff
libs/vkd3d: Delete DXGI_FORMAT_UNKNOWN from the formats table again.
Put it into a local in GetCopyableFootprints() instead.
parent
2f5ba350
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libs/vkd3d/device.c
+13
-3
13 additions, 3 deletions
libs/vkd3d/device.c
libs/vkd3d/utils.c
+0
-1
0 additions, 1 deletion
libs/vkd3d/utils.c
with
13 additions
and
4 deletions
libs/vkd3d/device.c
+
13
−
3
View file @
4d540d5b
...
...
@@ -1121,6 +1121,8 @@ static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints(ID3D12Device *i
UINT64
base_offset
,
D3D12_PLACED_SUBRESOURCE_FOOTPRINT
*
layouts
,
UINT
*
row_counts
,
UINT64
*
row_sizes
,
UINT64
*
total_bytes
)
{
static
const
struct
vkd3d_format
vkd3d_format_unknown
=
{
DXGI_FORMAT_UNKNOWN
,
VK_FORMAT_UNDEFINED
,
1
,
1
,
1
,
1
,
0
};
unsigned
int
i
,
sub_resource_idx
,
miplevel_idx
,
width
,
height
,
row_count
,
row_size
,
row_pitch
;
unsigned
int
array_size
,
depth
;
const
struct
vkd3d_format
*
format
;
...
...
@@ -1139,10 +1141,18 @@ static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints(ID3D12Device *i
memset
(
row_sizes
,
0xff
,
sizeof
(
*
row_sizes
)
*
sub_resource_count
);
if
(
total_bytes
)
*
total_bytes
=
~
(
UINT64
)
0
;
if
(
!
(
format
=
vkd3d_get_format
(
desc
->
Format
)))
if
(
desc
->
Dimension
!=
D3D12_RESOURCE_DIMENSION_BUFFER
)
{
WARN
(
"Invalid format %#x.
\n
"
,
desc
->
Format
);
return
;
if
(
!
(
format
=
vkd3d_get_format
(
desc
->
Format
)))
{
WARN
(
"Invalid format %#x.
\n
"
,
desc
->
Format
);
return
;
}
}
else
{
format
=
&
vkd3d_format_unknown
;
}
switch
(
desc
->
Dimension
)
...
...
This diff is collapsed.
Click to expand it.
libs/vkd3d/utils.c
+
0
−
1
View file @
4d540d5b
...
...
@@ -20,7 +20,6 @@
static
const
struct
vkd3d_format
vkd3d_formats
[]
=
{
{
DXGI_FORMAT_UNKNOWN
,
VK_FORMAT_UNDEFINED
,
1
,
1
,
1
,
1
,
0
},
{
DXGI_FORMAT_R32G32B32A32_FLOAT
,
VK_FORMAT_R32G32B32A32_SFLOAT
,
16
,
1
,
1
,
1
,
VK_IMAGE_ASPECT_COLOR_BIT
},
{
DXGI_FORMAT_R32G32B32A32_UINT
,
VK_FORMAT_R32G32B32A32_UINT
,
16
,
1
,
1
,
1
,
VK_IMAGE_ASPECT_COLOR_BIT
},
{
DXGI_FORMAT_R32G32B32A32_SINT
,
VK_FORMAT_R32G32B32A32_SINT
,
16
,
1
,
1
,
1
,
VK_IMAGE_ASPECT_COLOR_BIT
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment