<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-ir-legalize-matrix-types.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-10-05T01:03:27+00:00</updated>
<entry>
<title>Matrix legalization for missing instructions &amp; MakeMatrix of vectors (#8605)</title>
<updated>2025-10-05T01:03:27+00:00</updated>
<author>
<name>Julius Ikkala</name>
<email>julius.ikkala@gmail.com</email>
</author>
<published>2025-10-05T01:03:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=04093bcbaea9784cdffe55f3931f50db7ad9f808'/>
<id>urn:sha1:04093bcbaea9784cdffe55f3931f50db7ad9f808</id>
<content type='text'>
Fixes these issues:
* During matrix legalization, `MakeMatrix` crashed if it was given a
list of vectors instead of individual elements.
* Matrix casts, IRem, and Frem would be emitted using arrays, e.g.
`IntToFloatCast` with `float2[2]` parameters.

I found these bugs while enabling various `hlsl-intrinsic` tests for the
LLVM target. For now, I've chose to get rid of all matrix types with the
matrix legalization pass so that the LLVM emitter doesn't need to be
aware. These bugs were preventing
`tests/hlsl-intrinsic/matrix-double-reduced-intrinsic.slang` and
`tests/hlsl-intrinsic/matrix-double.slang` from passing there.</content>
</entry>
<entry>
<title>Add matrix select intrinsic (#7566)</title>
<updated>2025-07-31T22:12:21+00:00</updated>
<author>
<name>venkataram-nv</name>
<email>vedavamadath@nvidia.com</email>
</author>
<published>2025-07-31T22:12:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=30fd3c63fb4af9ea8d482c75921710df1b40e59e'/>
<id>urn:sha1:30fd3c63fb4af9ea8d482c75921710df1b40e59e</id>
<content type='text'>
* Add matrix select intrinsic

* Fix hlsl test

* Restrict matrix select to HLSL

* Better test for HLSL side

* Select route for GLSL/SPIRV

* Exclude matrices from select legalization

* Exclude CUDA from select test

* Inline and move

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Lowering unsupported matrix types for GLSL/WGSL/Metal targets (#7936)</title>
<updated>2025-07-30T16:27:38+00:00</updated>
<author>
<name>venkataram-nv</name>
<email>vedavamadath@nvidia.com</email>
</author>
<published>2025-07-30T16:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=92ee2927d0012dd454dff7bb53b900f5240073d5'/>
<id>urn:sha1:92ee2927d0012dd454dff7bb53b900f5240073d5</id>
<content type='text'>
* Add emit cases for WGSL and GLSL

* Fix compilation warnings

Modify short cutting test to reflect change in emit logic

Lower matrix for metal as well

Add emit matrix logic for metal

Fix compiler warning

Brace initializer for lowered matrices

Fix compiler warnings

* Tests for metal

* Fix mult, any, and determinant

* Fix matrix-matrix multiplication

* Fix mat mul to be element-wise

* Fix compiler warning

* Move makeMatrix to legalization

* Move unary and binary arithmetic operator lowering to legalization

* Remove emit logic and move final comparison operators to legalization

* Handle vector/matrix negation for WGSL

* Restore older SPIR-V emit logic

* Address PR comments

* Revert to zero minus for negation

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<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>
</feed>
