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

Support for LOGICAL AND operator in DirectX backend #232

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

gjyotin305
Copy link
Contributor

@gjyotin305 gjyotin305 commented Dec 26, 2024

Summary

Adds LOGICAL_AND operator to DirectX Backend.

Related Issue

closes #183

Changes

Fixed lexer.py and parser.py for logical operators in DirectX Backend

Shader Sample (Optional)

Example:

PSOutput PSMain(PSInput input) {
    PSOutput output;
    output.out_color = float4(0.0, 0.0, 0.0, 1.0);
    // Test case for logical AND
    bool condition1 = true; // First condition
    bool condition2 = false; // Second condition
    if (condition1 && condition2) {
        // both the condition is true
        output.out_color = float4(1.0, 0.0, 0.0, 1.0); // Set color to red
    } else {
        // any one of the condition is false
        output.out_color = float4(0.0, 1.0, 0.0, 1.0); // Set color to green
    }
    return output;
}

Testing

Added 1 test for logical_AND operator in test_directx

Checklist

  • Tests cover new or changed code (or reason why not)
  • Linked the issue with a closing keyword (if applicable)
  • Only touched files related to the issue
  • Everything builds and runs locally

@gjyotin305
Copy link
Contributor Author

@NripeshN PTAL again

@gjyotin305
Copy link
Contributor Author

Hi @NripeshN do you want me to solve issue #105 in this PR?

@NripeshN
Copy link
Member

Hi @NripeshN do you want me to solve issue #105 in this PR?

Hi @gjyotin305,
If you want add LOGICAL AND into the frontend feel free to do so. If you want to work on other issues in the ToDo issue list, please create a new PR. It would be easier to track changes this way😁

Copy link
Member

@NripeshN NripeshN left a comment

Choose a reason for hiding this comment

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

LGTM!!

@NripeshN NripeshN merged commit 17e4ba0 into CrossGL:main Dec 26, 2024
235 checks passed
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.

LOGICAL_AND" : &&
2 participants