foxygit / doom Log in
commit 3601d9b2393a11dc6819a5cb0e9037e3bc20bd10
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sun Feb 5 18:57:53 2017 -0500
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Sun Feb 5 18:57:53 2017 -0500

    video: Bump default pixel limit to 16M pixels.

    This is enough to cover both the DCI 4K (4096 × 2160) and UHD-1
    (3840 × 2160) 4K monitor standards. This should be okay since 16M * 4 =
    64MB of texture RAM; it's rare (according to the Steam hardware survey)
    to have less than 256MB of RAM nowadays.

    This is a slight tweak to the fix on #859. It shouldn't make much, if
    any, visual difference over 1600x1200, but if we can make use of the
    extra RAM and gain a marginal improvement then I don't see any reason
    not to.
---
 src/i_video.c       | 2 +-
 src/m_config.c      | 4 ++--
 src/setup/display.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/i_video.c b/src/i_video.c
index 26623e5f..99290745 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -116,7 +116,7 @@ int fullscreen_width = 0, fullscreen_height = 0;

 // Maximum number of pixels to use for intermediate scale buffer.

-static int max_scaling_buffer_pixels = 1600 * 1200;
+static int max_scaling_buffer_pixels = 16000000;

 // Run in full screen mode?  (int type for config code)

diff --git a/src/m_config.c b/src/m_config.c
index 38e17ccf..bf215e27 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -766,8 +766,8 @@ static default_t extra_defaults_list[] =
     //!
     // Maximum number of pixels to use for intermediate scaling buffer.
     // More pixels mean that the screen can be rendered more precisely,
-    // but there are diminishing returns on quality. The default limits
-    // to a 1600x1200 buffer.
+    // but there are diminishing returns on quality. The default limits to
+    // 16,000,000 pixels, which is enough to cover 4K monitor standards.

     CONFIG_VARIABLE_INT(max_scaling_buffer_pixels),

diff --git a/src/setup/display.c b/src/setup/display.c
index 2a007918..9db3cc57 100644
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -71,7 +71,7 @@ static int fullscreen = 1;
 static int fullscreen_width = 0, fullscreen_height = 0;
 static int window_width = 640, window_height = 480;
 static int startup_delay = 1000;
-static int max_scaling_buffer_pixels = 1600 * 1200;
+static int max_scaling_buffer_pixels = 16000000;
 static int usegamma = 0;

 int graphical_startup = 1;