summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-11-09 02:38:26 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-11-14 22:21:42 +0100
commit48a1687f515110b602c64ffbc27eacef3e57a575 (patch)
tree16a9945ee8d4f01e2d1a7c0dde0313464e1f9c18 /src/video_core/texture_cache
parentMerge pull request #3110 from greggameplayer/CompleteRGBA16UI (diff)
downloadyuzu-48a1687f515110b602c64ffbc27eacef3e57a575.tar
yuzu-48a1687f515110b602c64ffbc27eacef3e57a575.tar.gz
yuzu-48a1687f515110b602c64ffbc27eacef3e57a575.tar.bz2
yuzu-48a1687f515110b602c64ffbc27eacef3e57a575.tar.lz
yuzu-48a1687f515110b602c64ffbc27eacef3e57a575.tar.xz
yuzu-48a1687f515110b602c64ffbc27eacef3e57a575.tar.zst
yuzu-48a1687f515110b602c64ffbc27eacef3e57a575.zip
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/surface_params.cpp12
-rw-r--r--src/video_core/texture_cache/surface_params.h1
-rw-r--r--src/video_core/texture_cache/texture_cache.h9
3 files changed, 5 insertions, 17 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp
index 1e4d3fb79..04b5e8ba3 100644
--- a/src/video_core/texture_cache/surface_params.cpp
+++ b/src/video_core/texture_cache/surface_params.cpp
@@ -13,9 +13,6 @@
namespace VideoCommon {
-using VideoCore::Surface::ComponentTypeFromDepthFormat;
-using VideoCore::Surface::ComponentTypeFromRenderTarget;
-using VideoCore::Surface::ComponentTypeFromTexture;
using VideoCore::Surface::PixelFormat;
using VideoCore::Surface::PixelFormatFromDepthFormat;
using VideoCore::Surface::PixelFormatFromRenderTargetFormat;
@@ -99,7 +96,6 @@ SurfaceParams SurfaceParams::CreateForTexture(const Tegra::Texture::TICEntry& ti
}
params.type = GetFormatType(params.pixel_format);
}
- params.component_type = ComponentTypeFromTexture(tic.r_type.Value());
params.type = GetFormatType(params.pixel_format);
// TODO: on 1DBuffer we should use the tic info.
if (tic.IsBuffer()) {
@@ -140,7 +136,6 @@ SurfaceParams SurfaceParams::CreateForImage(const Tegra::Texture::TICEntry& tic,
params.pixel_format =
PixelFormatFromTextureFormat(tic.format, tic.r_type.Value(), params.srgb_conversion);
params.type = GetFormatType(params.pixel_format);
- params.component_type = ComponentTypeFromTexture(tic.r_type.Value());
params.type = GetFormatType(params.pixel_format);
params.target = ImageTypeToSurfaceTarget(entry.GetType());
// TODO: on 1DBuffer we should use the tic info.
@@ -181,7 +176,6 @@ SurfaceParams SurfaceParams::CreateForDepthBuffer(
params.block_depth = std::min(block_depth, 5U);
params.tile_width_spacing = 1;
params.pixel_format = PixelFormatFromDepthFormat(format);
- params.component_type = ComponentTypeFromDepthFormat(format);
params.type = GetFormatType(params.pixel_format);
params.width = zeta_width;
params.height = zeta_height;
@@ -206,7 +200,6 @@ SurfaceParams SurfaceParams::CreateForFramebuffer(Core::System& system, std::siz
params.block_depth = config.memory_layout.block_depth;
params.tile_width_spacing = 1;
params.pixel_format = PixelFormatFromRenderTargetFormat(config.format);
- params.component_type = ComponentTypeFromRenderTarget(config.format);
params.type = GetFormatType(params.pixel_format);
if (params.is_tiled) {
params.pitch = 0;
@@ -236,7 +229,6 @@ SurfaceParams SurfaceParams::CreateForFermiCopySurface(
params.block_depth = params.is_tiled ? std::min(config.BlockDepth(), 5U) : 0,
params.tile_width_spacing = 1;
params.pixel_format = PixelFormatFromRenderTargetFormat(config.format);
- params.component_type = ComponentTypeFromRenderTarget(config.format);
params.type = GetFormatType(params.pixel_format);
params.width = config.width;
params.height = config.height;
@@ -355,10 +347,10 @@ std::size_t SurfaceParams::GetInnerMipmapMemorySize(u32 level, bool as_host_size
bool SurfaceParams::operator==(const SurfaceParams& rhs) const {
return std::tie(is_tiled, block_width, block_height, block_depth, tile_width_spacing, width,
- height, depth, pitch, num_levels, pixel_format, component_type, type, target) ==
+ height, depth, pitch, num_levels, pixel_format, type, target) ==
std::tie(rhs.is_tiled, rhs.block_width, rhs.block_height, rhs.block_depth,
rhs.tile_width_spacing, rhs.width, rhs.height, rhs.depth, rhs.pitch,
- rhs.num_levels, rhs.pixel_format, rhs.component_type, rhs.type, rhs.target);
+ rhs.num_levels, rhs.pixel_format, rhs.type, rhs.target);
}
std::string SurfaceParams::TargetName() const {
diff --git a/src/video_core/texture_cache/surface_params.h b/src/video_core/texture_cache/surface_params.h
index c58e7f8a4..a84058869 100644
--- a/src/video_core/texture_cache/surface_params.h
+++ b/src/video_core/texture_cache/surface_params.h
@@ -248,7 +248,6 @@ public:
u32 num_levels;
u32 emulated_levels;
VideoCore::Surface::PixelFormat pixel_format;
- VideoCore::Surface::ComponentType component_type;
VideoCore::Surface::SurfaceType type;
VideoCore::Surface::SurfaceTarget target;
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 6a92b22d3..8074cc945 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -485,15 +485,13 @@ private:
GetSiblingFormat(cr_params.pixel_format) == params.pixel_format) {
SurfaceParams new_params = params;
new_params.pixel_format = cr_params.pixel_format;
- new_params.component_type = cr_params.component_type;
new_params.type = cr_params.type;
new_surface = GetUncachedSurface(gpu_addr, new_params);
} else {
new_surface = GetUncachedSurface(gpu_addr, params);
}
const auto& final_params = new_surface->GetSurfaceParams();
- if (cr_params.type != final_params.type ||
- (cr_params.component_type != final_params.component_type)) {
+ if (cr_params.type != final_params.type) {
BufferCopy(current_surface, new_surface);
} else {
std::vector<CopyParams> bricks = current_surface->BreakDown(final_params);
@@ -835,12 +833,11 @@ private:
}
}
- const auto inherit_format = ([](SurfaceParams& to, TSurface from) {
+ const auto inherit_format = [](SurfaceParams& to, TSurface from) {
const SurfaceParams& params = from->GetSurfaceParams();
to.pixel_format = params.pixel_format;
- to.component_type = params.component_type;
to.type = params.type;
- });
+ };
// Now we got the cases where one or both is Depth and the other is not known
if (!incomplete_src) {
inherit_format(src_params, deduced_src.surface);