summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-06-11 13:20:27 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:38:34 +0200
commitb01f9c8a7090fa056ca564593eabcebab946ef41 (patch)
tree5f231b6ee3552e609c718f849b8312dd95ed48d0
parenttexture_cache: correct mutex locks (diff)
downloadyuzu-b01f9c8a7090fa056ca564593eabcebab946ef41.tar
yuzu-b01f9c8a7090fa056ca564593eabcebab946ef41.tar.gz
yuzu-b01f9c8a7090fa056ca564593eabcebab946ef41.tar.bz2
yuzu-b01f9c8a7090fa056ca564593eabcebab946ef41.tar.lz
yuzu-b01f9c8a7090fa056ca564593eabcebab946ef41.tar.xz
yuzu-b01f9c8a7090fa056ca564593eabcebab946ef41.tar.zst
yuzu-b01f9c8a7090fa056ca564593eabcebab946ef41.zip
-rw-r--r--src/video_core/renderer_opengl/gl_device.cpp1
-rw-r--r--src/video_core/renderer_opengl/gl_device.h5
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp13
-rw-r--r--src/video_core/texture_cache/texture_cache.h9
4 files changed, 6 insertions, 22 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp
index ad15ea54e..65a88b06c 100644
--- a/src/video_core/renderer_opengl/gl_device.cpp
+++ b/src/video_core/renderer_opengl/gl_device.cpp
@@ -28,7 +28,6 @@ Device::Device() {
max_varyings = GetInteger<u32>(GL_MAX_VARYING_VECTORS);
has_variable_aoffi = TestVariableAoffi();
has_component_indexing_bug = TestComponentIndexingBug();
- is_turing_plus = GLAD_GL_NV_mesh_shader;
}
Device::Device(std::nullptr_t) {
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h
index 1afe16779..8c8c93760 100644
--- a/src/video_core/renderer_opengl/gl_device.h
+++ b/src/video_core/renderer_opengl/gl_device.h
@@ -34,10 +34,6 @@ public:
return has_component_indexing_bug;
}
- bool IsTuringGPU() const {
- return is_turing_plus;
- }
-
private:
static bool TestVariableAoffi();
static bool TestComponentIndexingBug();
@@ -47,7 +43,6 @@ private:
u32 max_varyings{};
bool has_variable_aoffi{};
bool has_component_indexing_bug{};
- bool is_turing_plus{};
};
} // namespace OpenGL
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index 71f6888c6..7c1d14138 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -439,7 +439,6 @@ TextureCacheOpenGL::TextureCacheOpenGL(Core::System& system,
VideoCore::RasterizerInterface& rasterizer,
const Device& device)
: TextureCacheBase{system, rasterizer} {
- support_info.depth_color_image_copies = !device.IsTuringGPU();
src_framebuffer.Create();
dst_framebuffer.Create();
}
@@ -452,13 +451,11 @@ Surface TextureCacheOpenGL::CreateSurface(GPUVAddr gpu_addr, const SurfaceParams
void TextureCacheOpenGL::ImageCopy(Surface& src_surface, Surface& dst_surface,
const VideoCommon::CopyParams& copy_params) {
- if (!support_info.depth_color_image_copies) {
- const auto& src_params = src_surface->GetSurfaceParams();
- const auto& dst_params = dst_surface->GetSurfaceParams();
- if (src_params.type != dst_params.type) {
- // A fallback is needed
- return;
- }
+ const auto& src_params = src_surface->GetSurfaceParams();
+ const auto& dst_params = dst_surface->GetSurfaceParams();
+ if (src_params.type != dst_params.type) {
+ // A fallback is needed
+ return;
}
const auto src_handle = src_surface->GetTexture();
const auto src_target = src_surface->GetTarget();
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 503bd2b43..c95b1b976 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -218,12 +218,6 @@ public:
}
protected:
- // This structure is used for communicating with the backend, on which behaviors
- // it supports and what not, to avoid assuming certain things about hardware.
- // The backend is RESPONSIBLE for filling this settings on creation.
- struct Support {
- bool depth_color_image_copies;
- } support_info;
TextureCache(Core::System& system, VideoCore::RasterizerInterface& rasterizer)
: system{system}, rasterizer{rasterizer} {
@@ -389,8 +383,7 @@ private:
const auto gpu_addr = current_surface->GetGpuAddr();
TSurface new_surface = GetUncachedSurface(gpu_addr, params);
const auto& cr_params = current_surface->GetSurfaceParams();
- if (cr_params.type != params.type && (!support_info.depth_color_image_copies ||
- cr_params.component_type != params.component_type)) {
+ if (cr_params.type != params.type || (cr_params.component_type != params.component_type)) {
BufferCopy(current_surface, new_surface);
} else {
std::vector<CopyParams> bricks = current_surface->BreakDown(params);