{"action":"created","issue":{"url":"https://api.github.com/repos/shader-slang/slang/issues/103","repository_url":"https://api.github.com/repos/shader-slang/slang","labels_url":"https://api.github.com/repos/shader-slang/slang/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/shader-slang/slang/issues/103/comments","events_url":"https://api.github.com/repos/shader-slang/slang/issues/103/events","html_url":"https://github.com/shader-slang/slang/issues/103","id":243205285,"number":103,"title":"Matrix-float multiplication cross-compilation fails","user":{"login":"nbenty","id":17769755,"avatar_url":"https://avatars5.githubusercontent.com/u/17769755?v=4","gravatar_id":"","url":"https://api.github.com/users/nbenty","html_url":"https://github.com/nbenty","followers_url":"https://api.github.com/users/nbenty/followers","following_url":"https://api.github.com/users/nbenty/following{/other_user}","gists_url":"https://api.github.com/users/nbenty/gists{/gist_id}","starred_url":"https://api.github.com/users/nbenty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbenty/subscriptions","organizations_url":"https://api.github.com/users/nbenty/orgs","repos_url":"https://api.github.com/users/nbenty/repos","events_url":"https://api.github.com/users/nbenty/events{/privacy}","received_events_url":"https://api.github.com/users/nbenty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-07-15T22:51:56Z","updated_at":"2017-07-17T16:19:40Z","closed_at":null,"body":"```C++\r\nfloat f;\r\nmat4 a;\r\nmat b = a*f; // This is legal in GLSL but fails compilation inside Slang\r\n```\r\nLooks like it's a Slang bug, since the GLSL compiler is never invoked.\r\n\r\nWe are using it for vertex-blending- `ShaderCommon.slang::59` - `getBlendedWorldMat`"},"comment":{"url":"https://api.github.com/repos/shader-slang/slang/issues/comments/315803460","html_url":"https://github.com/shader-slang/slang/issues/103#issuecomment-315803460","issue_url":"https://api.github.com/repos/shader-slang/slang/issues/103","id":315803460,"user":{"login":"tfoleyNV","id":10618364,"avatar_url":"https://avatars6.githubusercontent.com/u/10618364?v=4","gravatar_id":"","url":"https://api.github.com/users/tfoleyNV","html_url":"https://github.com/tfoleyNV","followers_url":"https://api.github.com/users/tfoleyNV/followers","following_url":"https://api.github.com/users/tfoleyNV/following{/other_user}","gists_url":"https://api.github.com/users/tfoleyNV/gists{/gist_id}","starred_url":"https://api.github.com/users/tfoleyNV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfoleyNV/subscriptions","organizations_url":"https://api.github.com/users/tfoleyNV/orgs","repos_url":"https://api.github.com/users/tfoleyNV/repos","events_url":"https://api.github.com/users/tfoleyNV/events{/privacy}","received_events_url":"https://api.github.com/users/tfoleyNV/received_events","type":"User","site_admin":false},"created_at":"2017-07-17T16:19:40Z","updated_at":"2017-07-17T16:19:40Z","body":"Yep. I can repro this is a bare Slang file, so this is just a plain old screw-up on my part.\r\n\r\nThere are two reasonable ways to fix this:\r\n- Implement implicit promotion of scalars to matrices, after which the ordinary component-wise multiply will be taken\r\n- Implement explicit overloads of `operator*` (and probably others) for the matrix/scalar and scalar/matrix cases (and same for vector/scalar, ...)\r\n\r\nIt isn't clear to me which is the way that HLSL interprets this kind of things internally."}}
{"actor":{"display_login":"tfoleyNV"}}