Skip to content

Commit

Permalink
Merge branch 'refs/heads/dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	src/libretro/render/opengl.cpp
  • Loading branch information
JesseTG committed Jun 14, 2024
2 parents f8707d6 + a29c415 commit 1ad4582
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Build Artifacts
on:
workflow_dispatch:
push:
branches:
- main
- dev
paths-ignore:
- "*.gitlab-ci.yml"
- "*.gitignore"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0),
and this project roughly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.3] - 2024-06-14

### Fixed

- 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)

## [1.1.2] - 2024-06-12

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion melondsds_libretro.info.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ is_experimental = "false"
libretro_saves = "true"
load_subsystem = "true"
needs_fullpath = "false"
required_hw_api = "OpenGL Core >= 3.1"
required_hw_api = "OpenGL Core >= 3.2"
savestate = "true"
savestate_features = "serialized"
single_purpose = "false"
Expand Down
12 changes: 5 additions & 7 deletions src/libretro/render/opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,11 @@ MelonDsDs::OpenGLRenderState::OpenGLRenderState() {
retro::debug(TracyFunction);
glsm_ctx_params_t params = {};

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

uintptr_t fbo = glsm_get_current_framebuffer();
retro_assert(glIsFramebuffer(fbo) == GL_TRUE);
retro::debug("Current OpenGL framebuffer: {}", fbo);

GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
retro::debug("Framebuffer status: {}", static_cast<FormattedGLEnum>(status));
retro_assert(status == GL_FRAMEBUFFER_COMPLETE);
retro::debug("Current OpenGL framebuffer: id={}, status={}", fbo, static_cast<FormattedGLEnum>(status));

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

0 comments on commit 1ad4582

Please sign in to comment.