Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
03d489dc
There was an error fetching the commit references. Please try again later.
Commit
03d489dc
authored
5 years ago
by
Fernando Sahmkow
Committed by
ReinUsesLisp
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
texture_cache: Initialize all siblings to invalid pixel format.
parent
9422cf7c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/video_core/texture_cache/texture_cache.h
+15
-6
15 additions, 6 deletions
src/video_core/texture_cache/texture_cache.h
with
15 additions
and
6 deletions
src/video_core/texture_cache/texture_cache.h
+
15
−
6
View file @
03d489dc
...
...
@@ -227,12 +227,18 @@ protected:
}
SetEmptyDepthBuffer
();
staging_cache
.
SetSize
(
2
);
siblings_table
[
PixelFormat
::
Z16
]
=
PixelFormat
::
R16F
;
siblings_table
[
PixelFormat
::
Z32F
]
=
PixelFormat
::
R32F
;
siblings_table
[
PixelFormat
::
Z32FS8
]
=
PixelFormat
::
RG32F
;
siblings_table
[
PixelFormat
::
R16F
]
=
PixelFormat
::
Z16
;
siblings_table
[
PixelFormat
::
R32F
]
=
PixelFormat
::
Z32F
;
siblings_table
[
PixelFormat
::
RG32F
]
=
PixelFormat
::
Z32FS8
;
auto
make_siblings
=
([
this
](
PixelFormat
a
,
PixelFormat
b
)
{
siblings_table
[
a
]
=
b
;
siblings_table
[
b
]
=
a
;
});
const
u32
max_formats
=
static_cast
<
u32
>
(
PixelFormat
::
Max
);
siblings_table
.
reserve
(
max_formats
);
for
(
u32
i
=
0
;
i
<
max_formats
;
i
++
)
{
siblings_table
[
static_cast
<
PixelFormat
>
(
i
)]
=
PixelFormat
::
Invalid
;
}
make_siblings
(
PixelFormat
::
Z16
,
PixelFormat
::
R16F
);
make_siblings
(
PixelFormat
::
Z32F
,
PixelFormat
::
R32F
);
make_siblings
(
PixelFormat
::
Z32FS8
,
PixelFormat
::
RG32F
);
}
~
TextureCache
()
=
default
;
...
...
@@ -766,6 +772,9 @@ private:
// Guards the cache for protection conflicts.
bool
guard_cache
{};
// The siblings table is for formats that can inter exchange with one another
// without causing issues. This is only valid when a conflict occurs on a non
// rendering use.
std
::
unordered_map
<
PixelFormat
,
PixelFormat
>
siblings_table
;
// The internal Cache is different for the Texture Cache. It's based on buckets
...
...
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