Skip to content

Commit 1ad4582

Browse files
committed
Merge branch 'refs/heads/dev'
# Conflicts: # CHANGELOG.md # src/libretro/render/opengl.cpp
2 parents f8707d6 + a29c415 commit 1ad4582

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

.github/workflows/main.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Build Artifacts
33
on:
44
workflow_dispatch:
55
push:
6-
branches:
7-
- main
8-
- dev
96
paths-ignore:
107
- "*.gitlab-ci.yml"
118
- "*.gitignore"

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0),
66
and this project roughly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.3] - 2024-06-14
9+
10+
### Fixed
11+
12+
- Fixed a crash that would occur when attempting to use the OpenGL renderer on some GPUs. [#203](https://github.com/JesseTG/melonds-ds/issues/203)
13+
814
## [1.1.2] - 2024-06-12
915

1016
### Fixed

melondsds_libretro.info.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ is_experimental = "false"
2525
libretro_saves = "true"
2626
load_subsystem = "true"
2727
needs_fullpath = "false"
28-
required_hw_api = "OpenGL Core >= 3.1"
28+
required_hw_api = "OpenGL Core >= 3.2"
2929
savestate = "true"
3030
savestate_features = "serialized"
3131
single_purpose = "false"

src/libretro/render/opengl.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,11 @@ MelonDsDs::OpenGLRenderState::OpenGLRenderState() {
147147
retro::debug(TracyFunction);
148148
glsm_ctx_params_t params = {};
149149

150-
// MelonDS DS wants an opengl 3.1 context, so glcore is required for mesa compatibility
151-
params.context_type = RETRO_HW_CONTEXT_OPENGL;
150+
// MelonDS needs at least OpenGL 3.2 for OpenGL renderer
151+
// (it doesn't use the legacy fixed-function pipeline)
152+
params.context_type = RETRO_HW_CONTEXT_OPENGL_CORE;
152153
params.major = 3;
153-
params.minor = 1;
154+
params.minor = 2;
154155
params.context_reset = HardwareContextReset;
155156
params.context_destroy = HardwareContextDestroyed;
156157
params.environ_cb = retro::environment;
@@ -219,11 +220,8 @@ void MelonDsDs::OpenGLRenderState::ContextReset(melonDS::NDS& nds, const CoreCon
219220

220221
uintptr_t fbo = glsm_get_current_framebuffer();
221222
retro_assert(glIsFramebuffer(fbo) == GL_TRUE);
222-
retro::debug("Current OpenGL framebuffer: {}", fbo);
223-
224223
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
225-
retro::debug("Framebuffer status: {}", static_cast<FormattedGLEnum>(status));
226-
retro_assert(status == GL_FRAMEBUFFER_COMPLETE);
224+
retro::debug("Current OpenGL framebuffer: id={}, status={}", fbo, static_cast<FormattedGLEnum>(status));
227225

228226
// Initialize global OpenGL resources (e.g. VAOs) and get config info (e.g. limits)
229227
retro::debug("Setting up GL state");

0 commit comments

Comments
 (0)