Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limited Support for Control Flow Statements #272

Open
code-with-parth opened this issue Jan 19, 2025 · 1 comment
Open

Limited Support for Control Flow Statements #272

code-with-parth opened this issue Jan 19, 2025 · 1 comment
Labels

Comments

@code-with-parth
Copy link

Description:
The translator does not fully support complex control flow statements such as switch statements with case labels, nested loops, or break and continue keywords in certain contexts. This limitation can lead to incomplete or incorrect translation of shaders using advanced control flow logic.

Steps to Reproduce:

  1. Write an HLSL shader with a switch statement or nested loops.

  2. Translate the shader using CrossGL.

  3. Observe translation failures or incorrect outputs.

Expected Behavior:
The translator should handle all standard control flow statements, preserving their logic in the target shader language.

Actual Behavior:
The translator either generates incomplete code, skips parts of the control flow, or fails with a parsing error.

Environment Details:

OS: Windows 10

DirectX Version: 12

Python Version: 3.10

Additional Context:

The issue likely originates from parser.py, which has limited handling of control flow constructs.

Supporting complex control flow is crucial for shaders used in dynamic rendering or game engines.

@code-with-parth
Copy link
Author

@CrossGL-issue-bot assign me

@github-actions github-actions bot added the stale label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant