Merge branch 'master' into medusa
jump to
@@ -67,6 +67,7 @@ - Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642)
- 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
@@ -71,7 +71,7 @@ set(BUILD_SHARED ON CACHE BOOL "Build a shared library")
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 @@ endif()
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 @@ list(APPEND DEPENDENCY_LIB ${OPENGLES2_LIBRARY})
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 @@ endif()
endif() if(BUILD_GL) - add_definitions(-DBUILD_GL -DBUILD_GLES2 -DBUILD_GLES3) + add_definitions(-DBUILD_GL) endif() if(BUILD_GLES2)@@ -1140,7 +1133,7 @@ set(CPACK_COMPONENTS_ALL ${BINARY_NAME} ${BINARY_NAME}-qt ${BINARY_NAME}-sdl ${BINARY_NAME}-qt-dbg ${BINARY_NAME}-sdl-dbg ${BINARY_NAME}-perf installer)
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)
@@ -16,7 +16,7 @@ #include <mgba/internal/gba/io.h>
#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>
@@ -18,7 +18,7 @@ #include <mgba/internal/gba/overrides.h>
#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 @@
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 feature) {
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 @@ return;
} 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 @@ struct GBAVideoRenderer* renderer = NULL;
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 _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 @@ memset(gbacore->renderer.scanlineDirty, 0xFFFFFFFF, sizeof(gbacore->renderer.scanlineDirty));
} 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 @@ if (gbacore->renderer.outputBuffer) {
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;
@@ -5,7 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this
* 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>
@@ -159,7 +159,6 @@ mGLES2ShaderInit(&context->initialShader, _vertexShader, _fragmentShader, -1, -1, false, uniforms, 4);
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 @@ glBindVertexArray(context->interframeShader.vao);
glBindBuffer(GL_ARRAY_BUFFER, context->vbo); glBindVertexArray(0); } -#endif glDeleteFramebuffers(1, &context->finalShader.fbo); glDeleteTextures(1, &context->finalShader.tex);@@ -307,12 +305,9 @@ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shader->filter ? GL_LINEAR : GL_NEAREST);
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 @@ _drawShader(context, &context->interframeShader);
} 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 @@ for (i = 0; i < shader->nUniforms; ++i) {
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 @@ glBindVertexArray(shader->vao);
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 @@ glDeleteTextures(1, &shader->tex);
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 @@ glBindFramebuffer(GL_FRAMEBUFFER, context->shaders[i].fbo);
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); }
@@ -22,9 +22,6 @@ #include <GL/glext.h>
#endif #else #include <GLES2/gl2.h> -#ifdef BUILD_GLES3 -#include <GLES3/gl3.h> -#endif #endif #include "platform/video-backend.h"
@@ -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 @@ else()
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 @@ set_target_properties(${BINARY_NAME}-qt PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
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 @@ set(QWINDOWS_DEPS Qt5EventDispatcherSupport Qt5FontDatabaseSupport Qt5ThemeSupport Qt5WindowsUIAutomationSupport)
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)
@@ -10,21 +10,21 @@ #include "DisplayQt.h"
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 @@ case Driver::QT:
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);
@@ -27,8 +27,12 @@
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);
@@ -5,7 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this
* 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 @@ #include <mgba-util/math.h>
#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 @@ {
#ifdef BUILD_GL mGLContext* glBackend; #endif -#if defined(BUILD_GLES2) || defined(BUILD_GLES3) +#ifdef BUILD_GLES2 mGLES2Context* gl2Backend; #endif@@ -287,7 +287,7 @@ #if defined(_WIN32) && defined(USE_EPOXY)
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 @@ #endif
}; 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 @@ m_gl->makeCurrent(m_surface);
#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 @@ #if defined(_WIN32) && defined(USE_EPOXY)
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 @@ return &m_shader;
} 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;
@@ -5,7 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this
* 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"
@@ -884,9 +884,9 @@ CIerr(1, "Failed to save baseline video\n");
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,@@ -1424,4 +1424,4 @@ CInemaTestListDeinit(&tests);
cleanup: return status; -}+}
@@ -151,9 +151,10 @@ struct VDirEntryDE* vdede = (struct VDirEntryDE*) 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 @@ if (S_ISDIR(sb.st_mode)) {
return VFS_DIRECTORY; } return VFS_FILE; -#endif } bool VDirCreate(const char* path) { return mkdir(path, 0777) == 0 || errno == EEXIST; -}+}
@@ -90,7 +90,7 @@ if self.command:
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: