!FZyQrssSlHEZqrYcOb:matrix.org

In WebGPU we Rust

224 Members
wgpu-rs is targeting the Web17 Servers

Load older messages


Timestamp Message
7 Jun 2020
00:04:41@ralith:ralith.comRalithinjecting code into vertex shaders is always an option
00:07:29@cwfitzgerald:matrix.orgcwfitzgeraldyeah, glClipControl would limit the backend to 4.2
00:13:06@kvark:matrix.orgkvarkWhy?
00:13:21@cwfitzgerald:matrix.orgcwfitzgeraldwhy to whom?
00:14:20@cwfitzgerald:matrix.orgcwfitzgeraldoh, glClipControl is 4.5, though ARB_clip_control is a thing
00:21:28@kvark:matrix.orgkvark can't you man the NDC without ARB_clip_control ?
00:22:09@cwfitzgerald:matrix.orgcwfitzgeraldas far as I know, that's the only way to change the depth to [0, 1]
00:23:26@kvark:matrix.orgkvarkyou can change the output depth in the VS the only problem is precision I think for GL backend this would be one of the minor problems
00:24:27@cwfitzgerald:matrix.orgcwfitzgeraldalright
02:33:47@lachlansneff:matrix.orglachlansneffI saw a warning on the khronos wiki that arrays of vec3 should generally be avoided. Should I worry about that?
02:48:32@lachlansneff:matrix.orglachlansneffAfter more investigation, looks like an array of vec3 won't work.
02:56:13@kvark:matrix.orgkvarknot even in std430?
03:11:30@lachlansneff:matrix.orglachlansneffWell, it aligns everything to a vec4, even in std430, it seems
03:17:46@lachlansneff:matrix.orglachlansneffWow, the layouts are really badly documented
03:18:32@lachlansneff:matrix.orglachlansnefforeilly.com/library/view/opengl-programming-guide/9780132748445/app09lev1sec3.html
03:18:51@lachlansneff:matrix.orglachlansneffThis might be saying that an array of vec3 is okay with std430, but it's hard to parse.
03:42:20@kvark:matrix.orgkvarkphew, I think I finished the bulk of shader validation now
03:42:27@cwfitzgerald:matrix.orgcwfitzgeraldreviewing it now :)
03:43:07@kvark:matrix.orgkvark

next steps would be:

  • getting naga's SPIRV frontend actually good/usable
  • sanitizing out-of-bounds accesses and UB commands
  • zero-initializing resources
03:43:18@kvark:matrix.orgkvark with these three extra things, we can actually be safe!
03:49:37@cwfitzgerald:matrix.orgcwfitzgeraldwoooooo
03:50:05@cwfitzgerald:matrix.orgcwfitzgerald

kvark: so I don't get why all this is the same wrt width

        Vf::Uchar2 => Ti::Vector {
            size: naga::VectorSize::Bi,
            kind: naga::ScalarKind::Uint,
            width: 8,
        },
        Vf::Uchar4 => Ti::Vector {
            size: naga::VectorSize::Quad,
            kind: naga::ScalarKind::Uint,
            width: 8,
        },
03:50:14@cwfitzgerald:matrix.orgcwfitzgerald *

kvark: so I don't get why all this is the same wrt width

        Vf::Uchar2 => Ti::Vector {
            size: naga::VectorSize::Bi,
            kind: naga::ScalarKind::Uint,
            width: 8,
        },
        Vf::Uchar4 => Ti::Vector {
            size: naga::VectorSize::Quad,
            kind: naga::ScalarKind::Uint,
            width: 8,
        },
03:55:28@cwfitzgerald:matrix.orgcwfitzgeraldWouldn't Uchar4 either be 4 (if talking 4 * 1) or 16 (4 * 4)
04:00:39@cwfitzgerald:matrix.orgcwfitzgeraldoh is that bits per element
04:27:31@kvark:matrix.orgkvarkYep
04:29:02@cwfitzgerald:matrix.orgcwfitzgeraldTook me till the weird R11G11B10 stuff to finally figure that out
04:29:08@cwfitzgerald:matrix.orgcwfitzgerald * Took me till the weird R11G11B10 stuff to finally figure that out
05:03:13@ralith:ralith.comRalith
In reply to @lachlansneff:matrix.org
I saw a warning on the khronos wiki that arrays of vec3 should generally be avoided. Should I worry about that?
there's absolutely nothing wrong with using vec3s, you just need to understand the ABI
05:03:25@ralith:ralith.comRalithit is emphatically not the C ABI, and sometimes this trips people up

There are no newer messages yet.


Back to Room List