From 15e57a0235ddb3b617a364dd12ff10a268f6a297 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Wed, 23 Dec 2020 11:25:00 +0000 Subject: [PATCH] Remove buffer orphaning options project settings These were only put in for the betas, in order to test hypotheses for stalling on Macs. It seems that most of the problems in the Mac editor have been solved by fixing the excessive redraw_requests. As a result no one has reported any results from these options, but in future we will be able to refer users to try the beta versions, so there is no need to include them in the stable release. Indeed they are only likely to cause confusion. --- drivers/gles2/rasterizer_canvas_base_gles2.cpp | 2 +- drivers/gles2/rasterizer_storage_gles2.cpp | 1 - drivers/gles3/rasterizer_canvas_base_gles3.cpp | 2 +- drivers/gles3/rasterizer_storage_gles3.cpp | 2 -- drivers/gles_common/rasterizer_canvas_batcher.h | 4 ---- servers/visual_server.cpp | 5 ----- 6 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/gles2/rasterizer_canvas_base_gles2.cpp b/drivers/gles2/rasterizer_canvas_base_gles2.cpp index edd2571f7cf..2a6a53cc44b 100644 --- a/drivers/gles2/rasterizer_canvas_base_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_base_gles2.cpp @@ -947,7 +947,7 @@ void RasterizerCanvasBaseGLES2::draw_lens_distortion_rect(const Rect2 &p_rect, f void RasterizerCanvasBaseGLES2::initialize() { - bool flag_stream = GLOBAL_GET("rendering/options/api_usage_legacy/flag_stream"); + bool flag_stream = false; if (flag_stream) _buffer_upload_usage_flag = GL_STREAM_DRAW; else diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 3f811168c3f..1477abd4d7d 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -6299,7 +6299,6 @@ void RasterizerStorageGLES2::initialize() { config.force_vertex_shading = GLOBAL_GET("rendering/quality/shading/force_vertex_shading"); config.use_fast_texture_filter = GLOBAL_GET("rendering/quality/filters/use_nearest_mipmap_filter"); - config.should_orphan = GLOBAL_GET("rendering/options/api_usage_legacy/orphan_buffers"); } void RasterizerStorageGLES2::finalize() { diff --git a/drivers/gles3/rasterizer_canvas_base_gles3.cpp b/drivers/gles3/rasterizer_canvas_base_gles3.cpp index 6192c959943..e2e56da85f6 100644 --- a/drivers/gles3/rasterizer_canvas_base_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_base_gles3.cpp @@ -1137,7 +1137,7 @@ void RasterizerCanvasBaseGLES3::draw_window_margins(int *black_margin, RID *blac void RasterizerCanvasBaseGLES3::initialize() { - bool flag_stream = GLOBAL_GET("rendering/options/api_usage_legacy/flag_stream"); + bool flag_stream = false; if (flag_stream) { _buffer_upload_usage_flag = GL_STREAM_DRAW; } else { diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index c22f12816cc..3680b2a5f4a 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -8570,8 +8570,6 @@ void RasterizerStorageGLES3::initialize() { } } } - - config.should_orphan = GLOBAL_GET("rendering/options/api_usage_legacy/orphan_buffers"); } void RasterizerStorageGLES3::finalize() { diff --git a/drivers/gles_common/rasterizer_canvas_batcher.h b/drivers/gles_common/rasterizer_canvas_batcher.h index 73286e70522..84ae9b43081 100644 --- a/drivers/gles_common/rasterizer_canvas_batcher.h +++ b/drivers/gles_common/rasterizer_canvas_batcher.h @@ -1052,10 +1052,6 @@ PREAMBLE(void)::batch_initialize() { bdata.settings_light_max_join_items = CLAMP(bdata.settings_light_max_join_items, 0, 65535); bdata.settings_item_reordering_lookahead = CLAMP(bdata.settings_item_reordering_lookahead, 0, 65535); - // allow user to override the api usage techniques using project settings - bdata.buffer_mode_batch_upload_send_null = GLOBAL_GET("rendering/options/api_usage_batching/send_null"); - bdata.buffer_mode_batch_upload_flag_stream = GLOBAL_GET("rendering/options/api_usage_batching/flag_stream"); - // for debug purposes, output a string with the batching options String batching_options_string = "OpenGL ES Batching: "; if (bdata.settings_use_batching) { diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index a138af74c0d..e32190ff366 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -2450,11 +2450,6 @@ VisualServer::VisualServer() { GLOBAL_DEF("rendering/quality/2d/ninepatch_mode", 0); ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/2d/ninepatch_mode", PropertyInfo(Variant::INT, "rendering/quality/2d/ninepatch_mode", PROPERTY_HINT_ENUM, "Default,Scaling")); - GLOBAL_DEF_RST("rendering/options/api_usage_batching/send_null", true); - GLOBAL_DEF_RST("rendering/options/api_usage_batching/flag_stream", false); - GLOBAL_DEF_RST("rendering/options/api_usage_legacy/flag_stream", false); - GLOBAL_DEF_RST("rendering/options/api_usage_legacy/orphan_buffers", true); - GLOBAL_DEF("rendering/batching/options/use_batching", true); GLOBAL_DEF_RST("rendering/batching/options/use_batching_in_editor", true); GLOBAL_DEF("rendering/batching/options/single_rect_fallback", false);