Merge branch 'master' into medusa

This commit is contained in:
Vicki Pfau 2020-08-05 21:57:13 -07:00
commit e6d32707fc
15 changed files with 59 additions and 80 deletions

View File

@ -67,6 +67,7 @@ Other fixes:
- Qt: Fix static compilation in MinGW (fixes mgba.io/i/1769)
- Qt: Fix a race condition in the frame inspector
- SM83: Simplify register pair access on big endian
- VFS: Fix directory node listing on some filesystems
Misc:
- 3DS: Use "wide mode" where applicable for slightly better filtering
- GB: Allow pausing event loop while CPU is blocked

View File

@ -71,7 +71,7 @@ if(NOT LIBMGBA_ONLY)
set(SKIP_LIBRARY OFF CACHE BOOL "Skip building the library (useful for only building libretro or OpenEmu cores)")
set(BUILD_GL ON CACHE BOOL "Build with OpenGL")
set(BUILD_GLES2 ON CACHE BOOL "Build with OpenGL|ES 2")
set(BUILD_GLES3 ON CACHE BOOL "Build with OpenGL|ES 3")
set(BUILD_GLES3 OFF CACHE BOOL "Build with OpenGL|ES 3")
set(USE_EPOXY ON CACHE STRING "Build with libepoxy")
set(DISABLE_DEPS OFF CACHE BOOL "Build without dependencies")
set(DISTBUILD OFF CACHE BOOL "Build distribution packages")
@ -432,7 +432,6 @@ if(CMAKE_SYSTEM_NAME MATCHES ".*BSD|DragonFly")
else()
find_feature(USE_EDITLINE "libedit")
endif()
if(BUILD_GL)
find_package(OpenGL QUIET)
if(NOT OPENGL_FOUND)
@ -442,26 +441,18 @@ endif()
if(NOT BUILD_GL)
set(OPENGL_LIBRARY "" CACHE PATH "" FORCE)
endif()
if(BUILD_GLES2 AND NOT BUILD_RASPI)
if(BUILD_GLES2 AND NOT BUILD_RASPI AND NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|Darwin|Linux|.*BSD|DragonFly|Haiku)$")
find_path(OPENGLES2_INCLUDE_DIR NAMES GLES2/gl2.h)
find_library(OPENGLES2_LIBRARY NAMES GLESv2 GLESv2_CM)
if(NOT OPENGLES2_INCLUDE_DIR OR NOT OPENGLES2_LIBRARY)
set(BUILD_GLES2 OFF CACHE BOOL "OpenGL|ES 2 not found" FORCE)
endif()
endif()
if(BUILD_GLES3)
find_path(OPENGLES3_INCLUDE_DIR NAMES GLES3/gl3.h)
find_library(OPENGLES3_LIBRARY NAMES GLESv3 GLESv2)
if(NOT OPENGLES3_INCLUDE_DIR OR NOT OPENGLES3_LIBRARY)
set(BUILD_GLES3 OFF CACHE BOOL "OpenGL|ES 3 not found" FORCE)
endif()
if(NOT BUILD_GLES2)
set(OPENGLES2_LIBRARY "" CACHE PATH "" FORCE)
endif()
if(BUILD_GL)
list(APPEND OS_SRC
${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c
${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c)
list(APPEND OS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c)
list(APPEND DEPENDENCY_LIB ${OPENGL_LIBRARY})
include_directories(${OPENGL_INCLUDE_DIR})
endif()
@ -471,9 +462,11 @@ if(BUILD_GLES2)
include_directories(${OPENGLES2_INCLUDE_DIR})
endif()
if(BUILD_GLES3)
list(APPEND OS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c)
list(APPEND DEPENDENCY_LIB ${OPENGLES3_LIBRARY})
include_directories(${OPENGLES3_INCLUDE_DIR})
find_path(OPENGLES3_INCLUDE_DIR NAMES GLES3/gl3.h)
find_library(OPENGLES3_LIBRARY NAMES GLESv3 GLESv2)
if(NOT OPENGLES3_INCLUDE_DIR OR NOT OPENGLES3_LIBRARY)
set(BUILD_GLES3 OFF CACHE BOOL "OpenGL|ES 3 not found" FORCE)
endif()
endif()
if(DISABLE_DEPS)
@ -725,7 +718,7 @@ endif()
if(USE_EPOXY)
list(APPEND OS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c)
add_definitions(-DBUILD_GL -DBUILD_GLES2 -DBUILD_GLES3)
add_definitions(-DBUILD_GL -DBUILD_GLES2)
list(APPEND FEATURES EPOXY)
include_directories(AFTER ${EPOXY_INCLUDE_DIRS})
link_directories(${EPOXY_LIBRARY_DIRS})
@ -932,7 +925,7 @@ else()
endif()
if(BUILD_GL)
add_definitions(-DBUILD_GL -DBUILD_GLES2 -DBUILD_GLES3)
add_definitions(-DBUILD_GL)
endif()
if(BUILD_GLES2)
@ -1140,7 +1133,7 @@ if(DISTBUILD)
elseif(3DS)
set(CPACK_COMPONENTS_ALL ${BINARY_NAME} ${BINARY_NAME}-dbg ${BINARY_NAME}-3ds ${BINARY_NAME}-perf)
elseif(WII)
set(CPACK_COMPONENTS_ALL ${BINARY_NAME} ${BINARY_NAME}-dbg ${BINARY_NAME}-wii)
set(CPACK_COMPONENTS_ALL ${BINARY_NAME} ${BINARY_NAME}-dbg ${BINARY_NAME}-wii ${BINARY_NAME}-perf)
elseif(PSP2)
set(CPACK_COMPONENTS_ALL ${BINARY_NAME} ${BINARY_NAME}-dbg ${BINARY_NAME}-psp2)
elseif(SWITCH)

View File

@ -16,7 +16,7 @@ CXX_GUARD_START
#include <mgba/internal/gba/renderers/common.h>
#include <mgba/internal/gba/video.h>
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#ifdef USE_EPOXY
#include <epoxy/gl.h>

View File

@ -18,7 +18,7 @@
#ifndef DISABLE_THREADING
#include <mgba/feature/thread-proxy.h>
#endif
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#include <mgba/internal/gba/renderers/gl.h>
#endif
#include <mgba/internal/gba/renderers/proxy.h>
@ -135,7 +135,7 @@ struct GBACore {
struct mCore d;
struct GBAVideoRenderer dummyRenderer;
struct GBAVideoSoftwareRenderer renderer;
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
struct GBAVideoGLRenderer glRenderer;
#endif
#ifndef MINIMAL_CORE
@ -193,7 +193,7 @@ static bool _GBACoreInit(struct mCore* core) {
GBAVideoSoftwareRendererCreate(&gbacore->renderer);
gbacore->renderer.outputBuffer = NULL;
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
GBAVideoGLRendererCreate(&gbacore->glRenderer);
gbacore->glRenderer.outputTex = -1;
#endif
@ -249,7 +249,7 @@ static bool _GBACoreSupportsFeature(const struct mCore* core, enum mCoreFeature
UNUSED(core);
switch (feature) {
case mCORE_FEATURE_OPENGL:
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
return true;
#else
return false;
@ -361,7 +361,7 @@ static void _GBACoreReloadConfigOption(struct mCore* core, const char* option, c
}
struct GBACore* gbacore = (struct GBACore*) core;
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
if (strcmp("videoScale", option) == 0) {
if (config != &core->config) {
mCoreConfigCopyValue(&core->config, config, "videoScale");
@ -379,7 +379,7 @@ static void _GBACoreReloadConfigOption(struct mCore* core, const char* option, c
if (gbacore->renderer.outputBuffer) {
renderer = &gbacore->renderer.d;
}
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
if (gbacore->glRenderer.outputTex != (unsigned) -1 && mCoreConfigGetIntValue(&core->config, "hwaccelVideo", &fakeBool) && fakeBool) {
mCoreConfigGetIntValue(&core->config, "videoScale", &gbacore->glRenderer.scale);
renderer = &gbacore->glRenderer.d;
@ -401,7 +401,7 @@ static void _GBACoreReloadConfigOption(struct mCore* core, const char* option, c
}
static void _GBACoreDesiredVideoDimensions(const struct mCore* core, unsigned* width, unsigned* height) {
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
const struct GBACore* gbacore = (const struct GBACore*) core;
int scale = gbacore->glRenderer.scale;
#else
@ -421,7 +421,7 @@ static void _GBACoreSetVideoBuffer(struct mCore* core, color_t* buffer, size_t s
}
static void _GBACoreSetVideoGLTex(struct mCore* core, unsigned texid) {
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
struct GBACore* gbacore = (struct GBACore*) core;
gbacore->glRenderer.outputTex = texid;
#else
@ -558,7 +558,7 @@ static void _GBACoreReset(struct mCore* core) {
struct GBACore* gbacore = (struct GBACore*) core;
struct GBA* gba = (struct GBA*) core->board;
if (gbacore->renderer.outputBuffer
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
|| gbacore->glRenderer.outputTex != (unsigned) -1
#endif
) {
@ -567,7 +567,7 @@ static void _GBACoreReset(struct mCore* core) {
renderer = &gbacore->renderer.d;
}
int fakeBool ATTRIBUTE_UNUSED;
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
if (gbacore->glRenderer.outputTex != (unsigned) -1 && mCoreConfigGetIntValue(&core->config, "hwaccelVideo", &fakeBool) && fakeBool) {
mCoreConfigGetIntValue(&core->config, "videoScale", &gbacore->glRenderer.scale);
renderer = &gbacore->glRenderer.d;

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <mgba/internal/gba/renderers/gl.h>
#ifdef BUILD_GLES3
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#include <mgba/core/cache-set.h>
#include <mgba/internal/arm/macros.h>

View File

@ -159,7 +159,6 @@ static void mGLES2ContextInit(struct VideoBackend* v, WHandle handle) {
mGLES2ShaderInit(&context->finalShader, 0, 0, 0, 0, false, 0, 0);
mGLES2ShaderInit(&context->interframeShader, 0, _interframeFragmentShader, -1, -1, false, 0, 0);
#ifdef BUILD_GLES3
if (context->initialShader.vao != (GLuint) -1) {
glBindVertexArray(context->initialShader.vao);
glBindBuffer(GL_ARRAY_BUFFER, context->vbo);
@ -169,7 +168,6 @@ static void mGLES2ContextInit(struct VideoBackend* v, WHandle handle) {
glBindBuffer(GL_ARRAY_BUFFER, context->vbo);
glBindVertexArray(0);
}
#endif
glDeleteFramebuffers(1, &context->finalShader.fbo);
glDeleteTextures(1, &context->finalShader.tex);
@ -307,12 +305,9 @@ void _drawShader(struct mGLES2Context* context, struct mGLES2Shader* shader) {
glUseProgram(shader->program);
glUniform1i(shader->texLocation, 0);
glUniform2f(shader->texSizeLocation, context->d.width - padW, context->d.height - padH);
#ifdef BUILD_GLES3
if (shader->vao != (GLuint) -1) {
glBindVertexArray(shader->vao);
} else
#endif
{
} else {
glBindBuffer(GL_ARRAY_BUFFER, context->vbo);
glEnableVertexAttribArray(shader->positionLocation);
glVertexAttribPointer(shader->positionLocation, 2, GL_FLOAT, GL_FALSE, 0, NULL);
@ -404,11 +399,9 @@ void mGLES2ContextDrawFrame(struct VideoBackend* v) {
}
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glUseProgram(0);
#ifdef BUILD_GLES3
if (context->finalShader.vao != (GLuint) -1) {
glBindVertexArray(0);
}
#endif
}
void mGLES2ContextPostFrame(struct VideoBackend* v, const void* frame) {
@ -523,7 +516,6 @@ void mGLES2ShaderInit(struct mGLES2Shader* shader, const char* vs, const char* f
shader->uniforms[i].location = glGetUniformLocation(shader->program, shader->uniforms[i].name);
}
#ifdef BUILD_GLES3
const GLubyte* extensions = glGetString(GL_EXTENSIONS);
if (shaderBuffer[0] == _gles2Header || version[0] >= '3' || (extensions && strstr((const char*) extensions, "_vertex_array_object") != NULL)) {
glGenVertexArrays(1, &shader->vao);
@ -531,9 +523,7 @@ void mGLES2ShaderInit(struct mGLES2Shader* shader, const char* vs, const char* f
glEnableVertexAttribArray(shader->positionLocation);
glVertexAttribPointer(shader->positionLocation, 2, GL_FLOAT, GL_FALSE, 0, NULL);
glBindVertexArray(0);
} else
#endif
{
} else {
shader->vao = -1;
}
@ -545,11 +535,9 @@ void mGLES2ShaderDeinit(struct mGLES2Shader* shader) {
glDeleteShader(shader->fragmentShader);
glDeleteProgram(shader->program);
glDeleteFramebuffers(1, &shader->fbo);
#ifdef BUILD_GLES3
if (shader->vao != (GLuint) -1) {
glDeleteVertexArrays(1, &shader->vao);
}
#endif
}
void mGLES2ShaderAttach(struct mGLES2Context* context, struct mGLES2Shader* shaders, size_t nShaders) {
@ -567,20 +555,16 @@ void mGLES2ShaderAttach(struct mGLES2Context* context, struct mGLES2Shader* shad
glClearColor(0.f, 0.f, 0.f, 1.f);
glClear(GL_COLOR_BUFFER_BIT);
#ifdef BUILD_GLES3
if (context->shaders[i].vao != (GLuint) -1) {
glBindVertexArray(context->shaders[i].vao);
glBindBuffer(GL_ARRAY_BUFFER, context->vbo);
glEnableVertexAttribArray(context->shaders[i].positionLocation);
glVertexAttribPointer(context->shaders[i].positionLocation, 2, GL_FLOAT, GL_FALSE, 0, NULL);
}
#endif
}
#ifdef BUILD_GLES3
if (context->initialShader.vao != (GLuint) -1) {
glBindVertexArray(0);
}
#endif
glBindFramebuffer(GL_FRAMEBUFFER, 0);
}

View File

@ -22,9 +22,6 @@ CXX_GUARD_START
#endif
#else
#include <GLES2/gl2.h>
#ifdef BUILD_GLES3
#include <GLES3/gl3.h>
#endif
#endif
#include "platform/video-backend.h"

View File

@ -25,7 +25,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/input)
find_package(Qt5 COMPONENTS Core Widgets OpenGL Network Multimedia)
if(NOT BUILD_GL AND NOT BUILD_GLES2 AND NOT BUILD_GLES3)
if(NOT BUILD_GL AND NOT BUILD_GLES2)
message(WARNING "OpenGL is recommended to build the Qt port")
endif()
@ -244,7 +244,7 @@ if(NOT DEFINED DATADIR)
set(DATADIR ${CMAKE_INSTALL_DATADIR}/${BINARY_NAME})
endif()
endif()
if(BUILD_GLES2 OR BUILD_GLES3 OR BUILD_EPOXY)
if(BUILD_GL OR BUILD_GLES2 OR BUILD_EPOXY)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/res/shaders DESTINATION ${DATADIR} COMPONENT ${BINARY_NAME}-qt)
endif()
install(FILES ${CMAKE_SOURCE_DIR}/res/nointro.dat DESTINATION ${DATADIR} COMPONENT ${BINARY_NAME}-qt)
@ -294,8 +294,8 @@ if(WIN32)
endif()
list(APPEND QT_LIBRARIES Qt5::Widgets Qt5::Network)
if(BUILD_GL OR BUILD_GLES2 OR BUILD_GLES3 OR BUILD_EPOXY)
list(APPEND QT_LIBRARIES Qt5::OpenGL ${OPENGL_LIBRARY} ${OPENGLES2_LIBRARY} ${OPENGLES3_LIBRARY})
if(BUILD_GL OR BUILD_GLES2 OR BUILD_EPOXY)
list(APPEND QT_LIBRARIES Qt5::OpenGL ${OPENGL_LIBRARY} ${OPENGLES2_LIBRARY})
endif()
if(QT_STATIC)
find_library(QTPCRE NAMES qtpcre2 qtpcre)
@ -305,7 +305,7 @@ if(QT_STATIC)
endif()
list(APPEND QT_LIBRARIES Qt5::QWindowsIntegrationPlugin ${QWINDOWS_DEPS} dwmapi uxtheme imm32 -static-libgcc -static-libstdc++)
set_target_properties(Qt5::Core PROPERTIES INTERFACE_LINK_LIBRARIES "${QTPCRE};version;winmm;ssl;crypto;ws2_32;iphlpapi;crypt32;userenv;netapi32;wtsapi32")
set_target_properties(Qt5::Gui PROPERTIES INTERFACE_LINK_LIBRARIES ${OPENGL_LIBRARY} ${OPENGLES2_LIBRARY} ${OPENGLES3_LIBRARY})
set_target_properties(Qt5::Gui PROPERTIES INTERFACE_LINK_LIBRARIES ${OPENGL_LIBRARY} ${OPENGLES2_LIBRARY})
elseif(APPLE)
find_package(Cups)
find_package(Qt5PrintSupport)

View File

@ -10,21 +10,21 @@
using namespace QGBA;
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(BUILD_GLES3) || defined(USE_EPOXY)
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(USE_EPOXY)
Display::Driver Display::s_driver = Display::Driver::OPENGL;
#else
Display::Driver Display::s_driver = Display::Driver::QT;
#endif
Display* Display::create(QWidget* parent) {
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(BUILD_GLES3) || defined(USE_EPOXY)
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(USE_EPOXY)
QSurfaceFormat format;
format.setSwapInterval(1);
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
#endif
switch (s_driver) {
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(BUILD_GLES3) || defined(USE_EPOXY)
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(USE_EPOXY)
case Driver::OPENGL:
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES) {
format.setVersion(3, 0);
@ -44,7 +44,7 @@ Display* Display::create(QWidget* parent) {
return new DisplayQt(parent);
default:
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(BUILD_GLES3) || defined(USE_EPOXY)
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(USE_EPOXY)
return new DisplayGL(format, parent);
#else
return new DisplayQt(parent);

View File

@ -27,8 +27,12 @@ Q_OBJECT
public:
enum class Driver {
QT = 0,
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(USE_EPOXY)
OPENGL = 1,
#endif
#ifdef BUILD_GL
OPENGL1 = 2,
#endif
};
Display(QWidget* parent = nullptr);

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "DisplayGL.h"
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(BUILD_GLES3)
#if defined(BUILD_GL) || defined(BUILD_GLES2)
#include "CoreController.h"
@ -23,7 +23,7 @@
#ifdef BUILD_GL
#include "platform/opengl/gl.h"
#endif
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#ifdef BUILD_GLES2
#include "platform/opengl/gles2.h"
#ifdef _WIN32
#include <epoxy/wgl.h>
@ -268,7 +268,7 @@ PainterGL::PainterGL(QWindow* surface, QOpenGLContext* parent, int forceVersion)
#ifdef BUILD_GL
mGLContext* glBackend;
#endif
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#ifdef BUILD_GLES2
mGLES2Context* gl2Backend;
#endif
@ -287,7 +287,7 @@ PainterGL::PainterGL(QWindow* surface, QOpenGLContext* parent, int forceVersion)
epoxy_handle_external_wglMakeCurrent();
#endif
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#ifdef BUILD_GLES2
auto version = m_gl->format().version();
QStringList extensions = QString(reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS))).split(' ');
if (forceVersion != 1 && ((version == qMakePair(2, 1) && extensions.contains("GL_ARB_framebuffer_object")) || version.first > 2)) {
@ -319,7 +319,7 @@ PainterGL::PainterGL(QWindow* surface, QOpenGLContext* parent, int forceVersion)
};
m_backend->init(m_backend, 0);
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#ifdef BUILD_GLES2
if (m_supportsShaders) {
m_shader.preprocessShader = static_cast<void*>(&reinterpret_cast<mGLES2Context*>(m_backend)->initialShader);
}
@ -340,7 +340,7 @@ PainterGL::~PainterGL() {
#if defined(_WIN32) && defined(USE_EPOXY)
epoxy_handle_external_wglMakeCurrent();
#endif
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#ifdef BUILD_GLES2
if (m_shader.passes) {
mGLES2ShaderFree(&m_shader);
}
@ -414,7 +414,7 @@ void PainterGL::start() {
epoxy_handle_external_wglMakeCurrent();
#endif
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#ifdef BUILD_GLES2
if (m_supportsShaders && m_shader.passes) {
mGLES2ShaderAttach(reinterpret_cast<mGLES2Context*>(m_backend), static_cast<mGLES2Shader*>(m_shader.passes), m_shader.nPasses);
}
@ -555,7 +555,7 @@ void PainterGL::setShaders(struct VDir* dir) {
if (!supportsShaders()) {
return;
}
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#ifdef BUILD_GLES2
if (!m_started) {
m_gl->makeCurrent(m_surface);
#if defined(_WIN32) && defined(USE_EPOXY)
@ -579,7 +579,7 @@ void PainterGL::clearShaders() {
if (!supportsShaders()) {
return;
}
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#ifdef BUILD_GLES2
if (!m_started) {
m_gl->makeCurrent(m_surface);
#if defined(_WIN32) && defined(USE_EPOXY)
@ -601,7 +601,7 @@ VideoShader* PainterGL::shaders() {
}
int PainterGL::glTex() {
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
#ifdef BUILD_GLES2
if (supportsShaders()) {
mGLES2Context* gl2Backend = reinterpret_cast<mGLES2Context*>(m_backend);
return gl2Backend->tex;

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#pragma once
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(BUILD_GLES3)
#if defined(BUILD_GL) || defined(BUILD_GLES2)
#include "Display.h"

View File

@ -884,10 +884,10 @@ static void _replayBaseline(struct CInemaTest* test, struct FFmpegEncoder* encod
test->status = CI_ERROR;
return;
}
encoder->d.videoDimensionsChanged(&encoder->d, image->width, image->height);
snprintf(baselineName, sizeof(baselineName), "%s" PATH_SEP "baseline.avi", test->directory);
struct CInemaImage buffer = {
.data = NULL,
.width = image->width,
@ -1424,4 +1424,4 @@ int main(int argc, char** argv) {
cleanup:
return status;
}
}

View File

@ -151,9 +151,10 @@ static enum VFSType _vdeType(struct VDirEntry* vde) {
#if !defined(WIN32) && !defined(__HAIKU__)
if (vdede->ent->d_type == DT_DIR) {
return VFS_DIRECTORY;
} else if (vdede->ent->d_type == DT_REG) {
return VFS_FILE;
}
return VFS_FILE;
#else
#endif
const char* dir = vdede->p->path;
char* combined = malloc(sizeof(char) * (strlen(vdede->ent->d_name) + strlen(dir) + 2));
sprintf(combined, "%s%s%s", dir, PATH_SEP, vdede->ent->d_name);
@ -165,9 +166,8 @@ static enum VFSType _vdeType(struct VDirEntry* vde) {
return VFS_DIRECTORY;
}
return VFS_FILE;
#endif
}
bool VDirCreate(const char* path) {
return mkdir(path, 0777) == 0 || errno == EEXIST;
}
}

View File

@ -90,7 +90,7 @@ class PerfServer(object):
server_command = list(self.command)
else:
server_command = [os.path.join(os.getcwd(), PerfTest.EXECUTABLE)]
server_command.extend(['--', '-PD'])
server_command.extend(['-PD'])
if hasattr(test, "frames"):
server_command.extend(['-F', str(test.frames)])
if not test.renderer: