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
89c3d6a2
There was an error fetching the commit references. Please try again later.
Commit
89c3d6a2
authored
6 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
gl_rasterizer_cache: Treat Depth formats differently from DepthStencil.
parent
69236e5a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+10
-8
10 additions, 8 deletions
src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
src/video_core/renderer_opengl/gl_rasterizer_cache.h
+16
-8
16 additions, 8 deletions
src/video_core/renderer_opengl/gl_rasterizer_cache.h
with
26 additions
and
16 deletions
src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+
10
−
8
View file @
89c3d6a2
...
...
@@ -142,14 +142,16 @@ static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_form
{
GL_RG32UI
,
GL_RG_INTEGER
,
GL_UNSIGNED_INT
,
ComponentType
::
UInt
,
false
},
// RG32UI
{
GL_R32UI
,
GL_RED_INTEGER
,
GL_UNSIGNED_INT
,
ComponentType
::
UInt
,
false
},
// R32UI
// Depth formats
{
GL_DEPTH_COMPONENT32F
,
GL_DEPTH_COMPONENT
,
GL_FLOAT
,
ComponentType
::
Float
,
false
},
// Z32F
{
GL_DEPTH_COMPONENT16
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_SHORT
,
ComponentType
::
UNorm
,
false
},
// Z16
// DepthStencil formats
{
GL_DEPTH24_STENCIL8
,
GL_DEPTH_STENCIL
,
GL_UNSIGNED_INT_24_8
,
ComponentType
::
UNorm
,
false
},
// Z24S8
{
GL_DEPTH24_STENCIL8
,
GL_DEPTH_STENCIL
,
GL_UNSIGNED_INT_24_8
,
ComponentType
::
UNorm
,
false
},
// S8Z24
{
GL_DEPTH_COMPONENT32F
,
GL_DEPTH_COMPONENT
,
GL_FLOAT
,
ComponentType
::
Float
,
false
},
// Z32F
{
GL_DEPTH_COMPONENT16
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_SHORT
,
ComponentType
::
UNorm
,
false
},
// Z16
false
},
// S8Z24
{
GL_DEPTH32F_STENCIL8
,
GL_DEPTH_STENCIL
,
GL_FLOAT_32_UNSIGNED_INT_24_8_REV
,
ComponentType
::
Float
,
false
},
// Z32FS8
}};
...
...
@@ -283,10 +285,10 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU
MortonCopy
<
true
,
PixelFormat
::
RG8S
>
,
MortonCopy
<
true
,
PixelFormat
::
RG32UI
>
,
MortonCopy
<
true
,
PixelFormat
::
R32UI
>
,
MortonCopy
<
true
,
PixelFormat
::
Z24S8
>
,
MortonCopy
<
true
,
PixelFormat
::
S8Z24
>
,
MortonCopy
<
true
,
PixelFormat
::
Z32F
>
,
MortonCopy
<
true
,
PixelFormat
::
Z16
>
,
MortonCopy
<
true
,
PixelFormat
::
Z24S8
>
,
MortonCopy
<
true
,
PixelFormat
::
S8Z24
>
,
MortonCopy
<
true
,
PixelFormat
::
Z32FS8
>
,
// clang-format on
};
...
...
@@ -339,10 +341,10 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU
MortonCopy
<
false
,
PixelFormat
::
RG8S
>
,
MortonCopy
<
false
,
PixelFormat
::
RG32UI
>
,
MortonCopy
<
false
,
PixelFormat
::
R32UI
>
,
MortonCopy
<
false
,
PixelFormat
::
Z24S8
>
,
MortonCopy
<
false
,
PixelFormat
::
S8Z24
>
,
MortonCopy
<
false
,
PixelFormat
::
Z32F
>
,
MortonCopy
<
false
,
PixelFormat
::
Z16
>
,
MortonCopy
<
false
,
PixelFormat
::
Z24S8
>
,
MortonCopy
<
false
,
PixelFormat
::
S8Z24
>
,
MortonCopy
<
false
,
PixelFormat
::
Z32FS8
>
,
// clang-format on
};
...
...
This diff is collapsed.
Click to expand it.
src/video_core/renderer_opengl/gl_rasterizer_cache.h
+
16
−
8
View file @
89c3d6a2
...
...
@@ -68,11 +68,15 @@ struct SurfaceParams {
MaxColorFormat
,
// Depth formats
Z32F
=
42
,
Z16
=
43
,
MaxDepthFormat
,
// DepthStencil formats
Z24S8
=
42
,
S8Z24
=
43
,
Z32F
=
44
,
Z16
=
45
,
Z24S8
=
44
,
S8Z24
=
45
,
Z32FS8
=
46
,
MaxDepthStencilFormat
,
...
...
@@ -153,10 +157,10 @@ struct SurfaceParams {
1
,
// RG8S
1
,
// RG32UI
1
,
// R32UI
1
,
// Z24S8
1
,
// S8Z24
1
,
// Z32F
1
,
// Z16
1
,
// Z24S8
1
,
// S8Z24
1
,
// Z32FS8
}};
...
...
@@ -211,10 +215,10 @@ struct SurfaceParams {
16
,
// RG8S
64
,
// RG32UI
32
,
// R32UI
32
,
// Z24S8
32
,
// S8Z24
32
,
// Z32F
16
,
// Z16
32
,
// Z24S8
32
,
// S8Z24
64
,
// Z32FS8
}};
...
...
@@ -587,6 +591,10 @@ struct SurfaceParams {
return
SurfaceType
::
ColorTexture
;
}
if
(
static_cast
<
size_t
>
(
pixel_format
)
<
static_cast
<
size_t
>
(
PixelFormat
::
MaxDepthFormat
))
{
return
SurfaceType
::
Depth
;
}
if
(
static_cast
<
size_t
>
(
pixel_format
)
<
static_cast
<
size_t
>
(
PixelFormat
::
MaxDepthStencilFormat
))
{
return
SurfaceType
::
DepthStencil
;
...
...
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