Skip to content

Fix defines for tessellation, fix macro soup ate my shader#917

Merged
matzf merged 1 commit intomainfrom
bugfix/tessellation-defines
Feb 25, 2026
Merged

Fix defines for tessellation, fix macro soup ate my shader#917
matzf merged 1 commit intomainfrom
bugfix/tessellation-defines

Conversation

@matzf
Copy link
Copy Markdown
Contributor

@matzf matzf commented Feb 20, 2026

First problem: missing include for header defining tessellation support macros; GraphicsObjectFactoryOpenGl returned null object, which led to crash. Fixed by including the correct header, obviously. Also changed the checks from #ifdef HARDWARE_TESSELLATION_SUPPORTED to #if, so that a missing include can be caught with newly enabled -Wundef.

  • move and rename header
  • enable -Wundef, and fix misc. #if DEBUG to #ifdef DEBUG

Second problem: when OMMVersionedGlesShaderCodeWithFrameUBO() is used without specifying two versions, it silently truncates the shader code. This accidentally occurred in the tessellation shaders; this was missed when merging the tessellation feature with the WASM support.

First problem: missing include for header defining tessellation support macros;
GraphicsObjectFactoryOpenGl returned null object, which led to crash.
Fixed by including the correct header, obviously. Also changed the
checks from #ifdef HARDWARE_TESSELLATION_SUPPORTED to #if, so that a
missing include can be caught with newly enabled -Wundef.

- move and rename header
- enable -Wundef, and fix misc. #if DEBUG to #ifdef DEBUG
- set warning flags and system include headers in web build also

Second problem: when OMMVersionedGlesShaderCodeWithFrameUBO() is used
without specifying two versions, it silently truncates the shader code.
This accidentally occurred in the tessellation shaders; this was missed
when merging the tessellation feature with the WASM support.
@matzf matzf force-pushed the bugfix/tessellation-defines branch from 8ee79b8 to 207cccc Compare February 20, 2026 14:59
Copy link
Copy Markdown
Collaborator

@NoahBussingerUbique NoahBussingerUbique left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matzf matzf merged commit e1dc23d into main Feb 25, 2026
7 checks passed
@matzf matzf deleted the bugfix/tessellation-defines branch February 25, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants