!fjjkgHFcwtkREywzfk:matrix.org

Naga Shader Translator

49 Members
On the way to producing SPIR-V!4 Servers

Load older messages


SenderMessageTime
15 Oct 2020
@jcapucho:matrix.orgjcapuchoI think for the backends and maybe some frontends the type system approach is better but for the frontends it's simpler to pass just the name of the function17:41:41
17 Oct 2020
@napokue:matrix.orgnapokueQuick question, as I couldn't find the answer easily in Naga's codebase: What composite type are supported for Expression::AccessIndex and what one are supported for Expression::Access. I'd like to make a test script to test my PR, and I want to make sure to support all of them correctly in spv-out. Thanks.11:01:45
@kvark:matrix.orgkvarkIsn't this encoded in the typifier?15:03:50
@kvark:matrix.orgkvarkCheck what types it expects15:04:05
@napokue:matrix.orgnapokueAh yes you are right, sorry, didn't look there15:27:32
@napokue:matrix.orgnapokueThanks15:27:39
@kvark:matrix.orgkvark No worries! Typifier ends up taking part in validation, I think it's inevitable 17:01:50
@napokue:matrix.orgnapokue

Just playing around with Expression::Access, and it seems accessing matrices via this way doesn't work for WGSL -> Metal. It works for WGSL -> IR. So either it is not implemented yet in Metal, or it is invalid syntax of WGSL that seems to pass the validation.

[[stage(vertex)]]
fn main() -> void {
  var a: vec2<f32> = vec2<f32>(1.0, 1.0);
  
  var d: mat2x2<f32> = mat2x2<f32>(a, a);
  
  # Expression::Access - Matrix
  var e: f32 = d[0][0];
  
  return;
}
23:56:39
@napokue:matrix.orgnapokueUnfortunately the WGSL spec still has a todo for most composite type accessing23:57:09
@napokue:matrix.orgnapokueI've looked it up in the GLSL docs, and there it should work to access a matrix this way.23:57:49
18 Oct 2020
@kvark:matrix.orgkvarkdon't expect Metal backend to be complete :)01:38:28
@napokue:matrix.orgnapokueYes I know haha, but I can assume that WGSL and the validation work correct and it is valid syntax?09:00:57
@napokue:matrix.orgnapokue* Yes I know haha, but I can assume that WGSL and the validation work correct and it is valid syntax?09:01:26
@kvark:matrix.orgkvarkMost likely, yes13:51:27
@kvark:matrix.orgkvarkI mean, it may be incorrect, but it's closest to truth13:51:43
@pudi:matrix.orgpudi joined the room.20:05:53
19 Oct 2020
* @pjoe:matrix.orgpjoe updated wasm-naga, now at ~400KB (uncompressed) for glsl-in, wgsl-in and spv-out19:10:39
@kangz:matrix.orgKangzOh hai https://github.com/Kangz/glslpp-rs20:05:06
@kangz:matrix.orgKangz(is finally public)20:05:22
20 Oct 2020
@pjoe:matrix.orgpjoe Kangz: I'll take a closer look (again), and see how it would be to integrate (and how it affects build size) 06:37:31
21 Oct 2020
@kvark:matrix.orgkvarkhttps://tiarkrompf.github.io/notes/?/just-write-the-parser/ looks like something relevant to us :)23:10:47
22 Oct 2020
@benmkw:matrix.orgbenmkw

https://matklad.github.io//2020/04/13/simple-but-powerful-pratt-parsing.html

https://gist.github.com/benmkw/c91fec41674ac66c51c0aac5ec276344

02:15:03
@kvark:matrix.orgkvarkI remember that article, very much detailed05:08:59
@benmkw:matrix.orgbenmkw Yes, i won’t pretend I understood the recursion in every level of detail :D 07:40:39
@groves:matrix.orggroveshttps://github.com/EmbarkStudios/rust-gpu/releases/tag/v0.114:46:15
@lachlansneff:matrix.orgLachlan SneffYay! 15:13:51
@lachlansneff:matrix.orgLachlan SneffI'm still going to argue for outputting serialized naga modules. 15:14:10
@kvark:matrix.orgkvarkI believe they have been considering it, just hard to target our IR while it's in motion..15:15:00
@koolala-3d:matrix.orgKoolala joined the room.17:08:55
@pudi:matrix.orgpudi set a profile picture.17:45:54

There are no newer messages yet.


Back to Room List