<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-ir-legalize-binary-operator.cpp, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-07-18T16:38:00+00:00</updated>
<entry>
<title>Lower int/uint/bool matrices to arrays for SPIRV (#7687)</title>
<updated>2025-07-18T16:38:00+00:00</updated>
<author>
<name>venkataram-nv</name>
<email>vedavamadath@nvidia.com</email>
</author>
<published>2025-07-18T16:38:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=48b6e2432ea28c06d04931fccd633e31eed6d995'/>
<id>urn:sha1:48b6e2432ea28c06d04931fccd633e31eed6d995</id>
<content type='text'>
* Add tests for expected behaviour

* Allow matrix types in logical or/and

* Legalize int/bool matrix types and construction with makeMatrix

* Legalize uint matrices and operations

* Limit testing to only SPIRV

* Better tests for int and bool

* Add test for uint

* Remove GLSL tests

* Remove old test for diagnosing int matrices

* Emit SPIRV directly in tests

* format code

* Address PR comments

* Improve testing

* Address PR comments

* format code

* Add tests for matrix intrinsic operations

* Move matrix lowering to dedicated legalization pass

* Fix compiler warning

* Remove signal again

* Reorder matrix and vector legalization

* Fix formatting

* Add shift and comparison tests

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fix matrix division by scalar for Metal and WGSL targets (#6752)</title>
<updated>2025-04-14T20:48:17+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-04-14T20:48:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=705d00ab8528e0d7c14f68b7d0e15fb57280c16e'/>
<id>urn:sha1:705d00ab8528e0d7c14f68b7d0e15fb57280c16e</id>
<content type='text'>
* Fix matrix division by scalar for Metal and WGSL targets

* Add tests

* Minor fix

* Fix compilation error

* Convert to multiplication for WGSL

* Minor cleanup

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Use and() and or() functions for logical-AND and OR (#6310)</title>
<updated>2025-02-08T02:27:23+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-02-08T02:27:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=57b09a8986668626c37055e431fa0ac6449d7214'/>
<id>urn:sha1:57b09a8986668626c37055e431fa0ac6449d7214</id>
<content type='text'>
* Use and() and or() functions for logical-AND and OR

With this commit, Slang will emit function calls to `and()` and `or()`
for the logical-AND and logical-OR when the operands are non-scalar and
the target profile is SM6.0 and above. This is required change from
SM6.0.

For WGSL, there is no operator overloadings of `&amp;&amp;` and `||` when the
operands are non-scalar. Unlike HLSL, WGSL also don't have `and()` nor
`or()`. Alternatively, we can use `select()`.</content>
</entry>
<entry>
<title>WGSL: Convert signed vector shift amounts to unsigned (#6023)</title>
<updated>2025-01-10T19:05:05+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2025-01-10T19:05:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=803e0c9f9a9dc4b01e29ebbf3b37a5bba782ac83'/>
<id>urn:sha1:803e0c9f9a9dc4b01e29ebbf3b37a5bba782ac83</id>
<content type='text'>
* WGSL: Fixes for signed shift amounts

- Handle the case of vector shift amounts
 - Closes #5985
- Move handling of scalar case from emit to legalization
- Add tests for bitshifts.

* Move the binary operator legalization function to a common place

* Metal: Legalize binary operations

Closes #6029.

* Fix Metal filecheck test

The int shift amounts are now converted to unsigned.

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
