mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-30 20:03:08 +00:00
GL: do not use PBO for Raspberry
Currently Raspberry has better performance without PBO.
This commit is contained in:
@@ -75,12 +75,12 @@
|
|||||||
#else
|
#else
|
||||||
#include <csetjmp>
|
#include <csetjmp>
|
||||||
#endif
|
#endif
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <iostream>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "gl_context.h"
|
#include "gl_context.h"
|
||||||
@@ -95,12 +95,6 @@
|
|||||||
#include "video_display/splashscreen.h"
|
#include "video_display/splashscreen.h"
|
||||||
#include "tv.h"
|
#include "tv.h"
|
||||||
|
|
||||||
#if __cplusplus >= 201703L
|
|
||||||
#define MAYBE_UNUSED [[maybe_unused]]
|
|
||||||
#else
|
|
||||||
#define MAYBE_UNUSED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAGIC_GL 0x1331018e
|
#define MAGIC_GL 0x1331018e
|
||||||
#define MOD_NAME "[GL] "
|
#define MOD_NAME "[GL] "
|
||||||
#define DEFAULT_WIN_NAME "Ultragrid - OpenGL Display"
|
#define DEFAULT_WIN_NAME "Ultragrid - OpenGL Display"
|
||||||
@@ -370,7 +364,7 @@ static void glut_resize_window(bool fs, int height, double aspect, double window
|
|||||||
static void display_gl_set_sync_on_vblank(int value);
|
static void display_gl_set_sync_on_vblank(int value);
|
||||||
static void screenshot(struct video_frame *frame);
|
static void screenshot(struct video_frame *frame);
|
||||||
static void upload_texture(struct state_gl *s, char *data);
|
static void upload_texture(struct state_gl *s, char *data);
|
||||||
MAYBE_UNUSED static bool check_rpi_pbo_quirks();
|
static bool check_rpi_pbo_quirks();
|
||||||
|
|
||||||
#ifdef HWACC_VDPAU
|
#ifdef HWACC_VDPAU
|
||||||
static void gl_render_vdpau(struct state_gl *s, char *data) ATTRIBUTE(unused);
|
static void gl_render_vdpau(struct state_gl *s, char *data) ATTRIBUTE(unused);
|
||||||
@@ -444,6 +438,7 @@ static void gl_load_splashscreen(struct state_gl *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void * display_gl_init(struct module *parent, const char *fmt, unsigned int flags) {
|
static void * display_gl_init(struct module *parent, const char *fmt, unsigned int flags) {
|
||||||
|
int use_pbo = -1; // default
|
||||||
UNUSED(flags);
|
UNUSED(flags);
|
||||||
if (gl) {
|
if (gl) {
|
||||||
LOG(LOG_LEVEL_ERROR) << "Multiple instances of GL display is disallowed!\n";
|
LOG(LOG_LEVEL_ERROR) << "Multiple instances of GL display is disallowed!\n";
|
||||||
@@ -507,7 +502,7 @@ static void * display_gl_init(struct module *parent, const char *fmt, unsigned i
|
|||||||
} else if (!strcasecmp(tok, "hide-window")) {
|
} else if (!strcasecmp(tok, "hide-window")) {
|
||||||
s->hide_window = true;
|
s->hide_window = true;
|
||||||
} else if (strcasecmp(tok, "pbo") == 0 || strcasecmp(tok, "nopbo") == 0) {
|
} else if (strcasecmp(tok, "pbo") == 0 || strcasecmp(tok, "nopbo") == 0) {
|
||||||
s->use_pbo = strcasecmp(tok, "pbo") == 0;
|
use_pbo = strcasecmp(tok, "pbo") == 0 ? 1 : 0;
|
||||||
} else if(!strncmp(tok, "size=",
|
} else if(!strncmp(tok, "size=",
|
||||||
strlen("size="))) {
|
strlen("size="))) {
|
||||||
s->window_size_factor =
|
s->window_size_factor =
|
||||||
@@ -533,6 +528,8 @@ static void * display_gl_init(struct module *parent, const char *fmt, unsigned i
|
|||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s->use_pbo = use_pbo == -1 ? check_rpi_pbo_quirks() : use_pbo; // don't use PBO for Raspberry Pi (better performance)
|
||||||
|
|
||||||
log_msg(LOG_LEVEL_INFO,"GL setup: fullscreen: %s, deinterlace: %s\n",
|
log_msg(LOG_LEVEL_INFO,"GL setup: fullscreen: %s, deinterlace: %s\n",
|
||||||
s->fs ? "ON" : "OFF", s->deinterlace ? "ON" : "OFF");
|
s->fs ? "ON" : "OFF", s->deinterlace ? "ON" : "OFF");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user