!XFRnMvAfptAHthwBCx:matrix.org

Wgpu Users

746 Members
0.14!35 Servers

Load older messages


SenderMessageTime
31 Jan 2023
@usecallback:matrix.orgusecallbackBut I think this is not helping at all 🀣07:03:02
@usecallback:matrix.orgusecallback The error seems to originate from glow 07:03:46
@r4tty:matrix.orgryanIf I want to make my own wgsl preprocessor, is there something that can help me with that? Maybe parsing the code so I can find/rename functions easily?07:23:42
@dinnerbone:matrix.orgDinnerbone
In reply to @r4tty:matrix.org
If I want to make my own wgsl preprocessor, is there something that can help me with that? Maybe parsing the code so I can find/rename functions easily?
There's a crate called naga_oil that you might be able to draw some inspiration from, it has wgsl preprocessing. https://github.com/robtfm/naga_oil
11:50:16
@frankorz:matrix.orgfrankorz joined the room.14:18:58
@norlock:matrix.orgnorlockRedacted or Malformed Event20:39:26
@norlock:matrix.orgnorlock * switch vertex\_index { case 0u, 4u { position = vec3\<f32>(tp.x, tp.y, tp.z); } case 1u { position = vec3\<f32>(tp.x, tp.y + 0.1, tp.z); } case 2u, 3u { position = vec3\<f32>(ntp.x, ntp.y + 0.1, ntp.z); } case 5u, default { position = vec3\<f32>(ntp.x, ntp.y, ntp.z); } } ' why is this switch not working I get case 5u, default { β”‚ ^^^^^^^ expected unsigned/signed integer literal ` 20:39:37
@norlock:matrix.orgnorlock * `20:40:55
@norlock:matrix.orgnorlock * switch vertex_index { case 0u, 4u { position = vec3<f32>(tp.x, tp.y, tp.z); } case 1u { position = vec3<f32>(tp.x, tp.y + 0.1, tp.z); } case 2u, 3u { position = vec3<f32>(ntp.x, ntp.y + 0.1, ntp.z); } case 5u, default { position = vec3<f32>(ntp.x, ntp.y, ntp.z); } } 20:41:02
@norlock:matrix.orgnorlock * " switch vertex_index { case 0u, 4u { position = vec3<f32>(tp.x, tp.y, tp.z); } case 1u { position = vec3<f32>(tp.x, tp.y + 0.1, tp.z); } case 2u, 3u { position = vec3<f32>(ntp.x, ntp.y + 0.1, ntp.z); } case 5u, default { position = vec3<f32>(ntp.x, ntp.y, ntp.z); } }" 20:41:40
@norlock:matrix.orgnorlock *
switch vertex_index {
    case 0u, 4u {
        position = vec3<f32>(tp.x, tp.y, tp.z);
    }
    case 1u {
        position = vec3<f32>(tp.x, tp.y + 0.1, tp.z);
    } 
    case 2u, 3u {
        position = vec3<f32>(ntp.x, ntp.y + 0.1, ntp.z);
    }
    case 5u, default {
        position = vec3<f32>(ntp.x, ntp.y, ntp.z);
    }
}
20:42:09
@norlock:matrix.orgnorlockRedacted or Malformed Event20:43:21
@norlock:matrix.orgnorlock *

Why is that switch statement not working? I get the following error:

\`170 β”‚         case 5u, default {
β”‚                  ^^^^^^^ expected unsigned/signed integer literal

expected unsigned/signed integer literal, found 'default'`
20:43:37
@norlock:matrix.orgnorlock *

Why is that switch statement not working? I get the following error:

|         case 5u, default {
β”‚                  ^^^^^^^ expected unsigned/signed integer literal

expected unsigned/signed integer literal, found 'default'`

vertex_index is an u32

20:44:28
@norlock:matrix.orgnorlockRedacted or Malformed Event20:47:58
1 Feb 2023
@norlock:matrix.orgnorlockIn compute shaders is there a rule when ping pong buffers are faster then just write back to read_write storage? I get that for rendering ping pong is much faster, but in multiple compute shaders does it help to always ping pong instead of just the last one?21:20:18
@kvark:matrix.orgkvarkI don’t think it helps in compute ever21:38:25
@cwfitzgerald:matrix.orgcwfitzgerald (wgpu, rend3)Yeah if you can write back to the same place, might as well21:39:04
@cwfitzgerald:matrix.orgcwfitzgerald (wgpu, rend3)Ping pong is useful when you can't21:39:21
@norlock:matrix.orgnorlockAh ok I will do that, thanks. 21:42:11
@norlock:matrix.orgnorlock * Ah ok I will do that, thanks.21:42:22
2 Feb 2023
@dinnerbone:matrix.orgDinnerboneAre resources refcounted internally; when I make a Buffer and a BindGroup that uses that Buffer, when I drop the Buffer is the Bind Group still valid to use?15:56:05
@cwfitzgerald:matrix.orgcwfitzgerald (wgpu, rend3)Correct15:56:22
@cwfitzgerald:matrix.orgcwfitzgerald (wgpu, rend3)* Yes - they are15:56:31
@dinnerbone:matrix.orgDinnerboneAwesome, so it's not truly destroyed until the bind group is also destroyed15:56:46
@dinnerbone:matrix.orgDinnerboneThaks!15:56:55
@dinnerbone:matrix.orgDinnerbone * Thanks!15:56:59
@cwfitzgerald:matrix.orgcwfitzgerald (wgpu, rend3)Specifically it won't be destroyed until the maintain call (submit or poll) after the gpu is finished with it15:58:52
@mehmetoguzderin:matrix.orgmehmetoguzderin changed their profile picture.20:09:07
@mehmetoguzderin:matrix.orgmehmetoguzderin changed their profile picture.20:09:25

There are no newer messages yet.


Back to Room List